Re: Comparing two tables
Hi Nick,
Thanks, I had a great weekend. And the Monday was all the better for your post; everything worked like a charm :) I have another element to add now, which may make the topic title slightly outdated:
I have another table of harmonics by which I want to multiply the Table2 Periods and compare the results to the Table 1 Periods. Table 3 has two columns, Harmonic and Multiplier, which are simply a varchar label and a 0 float =<3.
I can display all of the positive matches using:
SELECT Table1.Period, Table1.SNR, Table2.ID, Harmonics.Harmonic FROM Table1, Table2, Harmonics WHERE ABS(Table1.Period - (Table2.Period*Harmonics.Multiplier)) <= 0.01
But I would also like to display the full table without any of the matches. However I can't figure out where to put the Harmonics table when using the LEFT JOIN syntax. I have the feeling I need to create a temporary table like
------------------------------------------------------------------------------------------------------------------------
Table2.ID | Harmonics.Multiplier | Harmonics.Harmonic*Table2.Period
-------------------------------------------------------------------------------------------------------------------------
then compare the Table1.Period to the third column above, using the usual ABS syntax.
I'll be trying that for a bit; if there's an easier way let me know :)
Thanks a million,
Tash
Subject
Views
Written By
Posted
18603
July 27, 2004 07:38AM
11208
July 28, 2004 04:01AM
5117
July 28, 2004 05:55AM
4767
July 28, 2004 07:26AM
3713
July 30, 2004 07:48AM
3402
July 30, 2004 09:00AM
3632
July 30, 2004 10:57AM
Re: Comparing two tables
3248
August 02, 2004 10:02AM
3010
August 02, 2004 10:22AM
3186
August 02, 2004 03:42PM
3190
August 03, 2004 04:10AM
3947
August 03, 2004 04:30AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.