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: help queries

Re: help queries

From: virgilio <i_mac_at_libero.it>
Date: Wed, 19 Sep 2001 06:40:17 GMT
Message-ID: <l5Xp7.14340$Bk.87041@news1.tin.it>


Thanks it's works
Virgilio
"Marc" <langkamp_at_mailcity.com> ha scritto nel messaggio news:3ba71553$1_at_gaspra.oss.akzonobel.nl...
> There might be more sophisticated solutions but I think this one might
work
>
> hth, marc
>
> Select alias1.car,alias1.optional, alias2.optional
> from table alias1, table alias2
> where alias1.car = alias2.car
> and alias1.optional = 1
> and alias2.optional = 5
>
> Select alias1.car,alias1.optional, alias2.optional
> from table alias1, table alias2
> where alias1.car = alias2.car
> and alias1.optional = 1
> and alias2.optional = 5
> and not exists (select 1 from table alias3
> where alias1.car = alias3.car
> and alias3.optional = 3)
>
>
>
> "Virgilio Gambarotto" <gambarotto_at_greensoft.it> wrote in message
> news:2Qip7.47952$F45.492136_at_news1.tin.it...
> > Hi
> > I have a table like this:
> > car optional
> > ford 1
> > ford 2
> > ford 5
> > gm 3
> > gm 1
> > gm 5
> > ferrari 1
> > ferrari 7
> > Q1
> > I need to retrieve only cars having optioinals 1 and 5
> > result must be
> > ford 1 5
> > gm 1 5
> >
> > Q2
> > I need to retrieve only cars having optioinals 1 and 5 and not 3
> > result must be
> > ford 1 5
> >
> > Tia
> > i_mac
> >
> >
>
>
Received on Wed Sep 19 2001 - 01:40:17 CDT

Original text of this message

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