RE: Riddle me this.....

  • From: "SHEEHAN, JEREMY" <Jeremy.Sheehan@xxxxxxx>
  • To: "GRIFFIJ6@xxxxxxxxxxxxxx" <GRIFFIJ6@xxxxxxxxxxxxxx>, "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 9 Apr 2009 15:11:52 -0400

Both columns are set to number.  The only difference that I can see is that on 
the second table (isolink_pjm_sttl_estim_w_iso ) the column allows for NULLS.

Jeremy
P Consider the environment. Please don't print this e-mail unless you really 
need to.

From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of GRIFFIJ6@xxxxxxxxxxxxxx
Sent: Thursday, April 09, 2009 3:06 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Re: Riddle me this.....


sttl_id_iso is a number right?  It's not something silly like a varchar storing 
a number-like thing that has commas in it ('123,456'), is it?


oracle-l-bounce@xxxxxxxxxxxxx wrote on 04/09/2009 02:47:28 PM:

> [image removed]
>
> Riddle me this.....
>
> SHEEHAN, JEREMY
>
> to:
>
> oracle-l@xxxxxxxxxxxxx
>
> 04/09/2009 02:50 PM
>
> Sent by:
>
> oracle-l-bounce@xxxxxxxxxxxxx
>
> Please respond to Jeremy.Sheehan
>
> Ok.  Here's an interesting question that some developers threw at
> me.  I don't see anything wrong with the statement but it just does
> not work....
>
>
> This statement does not work.....
>
> select  * from pjm_nm_sttl_component
>     where  sttl_id  in  -- this statement has the 'in'
>  (select   sttl_id_iso from isolink_pjm_sttl_estim_w_iso
>      where  sttl_id   =  '131545258'
>      )
>
> but this one does:
>
> select  * from pjm_nm_sttl_component
>     where  sttl_id  =  -- this statement has the '='
>  (select   sttl_id_iso from isolink_pjm_sttl_estim_w_iso
>      where  sttl_id   =  '131545258'
>      )
>
>
> The subquery works.  I can even run the 4 statements.  It pulls back
> the same data as the second statement above.
>
> select  * from pjm_nm_sttl_component
>     where  sttl_id  in (130637378)
>
> select  * from pjm_nm_sttl_component
>     where  sttl_id  in ('130637378')
>
> select  * from pjm_nm_sttl_component
>     where  sttl_id  = 130637378
>
> select  * from pjm_nm_sttl_component
>     where  sttl_id  = '130637378'
>
> We're running 10.2.0.4 on AIX 5.3.7
>
> Any ideas?
>
> Jeremy
> Consider the environment. Please don't print this e-mail unless you
> really need to.
> --
> //www.freelists.org/webpage/oracle-l
>
>

Other related posts: