Microsoft
Software
Hardware
Network
Question : Can I use a sql query file (.sql) with bcp.exe?
I'm currently using the SQL server tool bcp.exe to export data from my sql database.
I have many queries saved in .sql files and would like to use them with bcp.exe
I'm currently using the following command:
bcp.exe "SELECT * FROM dbase.dbo.items'" queryout "c:\output\output.csv" -c -T -t;
But I would like to use something like:
bcp.exe "my_query.sql" queryout "c:\output\output.csv" -c -T -t;
Does anyone know how to achieve this?
I can't seem to find the correct notation/parameters.
Thanks in advance,
Clyde.
Answer : Can I use a sql query file (.sql) with bcp.exe?
I started using SQLCMD instead.
I could remove the headers with the -h-1 option.
Thanks for the replies anyway!
Random Solutions
DHCP in SBS 2008
The time on my Cisco Call Manager Express Router is wrong.
TS RemoteApp (Outlook 2007) traffic usage
How to use PIVOT function
Anyone know exactly triggers the "this program may have installed incorrectly" dialog?
JSF/Hibernate: Custom Validators
How to best format an SD Card or a Pendrive?
Exchange 2007 some groups get Calendar invites just as email
Windows Fax and Scan
Can't map a drive to a redhat server from Window7Pro?