Trying to import text file into volatile table using Teradata SQL Assistant

Teradata Studio

Trying to import text file into volatile table using Teradata SQL Assistant

Hi All,

I am brand new to Teradata and I am trying to import a text file with 4 columns into a volatile table using Teradata SQL Assistant. I am going to file then I am selecting import data and trying to execute the below code. I am executing the create table in one query window then I am executing the insert into in a seperate query window. However it's not working.

CREATE VOLATILE TABLE TempTable(MemberId varchar(25),PhysicianNPI integer, Member_id varchar(25), MemberSrc varchar(2));
 
INSERT INTO TempTable values(?,?,?,?);
4 REPLIES
Junior Contributor

Re: Trying to import text file into volatile table using Teradata SQL Assistant

Hi Brian,

what is actually failing? Error message?

Re: Trying to import text file into volatile table using Teradata SQL Assistant

I figured it out I was missing the code below at the end of the create volatile table

on commit preserve rows;

Thanks for following up with me Dieter, I appreciate it.

Enthusiast

Re: Trying to import text file into volatile table using Teradata SQL Assistant

Hi All,

I have the following issue.

insert into table.namevalues(?, ?, ?, ?)

my 4th column is timstamp(6) in TERADATA

1st i export that record from TERADATA when i import again i got erorr.

1:-invalid timestamp

2:-Query contains 4 parameters but import file contains 1 data values

can any one guide me how to import and export to TERADATA using SQL asistant

Thanks in Adv

Raj

Teradata Employee

Re: Trying to import text file into volatile table using Teradata SQL Assistant

Raj, For help with SQL Assistant, please post to the Tools Forum. If you are using Studio Express, you can right click on a table and choose, Data>Export and Data>Import to export and import data from a table.