RE: Riddle me this.....

From: SHEEHAN, JEREMY <Jeremy.Sheehan_at_fpl.com>
Date: Thu, 9 Apr 2009 15:52:17 -0400
Message-ID: <8833494F383585499CB855121711D263139199377E_at_JBXEXVS02.fplu.fpl.com>



No rows returned....

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

-----Original Message-----
From: Taylor, Chris David [mailto:Chris.Taylor_at_ingrambarge.com] Sent: Thursday, April 09, 2009 3:51 PM
To: jeremy.schneider_at_ardentperf.com; SHEEHAN, JEREMY Cc: oracle-l_at_freelists.org
Subject: RE: Riddle me this.....

Try this

select /*+ FULL */ * from pjm_nm_sttl_component where sttl_id in -- this statement has the 'in' (select /*+ FULL */ sttl_id_iso from isolink_pjm_sttl_estim_w_iso  where sttl_id = '131545258' )

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

Chris Taylor
Sr. Oracle DBA
Ingram Barge Company
Nashville, TN 37205
Office: 615-517-3355
Cell: 615-354-4799
Email: chris.taylor_at_ingrambarge.com  

CONFIDENTIALITY NOTICE: This e-mail and any attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender immediately and delete the contents of this message without disclosing the contents to anyone, using them for any purpose, or storing or copying the information on any medium.

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Jeremy Schneider Sent: Thursday, April 09, 2009 2:40 PM
To: Jeremy.Sheehan_at_fpl.com
Cc: oracle-l_at_freelists.org
Subject: Re: Riddle me this.....

Can you "explain plan" on both? Curious if it's doing a transformation, might give something to search for in metalink...

SHEEHAN, JEREMY wrote:
> 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.
--
Jeremy Schneider
Chicago, IL
http://www.ardentperf.com

--
http://www.freelists.org/webpage/oracle-l

i0zX+n{+i^ Received on Thu Apr 09 2009 - 14:52:17 CDT

Original text of this message