About
Pricing
Community
Teams
Start Free Trial
Log in
chokka
asked on
1/20/2018
SQL Bulk Copy Export - Output to Export file, Tab delimiter
Having a trouble on doing bulk copy export - I want to export a table data to text file output having tab as delimiter.
bcp "SELECT * FROM DatabaseLog" queryout TestingBulkCopy.txt -c -T
I am trying either on SQL 2008 or SQL 2012.
Microsoft SQL Server
Microsoft SQL Server 2008
SQL
7
2
Last Comment
Mark Wills
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mark Wills
1/20/2018
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
chokka
1/20/2018
ASKER
Thank you ...!!
When i tried by passing with the folder path - I am getting syntax error - I am running the query in SQL 2012
bcp "SELECT * FROM DatabaseLog" queryout "C:\TestingBulkCopy.txt" -t\t -c -T
Mark Wills
1/20/2018
possibly dont have write access to the root of C:\
try creating a folder first and if need be right click to go into properties / security and allow access.
what was the error ?
chokka
1/21/2018
ASKER
Incorrect syntax near queryout - This has nothing to do with folder path permission
Your help has saved me hundreds of hours of internet surfing.
fblack61
chokka
1/21/2018
ASKER
I tested the syntax in SQL 2012 and SQL 2008, I get incorrect syntax
SOLUTION
Mark Wills
1/21/2018
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Mark Wills
1/22/2018
Hi Chokka,
Any more information to share ? Questions ? Error Messages ?
When i tried by passing with the folder path - I am getting syntax error - I am running the query in SQL 2012