| Author |
Message |
sbenson
Joined: 09 Jun 2009 Posts: 11
|
Posted: Fri Aug 27, 2010 7:40 pm Post subject: Once a PIVOT is used SQL Prompt will no longer respond |
|
|
Example
SELECT [A],[B],[C],[G],[P],[Q],[R],[U],[Z],[N]
FROM
(
SELECT ISNULL(iie.ovr_ma_pricing_lookup_status,'N') as ovr_ma_pricing_lookup_status, count(*) as records
FROM ItemMaestroProdDSS_8_27_2010_12_54_49_557.dbo.Input_Items ii
JOIN ItemMaestroProdDSS_8_27_2010_12_54_49_557.dbo.Input_Items_Extended iie ON ii.id = iie.input_item_id
WHERE ii.job_id = 3435
GROUP BY iie.ovr_ma_pricing_lookup_status
) AS source
PIVOT
(
SUM(records)
FOR ovr_ma_pricing_lookup_status IN ([A],[B],[C],[G],[P],[Q],[R],[U],[Z],[N])
) as pvt
If Ihit ctrl-space, all suggestions come up but there are no tables, just snippets. |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group