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
Looking for bicycle cadence indicator using colored LEDs to show speed
What is the best way to have a website accessible to iPhones?
Change additional 32-bit printer drivers - SBS 2008
To clear or not to clear ARP cache
Remove Hyperlink
php session variable lifecycle
Form Load Failed in my organisational form library
Subnets
Programmatic Access Security (Outlook 2007)
Need to Get Windows XP Pro booting - OS Must be missing a boot up file