i would never of been able to guess that formatting without an example (i am still confused as to what you actually want in the output.
i would use things like sed
to filter a list of words that you want and then compare them against whatever files you want compared.
shot in the dark of what the op is trying to do:
[schneidz@hyper ebay]$ head file*
==> file1 <==
tables='abc.emp' ,'bcf.customer', 'abc.client'
==> file2 <==
tables='bcf.customer', 'bcf.admin', 'zyx.contractor'
==> file3 <==
tables='bcf.customer', 'abc.client '
[schneidz@hyper ebay]$ for word in `sed s/tables/""/ file1 | tr "=\'," " \n"`
grep -o $word file2 file3