Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Quiz
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 - 11:04:09 CDT