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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exclude a column from query 1

Status
Not open for further replies.

ns130

Programmer
Jan 17, 2005
11
AT
Hi,

I have a query which runs against a set of columns which changes quite often. I would like to run a SELECT * FROM XYZ, but exclude certain named columns, is this possible?

Thanks
 
As a matter of fact: no, that is not possible.

But:

ALWAYS specify the columns you want, ALWAYS.

Otherwise you are asking for trouble sooner or later.
It is just the better style and saves you some problems like network traffic overhead or, when changing the DLL (Schema), always having to change your code as well.

Also: you know better what you are doing and you are actually thinking about which values you really need.


Juliane
 
Thanks Juliane,

I didn't think there would be. I got round this by returning all the rows and hiding the ones I don't need in the datagrid (working in an ASP.NET project). It is just a small internal project and I am in control of the data so returning everything isn't a problem,

Thanks for your response
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top