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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL to retrieve min value of the combination

Re: SQL to retrieve min value of the combination

From: Ed prochak <ed.prochak_at_magicinterface.com>
Date: 16 Jan 2004 11:37:40 -0800
Message-ID: <4b5394b2.0401161137.781ed8e6@posting.google.com>


Mark.Powell_at_eds.com (Mark D Powell) wrote in message news:<2687bb95.0401151307.78471a24_at_posting.google.com>...
> harve_projects_at_yahoo.com (HRR) wrote in message news:<53b2dd24.0401140905.4009dbf3_at_posting.google.com>...
> > I am sorry for not posting the criteria. The problem is like this:
> >
> > I have a view with 3 columns. Columns being zip_code,local_office_id,
> > distance.
> > I need to find the local_office_id for each zip_code which is the
> > nearest. This table has all the permutation and combination of
> > zip_code,local_office_id and distance (around 600 zip codes, 100 Local
> > offices).
> >
> > Our team was able to get the solution using first_value & partition,
> > but we cannot use that in our query as the production database is
> > 8.0.5
> >

[]
>
> This solution will work on any version of Oracle from 7.3 up.
> -- Mark D Powell --

Mark!

You posted the spoiler. Now he'll never learn! 8^0

HRR,
did you use Mark's solution or did your "team" come up with their own answer?

Ed
(I'm often curious if posters actually use the help we provide.) Received on Fri Jan 16 2004 - 13:37:40 CST

Original text of this message

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