var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Is there a way to include multiple aggregations in one pivot statement?
) as t
sum(balance) for status_cd in
) as p
But I'd also like to get a count for the pivot column. Can anyone point me in the right direction. Thank you.
Why not just use SUM and COUNT? If this is a simplified example, you'll probably have to use CASE statements and forgo PIVOT altogether. That's not all that bad if you've got a small number of pivoted columns.
Granite Peak Systems
Log in with your username and password
Forgot your password?
Subscribe to dBforums Brief to receive special offers from dBforums partners and sponsors