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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Exporting data from sql server to text file format

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-01-31 : 09:02:18
Suresh writes "Senario
I want to export few records of a table depending on some criteria to a txt file for eg: selecting itemcode, itemname from itemmaster table where the current qty is less than 10, i want to export only those few records

Wht i tried
I tried bcp with queryout option. but i got errors in it while i execute the following qry.
bcp SELECT au_fname, au_lname FROM authors ORDER BY au_lname queryout 'c:\Authors.txt' -c -S'qt-5' -Usa -P''
error i got: Line 1: Incorrect syntax near 'queryout'.

i tried without 'queryout' in bcp then it says strings cannot be passed to store procedures. like tht

pls help"

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-01-31 : 09:23:19
http://www.sqlteam.com/item.asp?ItemID=4722

Go to Top of Page
   

- Advertisement -