Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 BCP

Author  Topic 

abbikhan
Starting Member

26 Posts

Posted - 2011-06-10 : 01:19:38
bcp "SELECT * FROM AdventureWorks.HumanResources.Department" queryout "test.txt" -T -c


i m not getting whats wrong in it.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-06-10 : 01:53:10
We are not getting what the problem is.
Any error messages or what else is the problem?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

abbikhan
Starting Member

26 Posts

Posted - 2011-06-10 : 02:04:21
quote:
Originally posted by webfred

We are not getting what the problem is.
Any error messages or what else is the problem?


No, you're never too old to Yak'n'Roll if you're too young to die.



bcp "SELECT * FROM AdventureWorks.HumanResources.Department" queryout "D:\test.txt" -T -c

i am getting this error
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'queryout'.
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-06-10 : 02:50:07
Just a guess:
You are executing the posted statement in a query window.
The solution:
bcp is to execute in DOS box or using xp_cmdshell.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -