-
BCP usage ???
hi there,
i need to transfer the data off a query output to a txt file in the same order as it prints. i have tried using the command
eg.
exec bcp "SELECT au_fname, au_lname FROM pubs..authors ORDER BY au_lname" queryout Authors.txt -c -Sservername -Usa -Ppassword
this is exactly what i used replacing the appropriate parameters, but it gave me a "syntax error near queryout"
PLEASE advice what is wrong or sugest the best method to achieve the same.
Any help would be appretiated.
Thanks,
c: )
-
BCP usage ??? (reply)
run this query from Command prompt. The bcp.exe is located
under mssql7inn folder.
or use
XP_cmdshell to run from query analyser.
-MAK
------------
ccv at 5/9/01 8:50:33 AM
hi there,
i need to transfer the data off a query output to a txt file in the same order as it prints. i have tried using the command
eg.
exec bcp "SELECT au_fname, au_lname FROM pubs..authors ORDER BY au_lname" queryout Authors.txt -c -Sservername -Usa -Ppassword
this is exactly what i used replacing the appropriate parameters, but it gave me a "syntax error near queryout"
PLEASE advice what is wrong or sugest the best method to achieve the same.
Any help would be appretiated.
Thanks,
c: )
-
BCP usage ??? (reply)
thanks Mak, but i figured it out the moment i posted my message.
c: )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|