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

SQL Date Question

Status
Not open for further replies.

Bkster

Technical User
Jan 25, 2002
94
US
If this is in the wrong place are I apologize. I just have had great success with this forum and figured I would get an answer here. I am using DW and need to finish this query in a recordset. I only want to disply items with a date that is = or > than the current date. I have tried > Date() or Date() which works in Access but does not seem to work in this case. Here is the statement.

SELECT PA_SCHED.ACT_CPNT_ID, PA_SCH_SEG.START_DTE
FROM PLATEAU.PA_SCHED PA_SCHED, PLATEAU.PA_SCH_SEG PA_SCH_SEG
WHERE PA_SCHED.SCHD_ID = PA_SCH_SEG.SCHD_ID AND PA_SCHED.ACT_CPNT_ID = 'MMColParam' AND START_DTE

Thanks in advance for the help.

Brian
 
Date() works fine for me in Dreamweaver, connected to Access. The following is a working example from one of my pages:

SELECT PP, StartDate, MidDate, EndDate FROM PayPeriod WHERE Date() BETWEEN StartDate AND EndDate;

What database are you using? Transact SQL has different functions in each database server/engine. For example, if you're using Microsoft SQL Server, rather than Access, I believe the Date() function is getDate().

-Laurie
 
Thanks for the fast reply. I am actually hitting and Oracle Database. I will give the Transact SQL a try. Thanks
 
With Oracle, try sysdate, rather than date(). I believe that's Oracle's built-in variable to return the system time/date. Cheers,

-Laurie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top