Sponsored Content
Top Forums Shell Programming and Scripting Bcp command error in uploading data to Sybase Post 303024162 by Suresh on Tuesday 2nd of October 2018 05:32:12 AM
Old 10-02-2018
Bcp command error in uploading data to Sybase

Hi All,

I had an issue in executing bcp command to connect to Sybase from Unix script for uploading the data from file to table.

I have a file called vrs_temp.txt (with two columns):
Code:
22055;20181001
21088;20181001
93840;20181001
30990;20181001
50990;20181001
50950;20181001

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:
Code:
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.
Code:
Starting copy...
Unexpected EOF encountered in BCP data-file.
bcp copy in failed

2nd Error:
Code:
bcp $db..table_name in vrs_temp.txt -U$DBLogin -PPASSWD -S$DBName -c -t\;


The error I got was :
Code:
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.

Thanks.




Moderator's Comments:
Mod Comment Please use CODE tags - for data as well - as required by forum rules!
And, don't (over)use text colouring.

Last edited by RudiC; 10-02-2018 at 07:47 AM.. Reason: Added CODE tags.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Data transfer from DB2 to Sybase using Perl?

Hi, Good Morning everybody. I need to write a perl script which will get some data from DB2 table and then put it into Sybase table. I have the experience in Oracle and Unix but new to these perl, DB2 and Sybase technologies. Appreciate if any one can suggest with a sample code. Thanks... (1 Reply)
Discussion started by: rajus19
1 Replies

2. UNIX for Advanced & Expert Users

Need a script for uploading data from unix box to mysql databse

how to upload system information(unix box) to MySql database's(running in another unix box) respective tables using a script only..i.e once script runs all the informations like hostid,hostna,disks,cpu etc get stored to respective tables of MySql database.... (2 Replies)
Discussion started by: shubhendu.pyne
2 Replies

3. Shell Programming and Scripting

get the data from sybase and append to the file

How to get the data from the sybase database and append the data obtained into the file. For example, I will get the filename 'temp' from the database. This filename is associated with the number 1.6... This number 1.6 needs to be copied into the file that matches the filename in the... (1 Reply)
Discussion started by: vinay123
1 Replies

4. Shell Programming and Scripting

fetching data from sybase using perl

How can I fetch and retreive data(of each result set) of multiple result set from sybase by calling a stored procedure using perl DBI module on an unix solaris environment????? Please help (3 Replies)
Discussion started by: wadhwa.pooja
3 Replies

5. UNIX and Linux Applications

Sybase help: Open client, bcp function

To begin: I use Linux The Problem: I need bcp functionality for scripts. Perl modules, such as Sybase:xfer, require ctlib which comes with Sybase Open Client. Talking with Sybase sales reps is an exercise in futility and hate. They know absolutely nothing about their own products and will... (0 Replies)
Discussion started by: Bubnoff
0 Replies

6. Shell Programming and Scripting

BCP command or module

Hi All, I am trying to bcp in data file into database. now there is bcp command available in unix and another perl module Sybase::BCP is also available. Can anyone please let me know if there is any limitations of bcp command in unix. whichever is good to use? (1 Reply)
Discussion started by: Deei
1 Replies

7. Shell Programming and Scripting

sybase::bcp

I am trying to bcp in using sybase::bcp perl module. I can find we can give user, pwd and server name in the parameters. How can I give database and table name? (1 Reply)
Discussion started by: Deei
1 Replies

8. Shell Programming and Scripting

bcp command help

Hi, When i execute a script in unix, the result i got is :: ./purgeErrors.ksh: bcp: not found What is the meaning of that output ? --- Aditya (9 Replies)
Discussion started by: chaditya
9 Replies

9. Shell Programming and Scripting

bcp error

hi all, Getting error while working on sybase::bcp as below, DB-Library error: Attempt to convert data stopped by syntax error in source field. Code is like, my $bcp_files = new Sybase::BCP $usr, $pass, $server; ---------- Post updated at 02:05 AM ---------- Previous update... (0 Replies)
Discussion started by: Deei
0 Replies
All times are GMT -4. The time now is 05:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy