Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select * Except?

Status
Not open for further replies.

gbaughma

IS-IT--Management
Staff member
Joined
Nov 21, 2003
Messages
4,773
Location
US
So, I have some tables that I regularly have to display *almost* all of the fields on.

Besides saying:

SELECT Field1, Field2, Field3... Field50 FROM...


... is there a way to:

SELECT * Except Field1 FROM

Something along those lines?



Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
Nope but in SQL Server you can just drag all the column names over from the browser in one step and then just delete the few you don't want from the list. Much faster and more accurate than typing them.

"NOTHING is more important in a database than integrity." ESquared
 
or right click on the table and choose
"Script Table as" then
"Select to" then
"New Query Editor Window" or "Clipboard"

Then edit the list.

Simi
 
Yeah... I was afraid that was going to be the answer.

I've started writing some rather complex (for me, anyway) SQL scripts.

Actually, I'm quite proud of myself.... I figured out how to do a stored procedure that I can pass parameters to that returns a pivot table.

I know... small-time stuff for some of the SQL Gurus here, but still, big stuff for me. ;)



Just my 2¢

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
Just out of curiosity... Are you using temp tables and joining on varchar columns?

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top