Re: SQL Question
From: David M. Walker <davidw_at_datamgmt.datamgmt.com>
Date: 1995/09/26
Message-ID: <456396264wnr_at_datamgmt.datamgmt.com>#1/1
| David M. Walker EMail davidw_at_datamgmt.com |
| Data Management & Warehousing |
Received on Tue Sep 26 1995 - 00:00:00 CET
Date: 1995/09/26
Message-ID: <456396264wnr_at_datamgmt.datamgmt.com>#1/1
If you have the following :
Table_1 Table_2 ------- ------- 4 4 5 5 6 7 7 8 9 9
then the SQL set operators will allow you do find similariies/differences e.g.
select col_1 from table_1
union
select col_1 from table_2;
will return 3,4,5,6,7,8,9
select col_1 from table_1
minus
select col_1 from table_2
will return 6
select col_1 from table_2
minus
select col_1 from table_1
will return 8
select col_1 from table_1
intersect
select col_1 from table_2
will return 4,5,7,9
In this way all permutations can be found. Indexing this column will also make this query run like s*1t off a shovel !!!!
| David M. Walker EMail davidw_at_datamgmt.com |
| Data Management & Warehousing |
Received on Tue Sep 26 1995 - 00:00:00 CET