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

Home -> Community -> Usenet -> c.d.o.server -> Re: Create a view using OUT values from a procedure - how?

Re: Create a view using OUT values from a procedure - how?

From: Jeff <jeff_at_work.com>
Date: Fri, 08 Oct 2004 12:51:53 GMT
Message-ID: <ck62ha$r89$1@cronkite.cc.uga.edu>


In article <9711ade0.0410080421.36960303_at_posting.google.com>, fitzjarrell_at_cox.net (David Fitzjarrell) wrote:

> ... but how
>difficult can it be to return the max() and min() grades for a given
>student? Especially when all you're using is the student id to
>retrieve them?

For that matter, given the simplicity of the SQL involved so far, how difficult can it be to just use inline views to avoid a context change in the first place? Why involve functions at all?

create view student.v_grades
as
select s.student, s.studentid,

       (select max(grade) 
          from studentdb h 
          where h.studentid = s.studentid) highgrade,
       (select min(grade) 
          from studentdb l
          where l.studentid = s.studentid) lowgrade
from studentdb s
where ... Received on Fri Oct 08 2004 - 07:51:53 CDT

Original text of this message

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