On Sun, 13 Jan 2008 07:46:39 GMT, "Kaitsu" <Ka****@luukku.comwrote:
>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