database - Sybase bcp error -


what want copy table file, truncate table , copy data table.

for this, using following 2 commands:

out: bcp table out file.csv -s server -u user -p password -r '\n' -t '^|' -c
in: bcp table in file.csv -s server -u user-p password-r '\n' -t '^|' -c -j iso_1 -b 5000

this error get:

cslib message: - l0/o0/s0/n36/1/0:
cs_convert: cslib user api layer: common library error: result truncated because conversion/operation resulted in overflow.

the interesting part ( me, @ least ) error rows first column being odd number. first 3 million rows, cuts half of them, having first column ( pk ) odd number.

i tried different options, none seem work: no problem charset far can tell, there no huge columns such truncated , not carriage return missing.

any appreciated.

update: after creating format-file there no more errors, copies half of data table.

update: managed create format file works , loads data, cannot use on server (it works in testing environment, needs run in production environment), since says attempt read unknown version of bcp format-file.? know means, there way of finding correct values of version?

solved: after digging in database, seems problem indeed data inconsistency due fact view used in production copy table copied 25 columns, table has 26 columns ( altered table , didn't know , hadn't noticed happened ). fixed view , works.

since going out of/into same server, recommend use bcp native flag.

bcp dbname..table out file.bcp -sserver -uuser -ppassword -n bcp dbname..table in file.bcp -sserver -uuser -ppassword -n -b5000 

character mode can wierd, , use when required.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -