Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Passing 2 parameters into a nested select statement
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
> >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 mayReceived on Fri Aug 25 2000 - 13:52:57 CDT