Hi, Maybe this problem has been beaten to death. However, I'm looking for a viable solution to a crosstab query problem. Basically, here's the SQL:
TRANSFORM Count([ANCILLARY MASTER].NAME) AS CountOfNAME
SELECT [ANCILLARY MASTER].COUNTY_NAME, [ANCILLARY MASTER].SPECIALTY
FROM [ANCILLARY MASTER]
GROUP BY [ANCILLARY MASTER].COUNTY_NAME, [ANCILLARY MASTER].SPECIALTY
PIVOT [ANCILLARY MASTER].PRODUCT;
Basically, I am counting ancillary providers by specialty (in our world, dialysis, home health, home infusion, etc) by county and doing unique counts. Problem is, the cross tab gives me a sum total of the counts where I want a unique count.
I get results like:
Dialysis Product
Allegheny County HMO PPO POS Total
3 3 3 9
However, I want the total to be like 3 or whatever the unique count is regardless of the product.
Thank you Thank you Thank you for any help
TRANSFORM Count([ANCILLARY MASTER].NAME) AS CountOfNAME
SELECT [ANCILLARY MASTER].COUNTY_NAME, [ANCILLARY MASTER].SPECIALTY
FROM [ANCILLARY MASTER]
GROUP BY [ANCILLARY MASTER].COUNTY_NAME, [ANCILLARY MASTER].SPECIALTY
PIVOT [ANCILLARY MASTER].PRODUCT;
Basically, I am counting ancillary providers by specialty (in our world, dialysis, home health, home infusion, etc) by county and doing unique counts. Problem is, the cross tab gives me a sum total of the counts where I want a unique count.
I get results like:
Dialysis Product
Allegheny County HMO PPO POS Total
3 3 3 9
However, I want the total to be like 3 or whatever the unique count is regardless of the product.
Thank you Thank you Thank you for any help