Importing Error

General

Importing Error

Hello,

 

I downloaded data from an Oracle database.  The four fields from Oracle are:

 - aID [decimal() identity(18,0), Not Null]

 - acctNum [decimal(18,0)]

 - date1 [smalldatetime(0)]

 - date2 [smalldatetime(0)]

 

I exported this into Excel.  I then saved the excel file as both a .txt (Tab delimited) and a .csv (Comma delimited).  What I am trying to do is create a temp table in Teradata SQL Assistant (14.10 R4) so I can query the downloaded data above to a database in the Teradata environment.  I created the temp table using the below. 

CREATE VOLATILE TABLE tableTemp

(aID VARCHAR(25), accountNum VARCHAR(25), Date1 DATE, Date2 DATE)

ON COMMIT PRESERVE ROWS

 

After creating that temp table...I tried importing data using the below:

INSERT INTO tableTemp VALUES (?,?,?,?);

I tried using the import option of {TAB} as the delimter with the .csv file and .txt files and also a ',' delimiter with the .csv and .txt files. I keep getting error importing record 14.  [3807] Object 'tableTemp; does not exist. 

 

I have no idea how to inport this data.

 

 

 

5 REPLIES
Teradata Employee

Re: Importing Error

Hi.

 

Are you importing the data into the VOLATILE TABLE with the same session that created it?

 

Volatile Tables are session-local.

 

Cheers.

 

Carlos.

Re: Importing Error

Yes, within the same session. 

Teradata Employee

Re: Importing Error

Weird.

 

Try a permanent table instead.

 

Cheers.

 

Carlos.

Re: Importing Error

What is the code to create that table and import?  I have never done that.  Kind of a novice in sequel.

Teradata Employee

Re: Importing Error

Hi.

 

CREATE TABLE <username>.tableTemp(
aID VARCHAR(25),
accountNum VARCHAR(25),
Date1 DATE,
Date2 DATE)
PRIMARY INDEX (aID)
;

 

should be OK.

Note that the username is optional if you are working on your own "schema" (talking a-la-Oracle).

 

Manuals are your friends.

 

Cheers.

 

Carlos.