Re: BCP/OSQL

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



DEva (DEva@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
Thank you so much. My confusion is removed. Yet still you help required.
1.are there any workarounds to do that ( may be beyond osql)- can bcp
return values back to cmd fie so that I can capture them into a
variable.

Not sure what you mean. You can use BCP to export data to a file. If you
then want to read some that that data into variable in a CMD file you
would have to read the file. Sounds kludgy to me.

2. if i use dts can i run that package easily in command promt( not with
much ramp up)

There is command dtsrun for that purpose, I believe.


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: BCP format file
    ... There is no way you can do this with BCP, ... use the bulk copy API and bulk from variables. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • Re: ISQL is truncating contents of text field sent to text file.
    ... At first we were inserting each FOR XML to a table ... to find a single solution compatible with SQL Server 2k & 2k5. ... After asking on usenet, and being suggested to use BCP, we now ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: BCP cant export more than MAX_INT rows
    ... Still it's odd in this age of BIGINTs that bcp can only count to 2.1 ... 1000 rows successfully bulk-copied to host-file. ... I really hope that this happened with 32-bit SQL Server? ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • Re: How to detect BCP success/fail in batch file?
    ... fails (failure caused by PK constraint), the value is the same, 0. ... However I realised that I might not be using the latest version of BCP ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • Re: BCP/OSQL
    ... again through bcp. ... mulitple jobs are run for this entire ETL. ... SQL 2000) or SQL Server Integration Services. ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)