Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL*plus please help
Bricklen Anderson wrote:
> Oops, sorry Daniel, didn't mean to post pretty much exactly what you
> posted (and not even as detailed as yours I see.. anyways, I accessed it
> from Google at work - you know how frequently that gets updated!).
>
> Cheers,
>
> Bricklen
>
> Daniel Morgan wrote:
>
> <snipped>
>
> >
> > You are, in a SQL context, misusing the word GROUP ... grouping has an entirely
> > different meaning and could lead to confusion when asking question. Grouping
> > refers to aggregations with operators like MAX, SUM, and COUNT. What you are
> > trying to do is strictly a sorting that is done by the ORDER BY clause.
> >
> > Here's the solution if I understand the question:
> >
> > SELECT s.school_name, c.child_name, c.dob
> > FROM school s., child c
> > WHERE c.school_no = sl.school_no
> > AND c.dob <= TO_DATE('01-FEB-93')
> > ORDER BY school.school_name, child.dob;
> >
> > I also took the liberty of aliasing the tables in your FROM clause with single
> > letters to cut down on the amount of typing and make it easier to read as well
> > as correcting your use of a date in the WHERE clause. You 'can' not use TO_DATE
> > but it is highly inadvisable as Oracle does not guarantee you will get the
> > correct result.
> >
> > Daniel Morgan
No problem. I have more than once done the same.
But this gives me a great opportunity to point out to some, and they know who they are, that I help those that help themselves.
Daniel Morgan Received on Fri Jun 14 2002 - 22:06:10 CDT
![]() |
![]() |