Click here to Skip to main content
15,909,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have two tables, one is Employeebill table, another is EmployeePay table, in Employeebill table has two rows for the month of August and September Salary, and in Employeepay table has one rows for the September salary(that was as advance). Now I want to show in my crystal report for the payable salary. note: September salary has paid as advance. So payable salary will be from Employeebill table for August salary. But when I make inner join I got for one rows with september salary, and when I make outer join I got for two rows with september and August Salary, But I want to show only one rows for August salary.

Have anyone able to help in this regards. I will gratefull for ever.

Regards
Shah Noman
Software Engineer.
Callsnit Inc.
Posted
Comments
Sandeep Mewara 12-Oct-10 3:44am    
Well, you can do it but are you sure your table structures and data entered are ok?

1 solution

SQL
SELECT TableA.TableAId, TableA.Name
FROM TableA INNER JOIN TableB ON TableA.TableAId <> TableB.TableBId

This will help you.
 
Share this answer
 

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