This is a simple select query . I'm getting the amount
by companyID
. I have more than 200 companies.. when i run this for all company its throwing error as
Can't write; duplicate key in table 'C:\Windows\SERVIC~2\NETWOR~1\AppData\Local\Temp#sql1504_ebd2_12b'
but if run for 100 companies its working fine.. but this only happening in server in my local it's working fine
Below i have mentioned how im getting amount
by companyID
.
SELECT SUM( IF ( companyID = 'OC', CYC, 0 ) ) AS CY_OC,
SUM( IF ( companyID = 'OC1', CYC, 0 ) ) AS CY_OC1 ,
....200 More
FROM fntable
GROUP BY typeID