Date interval in Teradata

Tools & Utilities

Date interval in Teradata

Hi,

I need to select data for last seven days from the database that has data for nearly 20 years.
Can someone please give me the code to extract data for last seven days using teradata SQL?

Thanks in Advance.

Regards
learninggeek
1 REPLY

Re: Date interval in Teradata

Hi,

I assume you have a date field in the record, then it's a simple mater of;

Select *
From from somedb.sometbl as a
where a.date >= date-7;

Regards
Glenn.