Created a table using isql command (with three columns - the third one should be null in database). Then used bcp command to insert the data:
1st Error:
bcp $db..table_name in vrs_temp.txt -U$Login -PPASSWD -S$DBName -c -t\\;
by using the above command I have got the below error and it doesn't uploaded the date into table.
Starting copy...
Unexpected EOF encountered in BCP data-file.
bcp copy in failed
2nd Error:
bcp $db..table_name in vrs_temp.txt -U$DBLogin -PPASSWD -S$DBName -c -t\;
The error I got was :
Starting copy...
CSLIB Message: - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation was stopped due to a syntax error in the source field.
CSLIB Message: - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated because the conversion/operation resulted in overflow.
Could you please check and let me know the problem in the command.
UNIX (and similar OSes linke Linux) and DOS (and its successors linke Windows) have different ways of ending lines in a text file. Somehow software has to know that e.g. in:
first line
second line
after the "e" of "first line" this line ends and a new line begins. Otherwise it would all be one line. DOS/Windows does this with a 2-character sequence (in hexadecimal notation: 0x0D 0x0A, a "carriage return" character, followed by a "linefeed" character), whereas UNIX does it with a 1-character code (a "newline" character). dos2unix and unix2dos are two programs which convert files from one format to the other, according to their name. rdtx1 suggested you should use one of them because maybe the file you have is in the wrong format for your system (DOS version on a UNIX system or vice versa).
Thank you. Actually the problem is with the file format at end of each line. So, I have added a semicolon delimiter and tried accessing the bcp command to load the data into Sybase.