According to the error cpRow column is not present in the result set. You can validate by directly running the query (SELECT COUNT(1) as cpRow,publishedIdentity, publishedIdentityType, status, businessType FROM CP WHERE publishedIdentity= 'ABCD'
) in the database with the given input RCPID=ABCD