![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello everyone, Any help on this matter would be greatly appreciated. I've written a Time clock program for my employer which uses an access 2000 database backbone. Everything with the program works great except that I need to do a Query (SQL, access style) that is not working. The best way I can explain it is to give an example of what I would want to do. Normally if this was string data it would work... SELECT w.DSI, e.LastName, e.FirstName,w.Date, w.StopTime FROM employee AS e, worklog AS w WHERE w.dsi=e.dsi And w.date=<curdate> AND w.StopTime='' The basic idea is that the is no data in the column 'StopTime'. Any variation I have done on this has crash, and I can't come up with anything else. I've used Not Like, I've used NULL, I've used cDate(''), and nothing works. If anymore information is needed, please post. I will be checking this (obviously). Thanks anyone and everyone for even reading this, Frank V. |
#3
| |||
| |||
|
|
Just a thought, have you tried IsDate(), isNull()? I'm pretty sure you can't query with "=NULL". You have to test with IsNull. Could you post the DDL & data if this doesn't work? I assume it is a date/time field. I was able to query for the missing condition (no date) on a table like this (sorry, mostly tsql recently) create table tblTest ( id int autonumber textval text(50) dateval datetime ) with data 1, 'data 1', 2004-07-10 2, 'data 2', 2004-07-01 3, 'data 3', <no data entered in table data entry screen select * from tblTest where isdate(dateval) = false select * from tblTest where isnull(dateval) -[ Andrew Backer / abacker .@. comcast .dot. net ]- Frank V. wrote: Hello everyone, Any help on this matter would be greatly appreciated. I've written a Time clock program for my employer which uses an access 2000 database backbone. Everything with the program works great except that I need to do a Query (SQL, access style) that is not working. The best way I can explain it is to give an example of what I would want to do. Normally if this was string data it would work... SELECT w.DSI, e.LastName, e.FirstName,w.Date, w.StopTime FROM employee AS e, worklog AS w WHERE w.dsi=e.dsi And w.date=<curdate> AND w.StopTime='' The basic idea is that the is no data in the column 'StopTime'. Any variation I have done on this has crash, and I can't come up with anything else. I've used Not Like, I've used NULL, I've used cDate(''), and nothing works. If anymore information is needed, please post. I will be checking this (obviously). Thanks anyone and everyone for even reading this, Frank V. |
![]() |
| Thread Tools | |
| Display Modes | |
| |