Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Sql Results to appear on 1 Row

$
0
0
We currently have 2 separate tables to capture project information and sales credit for those projects. The project table would have 1 rown but the sales credit table could have multiple rows with different people getting credit for working on a project. I am trying to develop a query to pull all credit rows for that given project into 1 row. Below are samples of what my tables would look like.Table 1:[u]Proj_no[/u] [u]Proj_desc[/u] [u]Proj_Status[/u]100000 test O100001 test2 OTable 2:[u]Proj_no[/u] [u]Emp_no[/u] [u]Credit %[/u]100000 100 50100000 200 25100000 300 25100001 400 100Expected Results[u]Proj_no[/u] [u]Emp_no1[/u] [u]Credit 1[/u] [u]Emp_no2[/u] [u]Credit 2 [/u] [u] Emp_no 3[/u] [u]Credit 3[/u]100000 100 50 200 25 300 25100001 400 100Any guidance would be appreciatedThanksTOm

Viewing all articles
Browse latest Browse all 3145

Trending Articles