How to load formatted file ( with indicator bits) using bteq

Tools & Utilities
Enthusiast

How to load formatted file ( with indicator bits) using bteq

Hi ,

I have a file which i can load to a table using fastload with formatted option and indicator option enabled.
I would like to load the same table using bteq import. can you please let me know what options to use?

Regards,
Vinay
2 REPLIES
Enthusiast

Re: How to load formatted file ( with indicator bits) using bteq

Import Indicdata will do it.
I would normally specify the Not Null against appropriate columns, but it looks like you can get away without it.

.import indicdata file= d:bteqtestorg.txt

.Repeat *

using (User_Id Smallint
, First_Name Varchar(20)
, Last_Name Varchar(30)
, Supervisor_Id Smallint)
Insert Into TestDB.OrgHier2
Values (:User_Id , :First_Name , :Last_Name , :SuperVisor_Id)
;

Enthusiast

Re: How to load formatted file ( with indicator bits) using bteq

Thanks Jim it worked.
Now i am facing another issue, where in the file which has data for the first column but when i import it into the table, first column is getting loaded as null. Can you please help on this?

Regards,
Vinay