|
I want to extract the data for selected months in csv format, but the thing is, i dont need all the fields to be in my output file, just want to extract for some selected fields. For eg: I need fname, lname, mobile, emailid I am using SQL 2005.
(comments are locked)
|
|
If you are using some external tool to make the CSV file and you can not (why not?) specify the specific fields you need then you could make a VIEW and query that instead:
(comments are locked)
|
|
or use bcp command and select the required columns exec xp_cmdshell 'bcp "select col1,col2..colN from dbname..table" queryout "C:\test.csv" -T'
(comments are locked)
|

