Re: SQL Dates in Magic 101
Jackson, Adam
Hi,
It works in that I don’t get the Cast error but I don’t get any returned records either. I have checked the data and all records for the order I am locating have null in the Completed column.
Adam
From: main@magicu-l.groups.io <main@magicu-l.groups.io>
On Behalf Of Govert Schipper via groups.io
Sent: 13 May 2022 09:41 To: main@magicu-l.groups.io Subject: Re: [magicu-l] SQL Dates in Magic 101
Adam,
Locating on a null() value should work. So on both the lower and upper locate expression put an expression null()
Govert
Van: Jackson, Adam
Hi,
Probably should have worked this out ages ago but struggling with locating on null datetime fields inside a LQ or LW though I suspect would be same in main table too. I have a null allowed date field in a table. I want to locate on that column (among others) to find out if there are one more null values in that column (it’s a Date Completed column and I’m trying to find if there are any incomplete records). I have tried locating on the following and either get no records or mainly cast error; ‘00/00/0000’DATE, ‘00/00/0000’,0,null(),’’. I have also tried locating on time part of datetime pair but makes no difference. In my desperation I have changed the null allowed setting in the data repository. The only method I have got working is to add a logical virtual to the LQ initialised on Completed = ‘00/00/0000’DATE and locate on this being true.
I am sure there must be a simple way to do this most simple of things. Can anyone help?
Magic 2.5d
Thanks,
Adam
The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or
disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|