Re: excluding fields in SELECT statement



ric (rtavert@xxxxxxxxx) writes:
>>>you can use Query Analyzer to generate a SELECT statement for the desired
>>>view...
>
> Is this something other than dragging over columns into the SELECT
> statement you're building?

I guess this is what Dan had in mind. Myself, when I need to do this, I
usually do a SELECT * FROM tbl WHERE 1 = 0 in text mode, copy and paste
the headers into Textpad, where I have a macro so I with a keypress can
replace the spaces with commas, and then cut and paste back.

There is a new product PromptSQL which claims to provide intellisense to
Query Analyzer. Since I am not fond of intellisense myself, I have not
tried it. But somehing that expands a * would be a great thing for such a
tool - maybe they have it?


--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

.



Relevant Pages

  • Re: excluding fields in SELECT statement
    ... > I guess this is what Dan had in mind. ... Dan Guzman ... SQL Server MVP ... > Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: System Administrator Implied Permissions
    ... >> Hi Dan, ... >> Now, given this, why does SQL Server ... However, these logins were not ... Other sysadmin role members have the ...
    (microsoft.public.sqlserver.security)
  • Re: System Administrator Implied Permissions
    ... member of the dbo group and you are automatically given ... Now, given this, why does SQL Server ... Much Thanks Dan. ...
    (microsoft.public.sqlserver.security)
  • Re: moving data in a database to another file on a SAN
    ... Moving SQL Server Databases ... > Issues When a Database Is Moved Between SQL Servers ... > "Dan D." ...
    (microsoft.public.sqlserver.server)
  • Re: database owner
    ... Thanks for all your help Dan, ... it can access the SQL Server as a sysadmin role member by default. ... And I don't have to make an own login for the backupexec account on the database, as long as it is a member of the dedicated admins group I made on the database that are a part of the system administrator role? ... I do not have a dedicated login for this user on the server, but this account is member of a administrators group in the sql server and this group is dedicated at dbo on all databases and belongs to the sysadmin servers role. ...
    (microsoft.public.sqlserver.security)