Tags for teradata
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
Fetch multiple columns from cursor
Hi, I am try to use a cursor to loop through multiple values, which is fine if I only use one column. It doesn't seem to work if I try to fetch more than one column. e.g. DECLARE var_a VARCHAR(10); DECLARE var_b VARCHAR(10); DECLARE var_c VARCHAR(10);   DECLARE crsr CURSOR FOR
teradata cursors
SQL Error on 'Create Table' in Terdata SQL Assistant
why I am getting a syntax error?   create TABLE  ddwp_v.sponsoredm, CHECK = DEFAULT (account VARCHAR(12)  Unique Primary INDEX(account); insert into ddwp_v.sponsoredm VALUES(?);  
teradata
Retrieve Rows where a change in values (intwo columns) occured
Hi all,I will try to explain this in the best way possible. I have a dataset and I am trying to retrieve the only the rows where a change has occurred. I have tried QUALIFY but I can't get my head around it. For example, looking at the following,
teradata
Calculating min and max column values in Teradata
I've a data in the following format  - cust_name , month, isAccountActive A, jan-15, 1 A, feb-15, 1 A, mar-15, 0 A, apr-15 , 1 A,  may-15, 0 B, jan -15, 0 B, feb-15,1 B, mar-15,1 B, apr-15, 1   My output should look like follows-
teradata olap partition by
Cursor select * with Fetch Next statement
I am working on FETCH STATEMENT inside CURSOR. I need to convert a SQL server script into Teradata. ----------------------------------------------------------------------------------------------------------------- Following scnerio is working in Teradata( SELECT columns ) SQL SERVER input:---------------------------------------
cursor fetch into teradata sqlserver
TPT export to delimited files Error
Error : TPT_INFRA: TPT02638: Error: Conflicting data length for column(5) - STATE. Source column's data length (16) Target column's data length (8). EXPORT_OPERATOR: TPT12108: Output Schema does not match data from SELECT statement   Code : 
teradata tpt
Partitoin
Hello Every One,   I have the below table and i need to add the few more partitions without dropping the table. Is this possible ? Below are the partitions needed. SYR =  201401 , SYR =  201402 , SYR =  201403 , SYR =  201404    CREATE MULTISET TABLE xyz ,NO FALLBACK ,
teradata #Teradata Partition #add partition # partition
Query issue
Query -
teradata query
Filtering records with SQL
I have a parameter in a report (Report Builder 3.0) called REPORT_FILTER.  This parameter has 4 available values.  The labels are (1) Home Group, (2) Home Branch, (3) Other Group, and (4) Other Branch.  The corresponding values are 1, 2, 3, and 4.
filter sql teradata

Pages