Example
SELECT [A],,[C],[G],[P],[Q],[R],,[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],,[C],[G],[P],[Q],[R],,[Z],[N])
) as pvt
If Ihit ctrl-space, all suggestions come up but there are no tables, just snippets.
SELECT [A],,[C],[G],[P],[Q],[R],,[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],,[C],[G],[P],[Q],[R],,[Z],[N])
) as pvt
If Ihit ctrl-space, all suggestions come up but there are no tables, just snippets.