I am trying to create a stored procedure that will check a date field.
I want to check for records that are equal to or greater then 90 days
from the current date. I am trying to check this against a field
called LastUpdate. Is there an easy way in SQL to do this?
TIA"Icarus" <christopher@.NOSPAMreardenweb.com> wrote in message
news:dfekrvgejb2bg5gt4bqfdjj2p33j1gsj6v@.4ax.com...
> Hi all,
> I am trying to create a stored procedure that will check a date field.
> I want to check for records that are equal to or greater then 90 days
> from the current date. I am trying to check this against a field
> called LastUpdate. Is there an easy way in SQL to do this?
> TIA
SELECT *
FROM T
WHERE LastUpdate <= CURRENT_TIMESTAMP - 90
Regards,
jag|||...
WHERE lastupdate >=
DATEADD(DAY,-90,CONVERT(CHAR(8),CURRENT_TIMESTAMP,112))
--
David Portas
----
Please reply only to the newsgroup
--
"Icarus" <christopher@.NOSPAMreardenweb.com> wrote in message
news:dfekrvgejb2bg5gt4bqfdjj2p33j1gsj6v@.4ax.com...
> Hi all,
> I am trying to create a stored procedure that will check a date field.
> I want to check for records that are equal to or greater then 90 days
> from the current date. I am trying to check this against a field
> called LastUpdate. Is there an easy way in SQL to do this?
> TIA|||Thanks! Worked perfectly.
On Tue, 18 Nov 2003 15:48:07 GMT, "John Gilson" <jag@.acm.org> wrote:
>"Icarus" <christopher@.NOSPAMreardenweb.com> wrote in message
>news:dfekrvgejb2bg5gt4bqfdjj2p33j1gsj6v@.4ax.com...
>> Hi all,
>>
>> I am trying to create a stored procedure that will check a date field.
>> I want to check for records that are equal to or greater then 90 days
>> from the current date. I am trying to check this against a field
>> called LastUpdate. Is there an easy way in SQL to do this?
>>
>> TIA
>SELECT *
>FROM T
>WHERE LastUpdate <= CURRENT_TIMESTAMP - 90
>Regards,
>jag
No comments:
Post a Comment