|
Posted by Roy Harvey (SQL Server MVP) on 01/13/08 08:58
On Sun, 13 Jan 2008 07:46:39 GMT, "Kaitsu" <Kaitsu@luukku.com> wrote:
>How can I get data from table to text-file by SQL-commands, for example
>SELECT * FROM Table. Result to text-file Table.txt.
This must be executed at a command prompt, not as a SQL query.
bcp.exe "select * from master..sysdatabases" queryout
sysdatabases.txt -c -T -t\t -r\n
There are many other parameters to consider, in particular -S to
specify the server, and -f to specify a format file. Read about it in
Books On Line.
Roy Harvey
Beacon Falls, CT
Navigation:
[Reply to this message]
|