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: Quiz

Re: Quiz

From: nobody <nobody_at_nowhere.com>
Date: Sun, 26 Oct 2003 02:38:29 GMT
Message-ID: <FsGmb.61357$h61.15635@news01.bloor.is.net.cable.rogers.com>


ok forgot about translate,,was midnight and a few beers..

solution one does return one record for each location or specifically with your data 6 records.

"Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message news:1067097865.179153_at_yasure...
> Comments in-line
>
> nobody wrote:
>
> >must be bored or unemployed
> >
> >1)
> > select *
> > from test a
> > where date_out in (select min(date_out)
> > from test where location=a.location)
> >
> >
> >ok I cheated and should spell out the elements instead of *
> >
> Incorrect. This returns a single record. The question asks you to return
6.
>
> >2) Unless there is some new function in 9i that I am unaware of. I dont
see
> >how to do this without using a function that returns the locations of a
> >character within a string to ensure
> >that the brackets and space are in the correct place . without using
> >instring or substring.
> >
> >The rest of the string can check for numerics or change or change the
space
> >to a + and abs(the string)
> >if this doesnt fail the string is valid
> >
> It is actually quite simple and can be done in a single line of PL/SQL.
>
> >4)
> >select loc_name
> >from test
> >where location =
> >(select max(location) from test
> >where location != (select max(location) from test))
> >
> Good though there are variations on this so other correct answers may
> differ.
>
> >
> >P.S. What happened to 3.
> >
> It related to classwork as were questions 5 through 10.
>
> I'll publish the answers on Sunday in case anyone else wants to have
> some fun with this.
>
> --
> Daniel Morgan
> http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
> http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
> damorgan_at_x.washington.edu
> (replace 'x' with a 'u' to reply)
>
Received on Sat Oct 25 2003 - 21:38:29 CDT

Original text of this message

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