|
Posted by Hugo Kornelis on 02/28/06 23:51
On 28 Feb 2006 13:36:50 -0800, markc600@hotmail.com wrote:
>Try this
>
>SELECT Col1, SUM(Col2), MyFunc(Col3, Col4) AS 'MyResult'
>GROUP BY Col1, MyFunc(Col3, Col4)
More efficient to call the function just once per row:
SELECT Col1, SUM(Col2), MyResult
FROM (SELECT Col1, Col2, MyFunc(Col3, Col4) AS MyResult
FROM SomeTable) AS Der
GROUP BY Col1, MyResult
--
Hugo Kornelis, SQL Server MVP
Navigation:
[Reply to this message]
|