Link to home
Start Free TrialLog in
Avatar of chokka
chokkaFlag for United States of America

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of Mark Wills
Mark Wills
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chokka

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
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 ?
Avatar of chokka

ASKER

Incorrect syntax near queryout - This has nothing to do with folder path permission
Avatar of chokka

ASKER

I tested the syntax in SQL 2012 and SQL 2008, I get incorrect syntax
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Chokka,

Any more information to share ? Questions ? Error Messages ?