Showing posts with label tsql. Show all posts
Showing posts with label tsql. Show all posts

Sunday, March 25, 2012

Exporting Data to File using TSQL

Does anyone know of a way to do this without using DTS? Simply by
SELECT * FROM <table>John,
Something like this:
EXEC master..xp_cmdshell 'osql -E -dPubs -Q"select * from
authors" -o"C:\authors.txt"'
or BCP (OUT)
HTH
Jerry
"John Barr" <JohnBarr@.discussions.microsoft.com> wrote in message
news:4E489E6F-2CE8-416B-AAF3-A73349B7092C@.microsoft.com...
> Does anyone know of a way to do this without using DTS? Simply by
> SELECT * FROM <table>
>

Sunday, March 11, 2012

export to unicode textfile with tsql

Hello,
is it possible to write the he result of query to a unicode textfile instead
of an ansi textfile. i need this because i want to generate udl files on the
fly.
any help appriciated.
GerbenHi
You don't say how the file is created but...
osql has a -u parameter that creates a unicode file.
John
"gerben" wrote:

> Hello,
> is it possible to write the he result of query to a unicode textfile inste
ad
> of an ansi textfile. i need this because i want to generate udl files on t
he
> fly.
> any help appriciated.
> Gerben