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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Passing 2 parameters into a nested select statement

RE: Passing 2 parameters into a nested select statement

From: <Yosi_at_comhill.com>
Date: Fri, 25 Aug 2000 14:52:57 -0400
Message-Id: <10600.115598@fatcity.com>


I'm not sure if this is what you're lookng for, but here is valid syntax for nested selects:

select     icons,
           admdatetime,
           ther,
           therin
from       inpatient
where      icons  Between 85 and 93
and        (icons, admdatetime) in
           (select icons, max(admdatetime)
           from inpatient
           group by icons)

HTH, Yosi

> -----Original Message-----
> From: Lyall Barbour [mailto:lbarbour_at_stanford.edu]
> Sent: Friday, August 25, 2000 3:21 PM
> To: Multiple recipients of list ORACLE-L
> Subject: Re: Passing 2 parameters into a nested select statement
>
>
> Dynamic SQL is the way to go.
> Lyall Barbour
>
> At 08:45 AM 8/25/00 -0800, you wrote:
> >Hi all
> >
> >I need to pass two parameters into a nested select statement
> in order to
> >return the proper row. How do I do this?
> >
> >select icons,
> > admdatetime,
> > ther,
> > therin
> >from inpatient
> >where icons Between 85 and 93
> >and icons||admdatetime in
> > (select icons||max(admdatetime)
> > from inpatient
> > group by icons)
> >
> >
> >This query works for me, but is there a better or more
> efficent way to pass
> >multiple fields into a nested select? Help!
> >
> >
> >_____________________________________________________________
> ___________
> >Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com

>
>--
>Author: Peter Hazelton

> INET: peterhazelton_at_hotmail.com
>
>Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
>San Diego, California        -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from).  You may
>also send the HELP command for other information (like subscribing).

-- 
Author: Lyall Barbour
  INET: lbarbour_at_stanford.edu

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
Received on Fri Aug 25 2000 - 13:52:57 CDT

Original text of this message

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