Re: Generate Column List
From: DHatheway (dlhatheway_at_mmm.com.nospam)
Date: 06/23/04
- Next message: Tester: "How to extract only the time or date from datetime"
- Previous message: Andrew J. Kelly: "Re: SQL Server performance"
- In reply to: Keith: "Generate Column List"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 23 Jun 2004 10:38:28 -0500
Using the object browser window in SQL Query Analyzer may help you. Try it:
- Start Query Analyzer, connect to your database server.
- Click from the Menus: Tools | Object Browser | Show/Hide (or just hit F8).
This brings up the Object Browser pane.
- Navigate database object tree in Object Browser pane to table of interest.
- Right-click on that table and pick Script Object to Clipboard as Select |
Insert | Update | Delete as appropriate.
- Click in your query window and hit Control/V to paste the SQL statement.
You get a complete SQL statement with placeholders for things you will need
to supply.
A friend pointed this out to me a while back. Looks like there may be other
tricks available via the templates tab but I've not explored the
possibilities.
"Keith" <@.> wrote in message news:uuNjPFQWEHA.3664@TK2MSFTNGP12.phx.gbl...
> Is it possible to generate a list of all column names in a table seperated
> by a comma?
>
> I want to do this because I am creating some triggers on a large number of
> tables, with a large number of fields in each, and rather than type out my
> list of fields I wanted to generate a list so I could just copy/past into
my
> triggers.
>
> Thanks
>
>
- Next message: Tester: "How to extract only the time or date from datetime"
- Previous message: Andrew J. Kelly: "Re: SQL Server performance"
- In reply to: Keith: "Generate Column List"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|