2012年2月25日星期六

bcp command to give colums

Can someonte tell me that if i
bcp bda..mytable out c:\discounts.xls -c -p , how can I put the first row as my column names since I get only dataIt won't...but there are other ways aroung it..you can use query out and supply a union like

SELECT 'col1','col2','col3'...
UNION ALL
SELECT Col1,col2,col3 FROM myTable99

Just need to make sure you're dfatatypes are converted to varchar

What about DTS to an EXCEL, or csv?|||Thanks very much it worked like magi

Originally posted by Brett Kaiser
It won't...but there are other ways aroung it..you can use query out and supply a union like

SELECT 'col1','col2','col3'...
UNION ALL
SELECT Col1,col2,col3 FROM myTable99

Just need to make sure you're dfatatypes are converted to varchar

What about DTS to an EXCEL, or csv?

没有评论:

发表评论