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: Normalizing vs de-normalizing

Re: Normalizing vs de-normalizing

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Tue, 14 Jan 2003 10:52:05 -0000
Message-ID: <3e23ebd6$0$241$ed9e5944@reading.news.pipex.net>


"Steve Quezadas" <steveeq2_at_tripperjones.com> wrote in message news:xbRU9.9206$Dq.949361_at_newsread2.prod.itd.earthlink.net...
> I have a database with a [Cases] table and a [Defendants] table.
> There are usually about 40 defendants or so for every case. Here's
> the deal though: Sometimes I need to pull up a query that says
> "show me all casenumbers where the defendant can be (Arco or Shell or
> Exxon) AND the casenumber has to have defendant Union76.
>
>
> Do you think this is the best method or is there a better way?

Does something like

select ..
from cases c, defendants d,(select casenumber from defendants where defendant='Union76') U
where c.casenumber(+)=d.casenumber (you want to return allow for Union76 to be the only defendant NB sod's law says I have the (+) on the wrong side) and c.casenumber=u.casenumber
and d.defendant in (list of other defendants)

work?

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
Received on Tue Jan 14 2003 - 04:52:05 CST

Original text of this message

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