DB2 - Problem with using LIKE predicate

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maitreyisamanta
    New Member
    • Nov 2007
    • 1

    DB2 - Problem with using LIKE predicate

    Hi - I have a query like this:

    Code:
    REPORT_TYPES LIKE '%ABC - '||(SELECT RES.RESOURCE_TYPE FROM TBL_REPORT REPT, TBL_RESOURCE_REQUEST RES WHERE REPT.REPORT_ID = ' ' AND REPT.STATUS = 'A' AND RES.RESOURCE_REQUEST_ID = REPT.GLOBAL_REPORT_ID)||'%'
    This query is failing bcos of the select query being used in the operand of the LIKE predicate.

    Anyone have an idea how to workaround this?

    Thanks,
    Maitreyi
    Last edited by eWish; Dec 1 '07, 10:51 PM. Reason: Added Code Tags
Working...