bcp error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting bcp error
# 1  
Old 09-13-2010
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,
Code:
my $bcp_files = new Sybase::BCP $usr, $pass, $server;



---------- Post updated at 02:05 AM ---------- Previous update was at 01:24 AM ----------

hey, got the solution but cant understood....

My data is,
Code:
 col1|col1|status|2010/09/13 01:38:02|IST

now last 2 columns are swapping their position while doing bcp... any clues ?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

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): 22055;20181001 21088;20181001 93840;20181001 30990;20181001 50990;20181001 50950;20181001Created a... (4 Replies)
Discussion started by: Suresh
4 Replies

2. UNIX for Dummies Questions & Answers

BCP with cat not working

Hello, I am facing a typical problem in my code . If I run bcp alone it is working fine if I run BCP with cat it is not working . Not able to find where the error is occurring in cat . Can you please help bcp ${_DBName}..logfile in ${_currdate} -f$PANEL_HOME/format/logfile.fmt -Q -U$_UserId... (11 Replies)
Discussion started by: arunkumar_mca
11 Replies

3. Shell Programming and Scripting

Execute bcp commands from SQSH

Hi I am using SQSH to construct 10-20 bcp commands that I would like to execute. I can write all to file and open and do a for loop in the file. My question is if there is some way I can skip the file part and somehow pipe out the resulting dataset from SQSH and execute those directly? My... (1 Reply)
Discussion started by: bicm_mike
1 Replies

4. 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

5. 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

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. 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

8. UNIX for Advanced & Expert Users

to create format file for bcp in

I want to create the format file for bcp in a file to the table. My Versions are: Unix: Sun OS, DB: Sybase. How can i create the format file. Is there any way to create the format by bcp command or some system sp. Please help. (3 Replies)
Discussion started by: Arunprasad
3 Replies

9. UNIX for Advanced & Expert Users

bcp core dump on Solaris 5.7

I am importing data into a new database using bcp (ASE 11.0) on Solaris 5.7. I keep getting a core dump error when my ksh script attempts to load one table. All other tables load fine. If I load the table directly from the command line without a script the table loads fine. Does anybody know... (1 Reply)
Discussion started by: gerald_agoi
1 Replies
Login or Register to Ask a Question
datacopy(1)							 FreeTDS Utilities						       datacopy(1)

NAME
datacopy - move table data between two servers SYNOPSIS
datacopy { -t | -a | -c owner } [-b batchsize] [-p packetsize] [-v] [-d] [-S server/username/password/database/table_or_view] [-D server/username/password/database/table] DESCRIPTION
datacopy is a utility distributed with FreeTDS. datacopy will move table data from one server to another without the need for intermediate files. datacopy is much faster and more efficient than is freebcp out/in. datacopy makes use of the db-lib bcp API built into FreeTDS. This API is also available to application developers. datacopy can be used to migrate data between Sybase ASE and SQL Server or vice versa. OPTIONS
-t Truncate target table before loading data. -a Append data to target table. -c owner Create the target table with the same schema as the source table. datacopy will submit a 'create table' command on the target server/database using the specified owner in the command, e.g. CREATE TABLE owner.table (...). -b batchsize The number of rows per batch of data copied. Each batch of data is effectively 'committed' to the database. The default is 1000. -p packetsize The number of bytes, per network packet, sent to and from the servers. Increased packet size can enhance performance. -v Produce verbose output, including diagnostic timings. -d Produce freetds TDSDUMP output. (Serious debug only!) -S server/username/password/database/table_or_view The connection information for the source server and the location/name of the table (or view) to be copied. If not specified, data- copy will prompt the user for the information. -D server/username/password/database/table The connection information for the destination server and the location/name of the target table. If not specified, datacopy will prompt the user for the information. SEE ALSO
freebcp(1), defncopy(1), bsqldb(1), tsql(1), FreeTDS User Guide. HISTORY
datacopy first appeared in FreeTDS 0.64. AUTHORS
The datacopy utility was written by Bill Thompson (thompbil@exchange.uk.ml.com). doc 13 November 2011 datacopy(1)