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
select * in view
Oracle SQL GROUP BY
Can I create a timeline using HTML? ASP.NET? Word?
Show all the table row data linked to the result of a query selection in the mainform
How do I find out what version of AjaxControlToolkit is installed on my server?
Do Visual Basic require a license ?
I can't seem to add separators or other items to my bookmark folder in Firefox
WP Loop: Incorrect Number of Posts on Home Page - How to Reset Loop Counter
include files not found
Syntax to use user defined criteria in update routine