Re: SQL question on Dates

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: 1996/05/17
Message-ID: <319caa92.3611538_at_dcsun4.us.oracle.com>#1/1


On Thu, 16 May 1996 13:27:37 GMT, dgsmith_at_wb.xerox.com (David Smith) wrote:

>I would think this would be relatively straight forward.
>
>How would I write the SQL to pull the current month's records without having
>to put modify the date in the criteria? Therefore on the first of the month
>it would automatically reset to pulling just that month's records.
>
>Thanks,
>
>Dave Smith
>
>
>
>

Dave

select <blah>

   from <table>
where to_char( sysdate ,'MMYYYY' ) = to_char( <date_field>, 'MMYYYY' )

Hope this helps.

chris

--
Christopher Beck
Oracle Government
clbeck_at_us.oracle.com

#include <std_disclaimer.h>
Received on Fri May 17 1996 - 00:00:00 CEST

Original text of this message