Report Definition is throwing SQL exception
Hi,
I have a db table with column firstname, nationality. And in pega class using inherit properties, I am using First_name with external mapping for property First_name to DB column firstname. However when I am running report definition as stand alone we are getting exception. Weirdly in pega generated query we are seeing Case when statement as shown below, I want understand in which scenario pega will form a query like this
SELECT "PC0"."individualid" AS "IndividualID" , "PC0"."l10_customerid" AS "CustomerID" , "PC0"."accountid" AS "AccountID" , "PC0"."rolename" AS "RoleName" , "PC0"."email" AS "Email" , "PC0"."primarymobilenumber" AS "PrimaryMobileNumber" , CASE WHEN ( NOT ( "PC0"."first_name" = ? ) ) THEN rpad(? ,length("PC0"."first_name"),? ) ELSE "PC0"."firstname" END AS "FirstName" , "PC0"."lastname" AS "Last_Name" , "PC0"."middlename" AS "MiddleName" , "PC0"."gender" AS "Gender" , "PC0"."ismarketingoptincall" AS "IsMarketingOptInCall" , "PC0"."ismarketingoptinemail" AS "IsMarketingOptInEmail" , "PC0"."ismarketingoptinsms" AS "IsMarketingOptInSMS" , "PC0"."id" AS "pyID" FROM schema.table(I altered here) "PC0" WHERE ( "PC0"."rolename" LIKE ? AND "PC0"."accountid" = ? )
Regards,
Raja