Tuesday, March 20, 2012

Save table fields to a text document

Hi. Need to know how to copy all the fields (not the data) of one table to a
text document using Enterprise Manager.
Thanks, alejandro.
...you can find the id of your table in sysObjects, and then "select * from
syscolumns where id=..."
to obtain a list that you can copy and paste to a text file.
Or you can define a DTS transformation between a SQL source (select top 0 *
from TableName) and a text file destination.Than click "Properties" button
in the text file destination and check "First Row has column names" option.
Francesco Anti
"alejandro" <alejandro@.discussions.microsoft.com> wrote in message
news:E5E25601-E0E9-4A2B-8CBB-6C4D2F92AFC8@.microsoft.com...
> Hi. Need to know how to copy all the fields (not the data) of one table
to a
> text document using Enterprise Manager.
> Thanks, alejandro.
|||Asked and answered in .programming -- please refrain from multi-posting.
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
"alejandro" <alejandro@.discussions.microsoft.com> wrote in message
news:E5E25601-E0E9-4A2B-8CBB-6C4D2F92AFC8@.microsoft.com...
> Hi. Need to know how to copy all the fields (not the data) of one table
to a
> text document using Enterprise Manager.
> Thanks, alejandro.
|||thats good, tnx
"Francesco Anti" wrote:

> ...you can find the id of your table in sysObjects, and then "select * from
> syscolumns where id=..."
> to obtain a list that you can copy and paste to a text file.
> Or you can define a DTS transformation between a SQL source (select top 0 *
> from TableName) and a text file destination.Than click "Properties" button
> in the text file destination and check "First Row has column names" option.
> Francesco Anti
> "alejandro" <alejandro@.discussions.microsoft.com> wrote in message
> news:E5E25601-E0E9-4A2B-8CBB-6C4D2F92AFC8@.microsoft.com...
> to a
>
>

No comments:

Post a Comment