HI,
I have two tables.I want to retrieve the uncommon records from two tables.
I m using the queries :
select col1,col2 from table 1
where rtrim(col1+'-'+col2) not in
(select rtrim(col1+'-'+col2) from table 2)
i have used this query also :
select rtrim(col1+'-'+col2+'-'+col3+'-'+col4) from table 1
except
select rtrim(col1+'-'+col2+'-'+col3+'-'+col4) from table 2
The problem is that these two queries are taking huge time for execution.
First table has around 1 lakh records
and the second one is havoin 10.000 records.
Logically,i knw it would take time but is n't there ny another alternative for this ?
thanks
I have two tables.I want to retrieve the uncommon records from two tables.
I m using the queries :
select col1,col2 from table 1
where rtrim(col1+'-'+col2) not in
(select rtrim(col1+'-'+col2) from table 2)
i have used this query also :
select rtrim(col1+'-'+col2+'-'+col3+'-'+col4) from table 1
except
select rtrim(col1+'-'+col2+'-'+col3+'-'+col4) from table 2
The problem is that these two queries are taking huge time for execution.
First table has around 1 lakh records
and the second one is havoin 10.000 records.
Logically,i knw it would take time but is n't there ny another alternative for this ?
thanks
Comment