quotes - Load table issue - BCP from flat file - Sybase IQ -


i getting below error while trying bcp flat delimited file sybase iq table.

could not execute statement.
non-space text found after ending quote character enclosed field.

i couldn't observe non space text in file, error stopping me doing bulk copy. | column delimiter " text qualifier , \n row delimiter.
below sample template same, using.

load table table_name(a null('(null)'),b null('(null)'),c null('(null)')) using client file '/home/...../a.txt' //unix quotes on format bcp strip rtrim delimited '|' row delimited '\n'

when perform same query quotes off, load successful. but, same query getting failed quotes on. quotes stripped off, well.

sample data

 12345|"abcde"|(null) 12346|"abcdf"|"zxf" 12347|(null)|(null) 12348|"abcdg"|"zyf" 

any leads helpful!

if iq bcp same ase, think '(null)' fields being interpreted strings, not fields null. you'd need stream edit out (null). you're on unix use sed or perl -ne. e.g. pipe file through " | perl -pne 's/(null)//g'" loading command or filename. quotes off might seem work, wonder if when in loaded data, you'll see double quotes inside 2nd field, , '(null)' expect field null.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -