Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Date question
Ben,
There are as many ways to get the data for a week as there are members of =
this group. You could code the "where clause" the say "WHERE datefield =
BETWEEN '01-01-2000' AND '01-07-2000'; or WHERE datefield between sysdate =
and sysdate -7; or in a package that passes a date into a variablr xfield =
WHERE datefield between todate(xfield)-7 and todate(xfield;...etc
The easiest is to use the BETWEEN option of the WHERE clause.
Hope this helps,
Ron Rogers
DBA
Atl. GA
>>> kaderb_at_yahoo.com 06/20/00 11:24AM >>>
Good morning friends,
Please how can I code a select query that return results of one week. For example between to day and last week.
TIA Ben
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists --------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Jun 20 2000 - 10:37:22 CDT