Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL should work!!?? But it doesn't.

Re: SQL should work!!?? But it doesn't.

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 8 Jan 2004 05:51:16 -0800
Message-ID: <1a75df45.0401080551.4d41bf8c@posting.google.com>


"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'

--
Billy
Received on Thu Jan 08 2004 - 07:51:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US