sql_prodigy
SSCrazy
Points: 2254
More actions
April 16, 2009 at 4:19 am
#130124
hi everyone, i need help with a sql query that exports results to a csv file.
just a simple 'select * from table1'
busy writing a stored proc that will do this and email the file.
Vijaya Kadiyala
SSCrazy Eights
Points: 9119
April 16, 2009 at 8:51 am
#978928
use BCP
exec master..xp_cmdshell 'bcp database.owner.tablename out outputfilename -c -t "," -S servername -T'
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply