![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is there a switch that can be used with bcp to include the column names as part of the resulting file from a queryout command ? Thanks in advance |
#3
| |||
| |||
|
|
Use OSQL instead. AMB "David Franklin" wrote: Is there a switch that can be used with bcp to include the column names as part of the resulting file from a queryout command ? Thanks in advance |
#4
| |||
| |||
|
|
I am playing around with OSQL and I can't get it to work. Here is what I am doing in bcp : bcp "select * from database..view" queryout c:\test.csv -c -R -t "," -U user -P password I get everything I need except the column names. If you can get me pointed in the right direction using OSQL, I would greatly appreciate it. Thanks "Alejandro Mesa" <AlejandroMesa (AT) discussions (DOT) microsoft.com> wrote in message news:778E1F30-B336-4F5B-8E96-CB3B48F6E5C2 (AT) microsoft (DOT) com... Use OSQL instead. AMB "David Franklin" wrote: Is there a switch that can be used with bcp to include the column names as part of the resulting file from a queryout command ? Thanks in advance |
#5
| |||
| |||
|
|
Example: osql -S server_name -E -Q "select orderid, orderdate from dbo.orders" -d northwind -s "," -o "c:\temp\test.txt" AMB "David Franklin" wrote: I am playing around with OSQL and I can't get it to work. Here is what I am doing in bcp : bcp "select * from database..view" queryout c:\test.csv -c -R -t "," -U user -P password I get everything I need except the column names. If you can get me pointed in the right direction using OSQL, I would greatly appreciate it. Thanks "Alejandro Mesa" <AlejandroMesa (AT) discussions (DOT) microsoft.com> wrote in message news:778E1F30-B336-4F5B-8E96-CB3B48F6E5C2 (AT) microsoft (DOT) com... Use OSQL instead. AMB "David Franklin" wrote: Is there a switch that can be used with bcp to include the column names as part of the resulting file from a queryout command ? Thanks in advance |
#6
| |||
| |||
|
#7
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |