Issue during import text data in to table using sql assistant

Database
Enthusiast

Issue during import text data in to table using sql assistant

Hi All,

I got issue during import data to a empty table which is having 64 columns from a text file. Datatype of columns include varchar,char,decimal(18,0) and date . While importing Decimal column is not loading into the table for which I am getting error.Source file and target table are having same number of columns and datatypes. Column 3 is of decimal(18,0) and is having null as default value.

INSERT INTO Db.XYZ Values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);

Error I am getting is :

Bad character format or data in the table xyz.column3

Text file includes 30 records. I have removed the header for importing the data  to a table.Can you please help ....

Thanks in advance... :)

Regards,

Arohi

4 REPLIES
Enthusiast

Re: Issue during import text data in to table using sql assistant

Arohi,

I don't believe you can load nulls using sqla. You can either update the nulls in the file to a value known not to exist in the data, load the table then update the value to null or better use Fastload or TPT in the first place.

Rglass

Enthusiast

Re: Issue during import text data in to table using sql assistant

Thanks Glass for your reply...I must try on your suggestion. 

Thanks,

Arohi

Enthusiast

Re: Issue during import text data in to table using sql assistant

Hope you have verified the delimiter set in the import setting(options->export/import) if it matches the exact delimiter in your text file.

Enthusiast

Re: Issue during import text data in to table using sql assistant

Ya I have verified the delimeter set but it seems for handling nulls issue  while  loading to the table...Thanks  Satyanarayan for your reply..

Regards,

Arohi