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

DATE CRITERIA

Status
Not open for further replies.

JINGRAM

Technical User
Mar 28, 2002
10
US
COULD SOMEONE POSSIBLY HELP ME WITH INSERTING THE CORRECT CRITERIA IN A QRY? I HAVE A DATE FIELD (ACTUALLY 4) AND FOR THE 1ST ONE I WOULD LIKE TO ASK IT TO RETURN ANY DATES THAT ARE THAT ARE MORE THAN 7 DAYS OLD.

THEN ON THE NEXT QRY I WOULD LIKE IT TO COMPARE TWO OF THE DATE FIELDS AND HAVE IT ALSO RETURN ANY DATES THAT ARE MORE THAN 7 DAYS OLD.
IT SEEMS PRETTY SIMPLE BUT I JUST CAN'T GET BACK WHAT I NEED.
THANKS FOR ANY HELP
JEN
 
First, please turn off your CAPS LOCK key.

Second, you should be able to do this easily:

SELECT *
FROM MyTable
WHERE MyTable.Date1 < SYSDATE - 7;

Hope that helps... Terry
**************************
* General Disclaimor - Please read *
**************************
Please make sure your post is in the CORRECT forum, has a descriptive title, gives as much detail to the problem as possible, and has examples of expected results. This will enable me and others to help you faster...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top