Gab Gennai
SSC Enthusiast
Points: 121
More actions
September 10, 2007 at 5:25 pm
#180643
Hi,
I'm new to SQL and I need to create a SP to copy the contents of a TABLE and dump it to a csv or txt file.
If the csv file is already there, then the data in my Table must be added and not overwritten.
Does anyone has a sample of this functionality ?
Piotr.Rodak
SSCrazy Eights
Points: 9376
September 12, 2007 at 5:00 am
#733051
look at the bcp utility in books on line. it has functionality you need.
...and your only reply is slàinte mhath
September 12, 2007 at 6:57 am
#733084
Thankyou. That was very usefull.
Here is the Syntax I used:
Running from a DOS prompt:
bcp DbName.dbo.tablename out Filename.txt-Slocalhost\SQLEXPRESS -T -c
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply