0 Replies Latest reply: Feb 19, 2013 12:52 AM by 991848 RSS

    Problem in sql statement

    991848
      Good morning ,

      I have a problem in an SQL statement... A part of the statement is as follows

      .
      .
      .
      and td.role_id =
      (select to_char(rtrim(ci_lookup.DESCR))
      from ci_lookup
      where rtrim(ci_lookup.field_name)= 'CM-WO-LEGAL'
      and ci_lookup.language_cd='ENG')
      .
      .
      .

      The inner selection statement returns the value 'WO-LEGAL' but the entire sql statement returns nothing.
      Now if I change the above section with

      .
      .
      .
      and td.role_id = 'WO-LEGAL'
      .
      .
      .

      I get results.

      Any ideas why this is happening ?