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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Where clause in a SQL 7.0 view

Status
Not open for further replies.

msloan

Programmer
May 30, 2001
39
US
I am trying to select records that fall within a date range. I know the sytax to do this in access is something like:

SELECT dbo_tblEvents.fldEventsName, dbo_tblEvents.fldEventsStartDate, dbo_tblEvents.fldEventsEndDate
FROM dbo_tblEvents
WHERE (((dbo_tblEvents.fldEventsStartDate)>#1/1/1995#) AND ((dbo_tblEvents.fldEventsEndDate)<#6/30/2001#));

any ideas how to get this to run in SQL7.0?

Thanks in advance !!!

Matt
 
Hi there.
I think you just need to change the table name from dbo_tablename to dbo.tablename and replace the #'s around your dates with single quotes like this '6/30/2001'.
 
Try this......

SELECT fldEventsName, fldEventsStartDate, fldEventsEndDate
FROM dbo_tblEvents
WHERE (dbo_tblEvents.fldEventsStartDate > '01-01-1995') AND (dbo_tblEvents.fldEventsEndDate < '06-30-2001')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top