0 - 11 of 11 tags for interval

...WHERE DB.LOG_DATE > DATE - INTERVAL '6' MONTH;
 
This has been working for weeks, until today. I wasn't sure what broke my script until I tried dropping the date requirement and then it started working perfectly. 6 month ago is February 30, I am guessing, by TD logic, which doesn't exist.
Any general solutions?
 

Any assistance would be welcomed.  I cannot seem to put the Interval in a format that Teradata likes.  The column data looks like "00 02:00:00.000000".  We are extracting it from ORacle and loading to Teradata version 15.10.  I am able to load most other data types no problem, but I cannot find the format needed to make this happy.

Hi,
I'm new to teradta and when I'm running the following SQL:

SELECT 

cast(CALENDAR_DATE as date format 'YYYY-MM-DD')    -  INTERVAL '1' YEAR

FROM SYS_CALENDAR.CALENDAR

 

and get error 2666. Invalid dates supplied for CALDATE.

 

hi, i've got this table with the field ampcputime, which is a integer and used the following text in a query

Hi,
I was working on a scenario and build the following logic, I need to convert the time output from this case statement to INTERVAL HOUR TO MINUTE.

Hi!
I am trying to calculate moving sums and row counts in a query, to do further arithmetic on the said values. For a range of 3 days, for example, I would sum the values given in the rows for those 3 days, and then divide them by the amount of rows in that same time period.
In Oracle, the syntax would be:

Hi, i have these 2 columns defined:

WAIT_INTVL INTERVAL HOUR(3) TO SECOND(2)
HOLD_INTVL INTERVAL HOUR(3) TO SECOND(2)

and both are null values

a) select COALESCE(WAIT_INTVL, INTERVAL '0' SECOND) from TableT1
returns     0:00:00.00

b) i can substract (a) with itself

select COALESCE(WAIT_INTVL, INTERVAL '0' SECOND) - COALESCE(WAIT_INTVL, INTERVAL '0' SECOND)
from TableT1
returns     0:00:00.00

Hi, i have two timestamp columns of 2 fractional seconds precision,

i want to take the difference of these 2 timestamps and then have interval upto 0 fractional seconds only
 

For 2 fractional seconds Interval:

I am trying to have a where clause that checks if the current_date is less than a date field minus 14 days.  This is a sample of the code.

SELECT PROD_ID, LOC_ID FROM PRODUCT WHERE CURRENT_DATE < (PROMO_DATE - INTERVAL '14' DAY)

Problem: How do you add or subtract a "fractional second" to a TIMESTAMP column in Teradata?

The available documentation is not very clear, so let's look into it using examples.

Basic use of INTERVAL

Build, Populate, and Query Test Table