Reply to Re: top n percentage

Your name:

Reply:


Posted by Erland Sommarskog on 06/07/05 02:17

[posted and mailed]

andrew (acoles@gmail.com) writes:
> My question therefore is does anyone know either
>
> (1) a way I can pass a variable (n) to these SELECT n PERCENT
> statements

Use SQL 2005. :-)

Dynamic SQL is probably the way to go, but there are a couple of
caveats. Before you start to use dynamic SQL all over town, you
might want to learn more about it. I have an article on my web site
about it: http://www.sommarskog.se/dynamic_sql.html.




--
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

[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

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