Re: SQL Question

From: Zang <zang_at_omni.voicenet.com>
Date: 1996/03/28
Message-ID: <4jcsju$6gu_at_news.voicenet.com>#1/1


In article <4itcvv$pq2_at_news03.deltanet.com>, builder_at_deltanet.com says...
>I need to write SQL query to do it. Any idea?
>
>Input table 1:
>ID | Data
>-----------
>1 | d1
>2 | d2
>3 | d3
>
>Input table 2:
>Data | Result1 | Result2 | Result3
>------------------------------------
>d1 | r1 | r2 | r3
>d2 | r2 | r3 |
>d3 | r3 | r4 | r5
>
>I need to write a SQL query that will create table like this:
>
>Output table 3:
>ID | Result1 | Result2 | Result3
>------------------------------------
>1 | r1 | r2 | r3
>2 | r2 | r3 |
>3 | r3 | r4 | r5
>
>Thanks
>
>Boris

Select ID, Result1, Result2, Result3 from Table1, Table2

        where Table1.Data = Table2.data;

That should return Table3 as the result set.

        -Zang Received on Thu Mar 28 1996 - 00:00:00 CET

Original text of this message