Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query / SQL Criteria

Status
Not open for further replies.

tbassngal

Programmer
Feb 18, 2003
74
0
0
US
Hi everyone!! I have an SQL statement that I didn't write and I barely understand it, but this is what it looks like:

strSQL = "Select distinct [Program Code],[E_Name] as Name,count([Project Id]) as NumOfProj from " & strTblName
strGroupBy = " GROUP BY [Program Code],[E_Name]"
strWhere = " WHERE [RCD] < NOW() and [ECD]= null"

The strWhere is not working... RCD and ECD are date fields. What I would like to do is have the SQL select data where the RCD has already passed todays date and ECD doesn't have a date entered... is this possible? I obviously don't have the strWhere in proper syntax :-( Please help! thank you as always!

Tina
 
Replace this:
[ECD]= null
With this:
[ECD] Is Null

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top