Reply to Re: SQL Views - embedded view work-a-rounds

Your name:

Reply:


Posted by Erland Sommarskog on 07/12/07 08:40

(colabus@gmail.com) writes:
> I've been asked to re-write a sql view. The view itself contains
> several calls to other views (embedded). Is there a way to get around
> using embedded views. I've written the same query up using temp.
> tables but obviously temp. tables can't be used in views?
>
> Is there any special things I should be looking for?

You could always incorporate the view definition directly into the
query that composes the view, and take care to exclude columns or
tables that are not relevant for the view. If you feel that temp tables
makes the query more efficient, you could make the view a multi-statement
function.

Without knowledge about the views, and why you have been asked to rewrite
it, it's difficult to give a very exact answer.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original 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

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