Re: Generate Column List

From: DHatheway (dlhatheway_at_mmm.com.nospam)
Date: 06/23/04


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
>
>



Relevant Pages

  • Re: stupid ssis question
    ... Ok So you know that in MSDB in SQL Server 2005 you have SSIS packages? ... If that is the case then register in object browser the Integration Services service not the database engine. ...
    (microsoft.public.sqlserver.dts)
  • Re: How to access SQL Server 2005 with Query Analyzer (SQL 2000)
    ... SQL Server Documentation Team ... This posting is provided "AS IS" with no warranties, and confers no rights ... > I'm not able to run queries on a MS SQL Server 2005 using the Query ... > 2005 server and display all objects in the Object Browser but can't run a ...
    (microsoft.public.sqlserver.clients)
  • sql editor with code completion
    ... Can somebody please recommend a good oracle sql editor with code ... The main feature I am looking for is: ... an object browser (view sql table schema, functions, and procedures ...
    (comp.databases.oracle.tools)
  • RE: Enterprise Manager Shortcuts for Remote Servers
    ... If you are using SQL ... Server 2000 client, you can use Object Browser to access all the database ...
    (microsoft.public.sqlserver.server)
  • Re: Copying rows into the same table
    ... record the same data twice. ... > written the copy routine, so I'd like to be able to copy all existing ... Using the Object Browser in Query Analyzer you can drag the column list into ...
    (microsoft.public.sqlserver.programming)