Click here to Skip to main content
15,892,797 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have 2 tables in a data base and their details are given below:
1) EmployeeDetailsTable
empID    empName    empIncentives
001            xxx            2000
002            yyy            3000

2) EmployeeIncentiveTable
empID        empIncentiveMonth            status
001                January                        Received
002                January                        Received
001                February                      Received
002                February                      Pending
001                March                          Pending
002                March                          Pending

Now I have to create a view Table which shows:
empID        empName            January            February            March            Status
001               xxx                    2000                  2000           Pending              OK
002               yyy                    3000               Pending                Pending                    OK

Please give me an example query as soon as possible
Posted
Updated 24-Mar-15 23:13pm
v4
Comments
Mohibur Rashid 25-Mar-15 5:18am    
As soon as possible? really?
[no name] 25-Mar-15 5:26am    
Use sql join query to bind the table..
RTK The Limited Edition 25-Mar-15 5:36am    
Can you give a query(i.e. example) to build it
[no name] 25-Mar-15 5:48am    
You can ref the below article and study sql joins..

1 solution

You can ref this below article.it's provide examples about Sql Joins.

Read this article : SQL joins - multi-table queries
 
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