You are here: Re: Problem when changing Views « MsSQL Server « IT news, forums, messages
Re: Problem when changing Views

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация