>Hi. Please note that I am in 7.0. Is there a way to exclude a field from a sql (without individually including all the other fields.)?
>I have modified an existing app and now Fox is asking for "_a", "_b", etc.
Sometimes that sort of thing arises from joining two tables and selecting all columns from both e.g.
SELECT ;
FROM Table1 ;
INNER JOIN Table2 ;
ON Table2.ID_Fld = Table1.ID_Fld
SELECT ;
Table1.* ;
, Table2.ColumnIWant1 ;
, Table2.ColumnIWant2 ;
, ...
FROM ... as above
With the above you still end up specifying individual columns for one of the tables. But, in many cases you need most or all of the columns from one table, and maybe only a few from the other so you can use the * on the most, and individually include from the few.
IMO it's not an inherently bad idea to individually name columns you want, rather than using *. It fits with the idea of only pulling across the columns you actually need - which can be important for slow connections or heavily loaded back-end servers. One downside to doing it is it's a little harder to code up-front, and may require more maintenance if table structures change.
If you find you're frequently using a query with a lot of individually named columns, you could consider creating a view for that. A view can help with maintenance as well.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up