Re: sql problem
Date: Fri, 22 Oct 1999 20:36:00 GMT
Message-ID: <7uqhrg$fhr$1_at_nnrp1.deja.com>
In article <6EC14873F507D3119B8C0090273C43490C0C6B_at_jdasoftware.com>,
"Rajkumar Manickavasagam (Raj)" <rmnckvsg_at_memphis.edu> wrote:
> hi
>
> i have 2 tables A and B. table A has a py key col1 and a description
> field col2. table B has 2 columns....colx references col1 of table A
> and coly references col1 of table A.
>
> i need to get a report that lists as follows;
>
> colx corresponding-col2 coly corresponding-col2
>
> i would prefer it if i could create a view for this. i have spent the
> whole day on this with no luck.
>
> regards,
> raj
>
Try this:
select colx, a1.col2, coly, a2.col2
from A a1, A a2, B
where a1.col1 = colx and a2.col1 = coly
Hope this helps.
Yar
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Fri Oct 22 1999 - 22:36:00 CEST