This discussion is archived
0 Replies Latest reply: Feb 18, 2013 10:52 PM by 991848 RSS

Problem in sql statement

991848 Newbie
Currently Being Moderated
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 ?

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points