Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL should work!!?? But it doesn't.
"Prince Of Thieves" <thief_NOSPAM_at_hotmail.com> wrote
<snipped>
> substr(kapn.apnnum, 1, 12) "APN",
> Sizes, APN,
> S, 931732615128,
> and k.apnnum = '931732615128'
>
> ....to the WHERE clause, but now I get nothing as a result. Why?
You've answered your own question indirectly. APN output is a substring of KAPN.APNNUM.
Your criteria is on a different table. K.APNNUM is table KKEYC and not KAPN (which is what is displayed in output APN).
What is more, you're not substring'ing the predicate either.
This:
and k.apnnum = '931732615128'
should be this:
and substr(kapn.apnnum, 1, 12) = '931732615128'
-- BillyReceived on Thu Jan 08 2004 - 07:51:16 CST