x

SQL 2000 - BCP UTILITY

Friends,

I need to store in a CSV file the result of a procedure.

I am using the following command:

Exec master..xp_cmdshell 'bcp "EXEC Database.dbo.StoredProcedure" queryout "\\workstatio\c$\usuario.csv" -F1 -SServername -E -c'

I need the result to be separated by column. How can I do this?

more ▼

asked Mar 03, 2010 at 11:33 AM in Default

avatar image

Felipe
262 23 23 26

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

If you mean separated by comma, then use the '-t ,' option.

The default without specifying is tab - same as saying '-t \t'

MSDN BOL reference here

more ▼

answered Mar 03, 2010 at 11:48 AM

avatar image

Kev Riley ♦♦
64k 48 61 81

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x501
x49

asked: Mar 03, 2010 at 11:33 AM

Seen: 1442 times

Last Updated: Mar 03, 2010 at 12:00 PM

Copyright 2016 Redgate Software. Privacy Policy