Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2008

    Unanswered: The 'LIKE' operator

    I have a DB2 SQL statement as below;

    SELECT Acct_ID
    FROM AcctTbl
    WHERE Acct_Name LIKE :ws-Acct-Name

    The above statement working fine with SPUFI but not returning any matching
    rows in my application program. ws-Acct-Name has a value of
    'NATASHA%' in both cases.

    Do I have to make any changes to the SQL while I use the LIKE operator in the application program ....?

    Thanks - N.

  2. #2
    Join Date
    Feb 2008
    What is a data type of ws-Acct-Name?
    If it's fixed length string longer than 8, could you think that was interprited as LIKE 'NATASHA% '
    (leading characters are 'NATASHA' and trailing character(s) are ' ')?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts