Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 debug sql statement

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2005-02-10 : 03:26:20
[code]SELECT fundprograms.*,fundprograms.id as fundprogramid, geographic.geoeng, geographic.geoheb, fundprograms.geographicid, fundprograms.deadline FROM fundprograms LEFT JOIN geographic ON fundprograms.geographicid = geographic.ID where ((fundprograms.deadline) between #3/1/2005# And #6/30/2005# or (fundprograms.deadline) is null)[/code]

For some reason programs are coming up with a deadline in July. - Why?

this is a query in Access

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-02-10 : 04:08:50

Try this

SELECT fundprograms.*,fundprograms.id as fundprogramid, geographic.geoeng, geographic.geoheb, fundprograms.geographicid, fundprograms.deadline FROM fundprograms LEFT JOIN geographic ON fundprograms.geographicid = geographic.ID where (undprograms.deadline between #3/1/2005# And #6/30/2005#) or (fundprograms.deadline) is null


Madhivanan
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2005-02-10 : 04:46:30
same problem
the strange thing is deadlines from december are not showing
Go to Top of Page

AndyB13
Aged Yak Warrior

583 Posts

Posted - 2005-02-10 : 05:55:15
quote:
Originally posted by esthera

same problem
the strange thing is deadlines from december are not showing


And why would they? When you want data BETWEEN Jan 3 2005 Mar 1 2005 and Jun 30 2005

Post some sample data & expected results

Andy

Edit:
DOH - US dates!!!
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2005-02-10 : 05:58:45
I found my mistake. I wrote 3/1/2005 when I meant 4/1/2005.

Anyway, thanks for your help
Go to Top of Page
   

- Advertisement -