BCP Syntax | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

BCP Syntax

When I run the following from the command line (referencing SQL 2K):
bcp [cms user messaging archive].dbo.archivepurge out D:SQLDataTESTarchive.bcp -n -eD:SQLDataTESTerror.txt I get the following message:
Copy direction must be either ‘in’, ‘out’ or ‘format’.
usage: bcp {dbtable | query} {in | out | queryout | format} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n native type] [-c character type] [-w wide character
[-N keep non-text native] [-6 6x file format] [-q quoted
[-C code page specifier] [-t field terminator] [-r row terminator]
[-i inputfile] [-o outfile] [-a packetsize]
[-S server name] [-U username] [-P password]
[-T trusted connection] [-v version] [-R regional enable]
[-k keep null values] [-E keep identity values]
[-h "load hints"] Please help.

Use this :
bcp "[cms user messaging archive].dbo.archivepurge" out D:SQLDataTESTarchive.bcp -n -e D:SQLDataTESTerror.txt And files should be at your server. Rajeev Kumar Srivastava