dbTalk Databases Forums  

Access 2000 and NULL time field

comp.database.ms-access comp.database.ms-access


Discuss Access 2000 and NULL time field in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Frank V.
 
Posts: n/a

Default Access 2000 and NULL time field - 07-30-2004 , 03:22 PM






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.

Reply With Quote
  #2  
Old   
Andrew Backer
 
Posts: n/a

Default Re: Access 2000 and NULL time field - 07-31-2004 , 04:05 AM






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:
Quote:
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.

Reply With Quote
  #3  
Old   
Frank V.
 
Posts: n/a

Default Re: Access 2000 and NULL time field - 08-04-2004 , 08:43 PM



Hey Andrew,
That worked. thank you alot!

Frank

Andrew Backer <backer_a (AT) nospam (DOT) ho-t-male.com> wrote

Quote:
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.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.