Re: SQL Dates in Magic 101


Govert Schipper
 

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
Verzonden: vrijdag 13 mei 2022 10:00
Aan: magicu-l@groups.io
Onderwerp: [magicu-l] SQL Dates in Magic 101

 

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

 

 

 

Adam

Jackson

Senior Mgr, Operations & Digital Systems

T  +447949892482

 

E  adam.jackson@...

McLaren Formula 1 Team

McLaren Technology Centre

Chertsey Road, Woking

Surrey, GU21 4YH, UK

mclaren.com

Facebook

Instagram

LinkedIn

Twitter

YouTube

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.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478

 

Join main@magicu-l.groups.io to automatically receive all group messages.