All Forums Tools
gwenaellebarzic 7 posts Joined 05/13
07 Aug 2013
Loading a file into a table using Multiload

Hello !
I create this topic because I have a question relative to the loading of a file into a table in Teradata. More specifically, my question concerns a certain type of value of a field in a file to insert into a table, the NULL value.
Let's say I have the following table T1 :

CREATE MULTISET TABLE T1
(
field1 VARCHAR(50)
, field2 VARCHAR(50)
);

I want to insert a NULL value into field2. What kind of value do I have to put in my file that I want to load (by using multiload) into this table ?
My file F is like this : two fields and the "|" character as separator.

line1_field1|line1_field2
line2_field1|line2_field2

I tried to let it empty, like this :

L1F1|
L2F1|L2F2

But it does not work. When I try to load the file by using multiload into Teradata table, I have the following error message :

**** 12:03:39 UTY4017 Not enough data in vartext record number 7855.

Hope this is not a too noobish question :D. Sorry if it is >_<.
Best regards.
Gwenael Le Barzic

gwenaellebarzic 7 posts Joined 05/13
07 Aug 2013

Re !
In fact, it was my bad.
This error was coming from the fact that the number of fields separated by my separator is not right compared to the number of fields in the table, due to the presence/absence of some other fields.
Best regards.
Gwenael Le Barzic

SuSeSi 52 posts Joined 10/08
08 Aug 2013

your data file should look like this:
L1F1||
L2F1|L2F2
note the extra delimiter in the record to input secound field value.

-Sudhansu

You must sign in to leave a comment.