I know I've seen it in cases where columns were specified, but I can't tell
you specifics...it's possible there was a SELECT * from one table in the
same view. Specifying column names certainly reduces the problem, at any
rate, AND it gets rid of the annoying View designer bug of always using
Expr1, Expr2, etc., if there's a SELECT <anytable>.* anywhere within the
query. But the problem with not using SELECT * is that every time you add a
column to a table (which in some environments can be quite frequent), you
then have that many more Views that have to be manually updated to include
that column, instead of just pulling them all out with SELECT *.
As for using SPs, I'm pretty sure I've seen a similar problem with SPs (or
perhaps
functions?) when they're essentially replicating the functionality of a
view, but again, it's been too long, so I can't tell you specific
circumstances there.
In any event, the procedure you gave ought to come in handy; I'll give it a
try.
Thanks again, Sylvain,
Rob