All Forums Database
aolympio 25 posts Joined 04/09
24 Jul 2009
Teradata Error: [3704] '' ('0A'X) is not a valid Teradata SQL token.

Hi guys!I'm facing this problem(I've programmed it in C#/.NET):Performing this part of code:adaptador.InsertCommand = command;command.UpdatedRowSource = UpdateRowSource.None;adaptador.UpdateBatchSize = 100;command.CommandText = "INSERT INTO TABLE1 (FIELD1, FIELD2, FIELD3) VALUES(?,?,?);";adapter.Update(myDataTable);I've got this error:[Teradata Database] [3704] '' ('0A'X) is not a valid Teradata SQL token. em System.Data.Common.DbDataAdapter.UpdatedRowStatusError s(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)em System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowU pdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)em System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)em System.Data.Common.DbDataAdapter.UpdateFromDataTable(D ataTable dataTable, DataTableMapping tableMapping)em System.Data.Common.DbDataAdapter.Update(DataTable dataTable)na F:\Application\File.cs:linha 100My DataTable(myDataTAble) has 3 columns with same name of the 3 field of the table and it's already populated.What problem could be?Thanks for help,Anderson

amadu 14 posts Joined 09/14
25 Sep 2014

hi there.
am learning teradata sql (sql ingeneral) and i got this error:
SELECT Failed. [3704] '' ('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

 

Amadu Barrie

dnoeth 4628 posts Joined 11/04
26 Sep 2014

Hi Amadu,
'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? :-)

Dieter

amadu 14 posts Joined 09/14
01 Oct 2014

thanks Dieter.
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... :)
 

Amadu Barrie

amadu 14 posts Joined 09/14
02 Oct 2014

 How to rollup totals from different columns and insert into one column

Hi there,
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).

 ,S5IE_ADJ_TOT_AMT                      INTEGER
 ,S5IE_DEDN_MAINT_EXPEND_AMT  INTEGER
 ,S5IE_FGN_INC_AMT                      INTEGER
 ,S5IE_FRNG_BEN_AMT                    INTEGER
 ,S5IE_NET_INV_LOSS_AMT             INTEGER
 ,S5IE_RPT_SUPER_CONTRIB_AMT    INTEGER 
 ,S5IE_TAX_FREE_PENR_BEN_AMT    INTEGER 
 ,S5IE_TAXEXE_FGN_INC_AMT          INTEGER
 ,S5IE_6MTH_INC_AMT                     INTEGER 
 , 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
  , etc
  , etc
Best Regards  
 

 

Amadu Barrie

oleksandr.savin 2 posts Joined 12/15
29 Dec 2015

Hi everybody,
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' ?
 
Environment:
tdodbc-15.10.00.01-1
Linux 2.6.32-431.el6.x86_64
 
Thanks in advance
 
 

 
 
 
 

jobbazar 39 posts Joined 12/09
06 Jan 2016

@oleksandr.savin
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

oleksandr.savin 2 posts Joined 12/15
07 Jan 2016

@jobbazar
I did not find any solution, i've reverted back to 15.00 odbc driver,
BTW,
This is only linux specific problem,
Windows driver can process newlines
 

sh_one 5 posts Joined 06/15
25 Feb 2016

Is this behaviour of the 15.10 ODBC driver a known bug? 

Sven

kristiyan.kolev 1 post Joined 07/15
22 Apr 2016

I faced the same issue with ODBC 15.10 and it would be nice if there is any information about it.
Regards, Kristiyan

DiEgoR 33 posts Joined 08/06
24 May 2016

The solution I found is to remove all new lines \n from the SelectStmt. This is very annoying.
Personally I think that this is a scandal for Teradata to have such bugs in their code for such a long time. This issue was reported in 2009 and still no offical Teradata response here?
Hey Teradata, you will end up like Blackberry if you keep this attitude to your power users. RIM was also assured about their technology, but the developer experience was very limiting.

input output putput

You must sign in to leave a comment.