Hi: I am having a situation using .NET’s Table Adapter’s Configuration Wizard when designing DB2 SQL statements containing a CASE expression within it.
I was previously using the ODBC provider method for DB2; once I changed to the DB2 Provider for .NET every single Query that uses a CASE expression stopped parsing, so I am not able to modify or recreate them. I’m not even able to create new ones.
Sample Query:
SELECT ORGANIZATION_CODE,
CASE WHEN COUNTRY_CODE = 'NY' THEN 'NEW YORK'
WHEN COUNTRY_CODE = 'PR'THEN 'PUERTO RICO'
ELSE 'EXTERIOR'
END AS SOURCE
FROM SIUSER.HOLIDAYS_TABLE
If I eliminate de CASE Expression it would parse, execute and have no problem at all.
SELECT ORGANIZATION_CODE,
COUNTRY_CODE
FROM SIUSER.HOLIDAYS_TABLE
Any suggestions would be appreciated!!,
Best regards,
Eduardo
I was previously using the ODBC provider method for DB2; once I changed to the DB2 Provider for .NET every single Query that uses a CASE expression stopped parsing, so I am not able to modify or recreate them. I’m not even able to create new ones.
Sample Query:
SELECT ORGANIZATION_CODE,
CASE WHEN COUNTRY_CODE = 'NY' THEN 'NEW YORK'
WHEN COUNTRY_CODE = 'PR'THEN 'PUERTO RICO'
ELSE 'EXTERIOR'
END AS SOURCE
FROM SIUSER.HOLIDAYS_TABLE
If I eliminate de CASE Expression it would parse, execute and have no problem at all.
SELECT ORGANIZATION_CODE,
COUNTRY_CODE
FROM SIUSER.HOLIDAYS_TABLE
Any suggestions would be appreciated!!,
Best regards,
Eduardo