Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Design report problem

Author  Topic 

kanchan04
Starting Member

1 Post

Posted - 2011-05-18 : 05:39:21
I have three tables in database for store employee loan information name EMPLOYEE, RECEIVE, PAY. I store the employee information into EMPLOYEE table and store loan receive information into RECEIVE table and store loan pay information into PAY table. I use as database MS SQL Server 2005 express. Now please help me how can I query data to retrieve total amount of receive and total amount of pay to design a report by employee wise. The structure of those tables’s and example data are follows:

EMPLOYEE
EMPID EMPNAME
107 Imtiaz Alam

Primary key =EMPID

RECEIVE
EMPID LOAN_RECEIVE DATE
107 20000 ----------
107 6000 ----------
107 2000 ----------

Foreign key =EMPID




PAY
EMPID LOAN_PAY DATE
107 500 -----------
107 500 -----------

Foreign key =EMPID
   

- Advertisement -