0

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
Asad Ali Choudhry
  • 4,985
  • 4
  • 31
  • 36
Shahmee
  • 299
  • 1
  • 2
  • 16

1 Answers1

0

maybe this help? What is maximum query size for mysql?

SHOW VARIABLES LIKE 'max_allowed_packet';