"William (Bill) Vaughn" <billvaRemoveThis@nwlink.com> wrote in message
news:eN$fhnWPGHA.2628@TK2MSFTNGP15.phx.gbl...
No.
You can concatenate to force in more than one param. But remember,
multiple params -may- cause ambiguity. In your example (only sum British
pounds) I would use a CASE expression instead of trying to force
parameterization.
A more interesting multi-param example might be: SumOfCurrency(decimal
Amount, string CountryCode), which converts all of the amounts to US dollars
(or Euros, or some other common currency) internally before summing. That
one also wouldn't have ambiguity issues. But consider: Concatenate(string
theString, int Order), where Order=0 is alphabetically ascending and Order=1
is alphabetically descending. In this case, one row in a group could pass
in 0, while another passes in 1... That kind of ambiguity is important to be
aware of when trying to do this.
--
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
|