help needed - combining tables
Date: Tue, 9 Jan 2001 09:30:12 +0200
Message-ID: <3a5abedc$1_at_news.hai.iec.co.il>
Hi all - I am in dire need of a solution to combining tables.....
I have a table of the following structure :
st1 varchar2(8),
fld1 varchar2(8),
line varchar2(8), vlt varchar2(8), st2 varchar2(8), fld2 varchar2(8)
I have to find within the above table all rows where (st1,fld1) are the same or all rows where (st2,fld2) are the same and link them together. The table which I have to create and populate is of the following structure :
st1 varchar2(8), fld1 varchar2(8), line1 varchar2(8), vlt1 varchar2(8), st2 varchar2(8), fld2 varchar2(8) line2 varchar2(8), vlt2 varchar2(8), st3 varchar2(8), fld3 varchar2(8)
In other words, I have to read the first row in table1 and see if there is
another row
in the table with the same (st1,fld1) or (st2,fld2). If I find a row then I
have to link
them together into one row in table2.
table1 => aaa 111 blue 100 bbb 222
aaa 111 grey 120 ccc 333
will give me the outcome in table2 => bbb 222 blue 100 aaa 111 grey 120 ccc 333
I hope someone will be able to help me out as I am stumped and I HAVE to get this done.
thanks all - ElchananReceived on Tue Jan 09 2001 - 08:30:12 CET