Re: SQL query - help needed

From: Lynn C. Ormond <lynn_at_lucero.com>
Date: Wed, 25 Apr 2001 08:49:00 -0700
Message-ID: <6qCF6.2082$Pc3.300931_at_mick.cybertrails.com>


Will that create the same number of fields for each row if there are 5 matches for the first record in file a and 2 for the second record and none for the third?

--

Lynn C. Ormond
Lucero Research
Reply to: Lynn_at_Lucero.com
(520) 537-1300 x120
Please include company name in message


Stephen Bell <stephen.bell_at_cgi.ca> wrote in message
news:3AE6C4CF.FBA4878E_at_cgi.ca...

> Lynn,
> It sounds like the base tables have a Primary/Foreign key
relationship..what if
> you construct a view to suit what you need? It sounds like all you need is
an
> equijoin based on your statement that you want the same number of fields
in each
> row..an equijoin will produce a result for each of the multiple values in
the
> foreign key that correspond to each unique key value...so your WHERE
clause
> would simply be:
>
> WHERE fk_of_small_table = unique_key_of_100000_record_table;
>
> Please let me know if I misinterpreted your question.
>
> Steve
>
> "Lynn C. Ormond" wrote:
>
> > I have 2 Oracle 7 views I need to combine with a select statement.
> >
> > The first has 100,000 + records with a unique key. The second has
multiple
> > records ( or none ) on the same key.
> >
> > I need left join(?) syntax which will allow me to get all of the
multiple
> > records in the second file attached to each of the unique records in the
> > first file, always having the same total number of fields in each row of
the
> > result set.
> >
> > Any ideas?
> >
> > --
> >
> > Lynn C. Ormond
> > Lucero Research
> > Reply to: Lynn_at_Lucero.com
>
Received on Wed Apr 25 2001 - 17:49:00 CEST

Original text of this message