All Forums Tools
kumquatz 1 post Joined 02/13
20 Feb 2013
Importing Data from file with sql assistant

Hi, I
have created a table:

create table
(name varchar(256) not null);

and want to load data from a file with the following command:

insert into

the file I use contains just one value 'test'
after I have executed the query and choosen a file the following errormessage appears:
ERROR [42000] [Teradata][ODBC Teradata Driver][Teradata Database] Syntax error, expected something like ';' between the word 'xyz' and the 'INSERT' keyword. 
Unexpected Error. Refer to the following file for details:
C:\Users\PSteinnoekel\AppData\Roaming\Teradata\SQL Assistant\SQLAError.Txt
The textfile contains the following:

20.02.2013 12:28:17

SQLA Version:

Driver Version: ODBC

System.Data.Odbc.OdbcException: ERROR [42000] [Teradata][ODBC Teradata Driver][Teradata Database] Syntax error, expected something like ';' between the word 'xyz' and the 'INSERT' keyword. 

   bei System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)

   bei System.Data.Odbc.OdbcCommand.Prepare()

   bei Teradata.SQLA.RunQry.DoImportBind() in V:\cm.client.ttu1401.efix\tdcli\qman\sqla\RunQry.vb: Zeile 1821.


Can someone help me? Thanks!

dnoeth 4628 posts Joined 11/04
21 Feb 2013

I just tried it, seems to be a bug in SQLA while parsing the highlighted text.
Is this your code?

create table
(name varchar(256) not null)

insert into

Add a  semicolon after the end of the previous query before the insert.


MBSconnection 29 posts Joined 07/13
22 Aug 2013

I'm using SQLA
August 12, 2011
Database Version Teradata 13.10.0511
I have coma delimited CSV with No headers.
When I try to import it in a Table that has a Structure

Col1 CHAR(2) NOT NULL  default 'NA',
Col2 CHAR(2)  NOT NULL  default 'US',     
Col3 CHAR(2) NOT NULL  default 'GHH',       
Col4 CHAR(16) NOT NULL  default 'Opt - ins (1,CT)',
Col5 CHAR(6)NOT NULL default '(1,CT)',
Col6 CHAR(5) NOT NULL default 'Daily',
Col7 CHAR(6)NOT NULL default 'GHH-US',   
Q1Count Integer  null,
Q2Count Integer null,
Q3Count Integer null,
Q4Count Integer null,
Q5Count Integer null,
Q6Count Integer null,
Q7Count Integer null)

insert into TWM_SANDBOX.T1
Values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);
Query contains 15 parameters but import file contains 21 data values
tools->options->export/import/->import also set to comma delimited
Click on File and Select Import Data,Now writeinsert into table.namevalues(?, ?, ?, ?) no of columns on the table should be equal to ?now press f5, it will ask for the source, jus browse and select the source and you can load the data in to the table using SQL assistant.
Not working??
Any clue??

You must sign in to leave a comment.