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
PHP Post
counts records in a query
Linux - auto log in to web site
Out of disk space > cannot uninstall programs
SEO Yahoo Directory, $299 a year, is it worth it? Will it increase a PR0 PR1 or PR2 a level?
Windows Batch File STDOUT to console and file
how do i configure notepad++ to run and compile C++ programs ?
Crystal Report Viewer - Export to/open a PDF after entering parameters
'Page cannot be displayed' until I hit enter twice
2008 TS apps run through 2008 RDS/TS