so I will get the data by above ,so for getting the values as its has around 5million ids,how shud I export as its taking lot of time to get the data ,
actually I want to know what all ids exists in qvd 1 and not in qvd2 and vice versa,
is there any other way?
Either you need Key to generate all common fields to one and the final table you must required to use call that Key into Exist() function?
Can we know more insight of your data and result set?
Here is a script that will give you an example of how to determine the IDs:
Ceil( Rand()*50 ) AS ids1,
1 AS F1
Ceil( Rand()*50 ) AS ids2,
2 AS F2
ids1 as ids_not_in2
ids2 as ids_not_in1
ids1 as common_ids