You are here: Re: Pros / Cons to this approach « MsSQL Server « IT news, forums, messages
Re: Pros / Cons to this approach

Posted by Erland Sommarskog on 11/04/05 01:06

(JayCallas@hotmail.com) writes:
> I have a requirement where I need to perform a query for position
> information. But for some types of entries, I need to "expand" the row
> to include additional position rows. Let me explain with an example:
>
> An index is a security that is made up of components where each
> component has a "weight" or a number of shares. So if I have 1 share of
> the index, I have X shares of each component.

Now, this sounds funny to me, because in our system you can also define
indexes. However, indexes are virtual - you can never have a position
in an index directly. (But you can have a position in a derivative that
has the index as its contract base.)

> Is a UNION the best way to perform the query. What are the pros and
> cons? What, if any, is a better way?

There might be other alternatives, but I think the UNION query is fine.
Since I was given this query in my lap, I ran out of fantasy of trying
something else.




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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

 

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

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