Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

bcp command problem

2 posts in Windows NT Last posting was on 2001-02-28 07:21:17.0Z
Vasudev Posted on 2001-02-28 06:52:41.0Z
From: "Vasudev" <>
Subject: bcp command problem
Date: Wed, 28 Feb 2001 12:22:41 +0530
Lines: 20
Organization: Advanta India Limited
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Message-ID: <>
Newsgroups: sybase.public.sqlserver.nt
Path: forums-1-dub!!
Xref: forums-1-dub sybase.public.sqlserver.nt:1174
Article PK: 1088628

i wanted to copy data into files using bcp command

i tried both the commands given below

Com 1 : bcp inv_txn_details out 'c:\inv_txn_details'
Com 2 : bcp inv_txn_details out c:\inv_txn_details

It's giving error as [Both in isql and SQL Advantage]

Server Message: Number 179, Severity 15
Can't use the OUTPUT option when passing a constant to a stored procedure.

Execution Time 0.
SQL Server cpu time: 0 ms. SQL Server elapsed time: 0 ms.

Thanx for any help

Stefan_Giuros Posted on 2001-02-28 07:21:17.0Z
From: Stefan_Giuros
Date: Wed, 28 Feb 2001 02:21:17 -0500
Newsgroups: sybase.public.sqlserver.nt
Subject: Re: bcp command problem
Message-ID: <990E7A3B6AA26005002866CD85256A01.0027CB1885256A01@webforums>
References: <>
Lines: 36
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!!!!news
Xref: forums-1-dub sybase.public.sqlserver.nt:1172
Article PK: 1088626


BCP is an external tool, not a SQL command. Apparently you launched the two
commands from within isql or SQL Advantage.

You should launch the bcp tool from the command line.

The syntax is:

usage: bcp [[database_name.]owner.]table_name[:slice_number]
{in | out} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n] [-c] [-t field_terminator] [-r row_terminator]
[-U username] [-P password] [-I interfaces_file]
[-S server] [-a display_charset] [-q datafile_charset]
[-z language] [-v]
[-A packet size] [-J client character set]
[-T text or image size] [-E] [-g id_start_value] [-N]
[-M LabelName LabelValue] [-labeled]
[-K keytab_file] [-R remote_server_principal]
[-V [security_options]] [-Z security_mechanism] [-Q]

so your command should look like:
C:\> bcp [database]..inv_txn_details out c:\inv_txn_details -c
-S[server_name] -U[user_name] -P[password]
where -c stands for 'character format'. You may use -n for 'native format'
or a format file. Check Sybase documentation for more information about

You should replace items into square brackets with your values.

Hope to help,