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: SQL question..

Re: SQL question..

From: foothillbiker <foothillbiker_at_gmail.com>
Date: 5 Feb 2007 21:00:23 -0800
Message-ID: <1170738023.609647.137200@p10g2000cwp.googlegroups.com>


On Feb 5, 5:39 pm, redrose..._at_yahoo.com wrote:
> Thanks for the suggestion but that brings up nothing because in:
>
> > (r.VALUE = '5 Lincoln Ave') AND
> > ((r.NAME='phone') OR (r.NAME = 'fax'))
>
> there is no possible match. r.NAME is 'address' for r.VALUE '5 Lincoln
> Ave'

redrose,

E-A-V rears it's head again!!! Are you, by any chance, working in a setting w/ a lot of object oriented folks ;-)

Anyway, I believe you're going to have to do something along these lines:

SELECT phone.value,

        fax.value
        addr.value
FROM    results phone,
        results fax,
        results addr,
        projects
WHERE   phone.name = 'Phone'
AND     fax.name   = 'FAX'
AND     addr.name  = 'Address'
AND     phone.id = fax.id
AND     phone.id = addr.id
AND     phone.id = projects.id

I didn't work out the exact statement b/c I don't have all the details, but the above should put you on the right track.

REgards,
Chas. Received on Mon Feb 05 2007 - 23:00:23 CST

Original text of this message

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