Click here to Skip to main content
16,018,805 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to compare two fields of one table to two fields of another table when no. of records are not same? and count the matching rows in both the tables
Posted

1 solution

This could help you:
SQL
select count(*) from 
TABLE_A A inner join TABLE_B B on (A.FieldA1=B.FieldB1 and A.FieldA2=B.FieldB2)
 
Share this answer
 
Comments
sandhyagor 5-May-13 9:43am    
thanx...
i tried it but its nt working :(
sandhyagor 5-May-13 10:04am    
got the solution by altring your query..
thank u so much :)
Zoltán Zörgő 5-May-13 10:09am    
I am glad to read this. My answer was a schema, of course you needed to adjust to your actual needs.
sandhyagor 5-May-13 10:29am    
yea.. thanx again :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900