Tags for interval
Last 6 Month in Query - Failing on August 30
...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?  
teradata date interval select statement
TPT load failure on Interval datatype - Error code 7452
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.
tpt bteq interval
Getting error 2666. Invalid dates supplied for CALDATES.cdate
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.  
error 2666 sys_calendar CALDATES.cdate CALENDAR interval interval '1' year
RANGE in INTEGER data fields
hi, i've got this table with the field ampcputime, which is a integer and used the following text in a query
Range integer case interval
Conversion of Time to INTERVAL
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.
Time To Interval interval time
How to calculate moving sums within variable size windows?
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:
olap window range_n between day interval interval
Count of Records within 7 days of Timestamp
count timestamp date interval subquery
Update Interval column on Interval substraction
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
update interval substraction
cast interval
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:
interval fractional seconds
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)
interval date cast interval addition subtraction