|
Posted by Jim Devenish on 07/06/06 08:57
Erland Sommarskog wrote:
> You should stop using SELECT *. SELECT * is great for ad-hoc queries,
> but it does not belong in production code. One reason for that is what
> you experienced. Had you listed the columns explicitly, you would still
> have gotten an error, but at least the error would have been apparent.
>
> If you insist on using SELECT *, you need to learn to use sp_refreshview,
> because you will need it a lot.
>
Thank you for your warning about the use of Select * . I expect that
there has been extensive discussion elsewhere as to why 'it does not
belong in production code' but I was unaware of it. Perhaps you can
point me in the right direction.
However you say that I would have still got an error had I listed the
columns explicitly. So I return to my orginal question: why does the
new view produce the expected output from the Design View but not from
'Return all rows'?
How and where do I use sp_refreshview?
Navigation:
[Reply to this message]
|