am learning teradata sql (sql ingeneral) and i got this error:
SELECT Failed.  '' ('60'X) is not a valid Teradata SQL token.
the script was running well until i defined the column aliases for e.g:
, PS5IE.S5IE_ADJ_TOT_AMT ptnr_adj_amt
'60'x should be a backtick "`", this is not valid in Teradata (or Standard SQL).
You don't need to quote a name unless there are invalid characters in it or it's a reserved name.
And then use double quotes instead:
PS5IE.S5IE_ADJ_TOT_AMT AS "ptnr_adj_amt"
Did you work with MySQL before? :-)
sorry i was away on leave just got back this morning!
yes it was a back tick. alls good now.
Unfortunately teradata sql is my first and its getting me excited!
my current task is building volatile tables as part of my data analysis.
I've heard so much about volatile tables and to be creating one... :)
How to rollup totals from different columns and insert into one column
I have created a column to hold the total amounts for all amounts types recorded against an event.
the insert statements worked well for all the columns.
what i want to do is to rollup the total amounts for the 9 columns below and insert into the new column (CUST_TOTAL_AMT).
, CUST_TOTAL_AMT INTEGER
Below is sample of the insert statement that works well for the 9 columns above?
, CAST(S5IE.S5IE_ADJ_TOT_AMT AS DECIMAL(15,2))/100 AS ADJ_TOT_AMT
after upgrading tdodbc driver from 15.00 to 15.10 i've faced with the similar error message:
3704 - ' ' ('0A'X) is not a valid Teradata SQL token
when try to create the simplest table via odbc:
create table product ( prod_id integer not null with default,
prod_price decimal(10,2) not null with default,
prod_descrip varchar(20) not null with default )
however, table was created if remove '\n':
create table product ( prod_id integer not null with default, prod_price decimal(10,2) not null with default, prod_descrip varchar(20) not null with default )
Also statement with carriage returns works correctly if use tdodbc-15.00
Is any way to process sql statements with '\n' ?
Thanks in advance
Do you have an update as to how you resolve this? I am using MS Access odbc and it has the same issue on LOJ adding a line feed automatically that Teradata does not recognise. Thanks in advance
I did not find any solution, i've reverted back to 15.00 odbc driver,
This is only linux specific problem,
Windows driver can process newlines
I faced the same issue with ODBC 15.10 and it would be nice if there is any information about it.