Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Are you willing to write some code to do this?
Rather than one problematic query (that you have), you could use 2 queries. The first to read the B entries (distinct) and then read the A table using the reg_no. Either it is found or not and the code would act accordingly.
Another was would to be to create sequetial files of the entries in both tables and compare these with your sort product.
With the query you have, you might consider GROUP BY instead of distinct.
I dint get proper output. most of reg.no are not coming in the output.
Saying it didn't work gives nothing to use to help you. Sayin "most are not coming" provides little. You need to post which ones are failing and determine why they fail.