Trying to import data into my table

Tools

Trying to import data into my table

I have a csv file and I am trying to import the data into my table and it says invalid query. I am very new to Teradata.

Here is my code:

[code]

.import data file=c:\users\ad36742\documents\communication.csv,skip=3

.quiet on

.repeat *

using comm_id(integer),

comm_type varchar(50)

insert into dl_qpt_cqe.communcation

(comm_id,

comm_type

)

values

(

:comm_id

,:comm_type

);

.quit;

[/code]

2 REPLIES
N/A

Re: Trying to import data into my table

What utility are you using?

Teradata Employee

Re: Trying to import data into my table

I see two things.

.IMPORT is specifying DATA (i.e. FastLoad format without indicators). I doubt that's actually the format of your input file. More likely you need something like VARTEXT ',' and the USING fields should be only VARCHAR. Remember that USING describes the input data, not the table.

Also, the USING statement above is missing the parentheses around (VARCHAR(50)).