Click here to Skip to main content
15,904,638 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two table 1 Product and 2 Company

Product
ProductName     Quantity   CompanyID
A               2            1
A               1            2
B               2            1

Company
CompanyName CompanyID
Samsung        1
NOKIA          2

how to get data product wise quantity

Like as
CompanyName  A         B
NOKIA        1         2
Samsung      2         2


Please Help me to find the values
thanks to advance

What I have tried:

ProductName     Quantity   CompanyID
A               2            1
A               1            2
B               2            1
Posted
Updated 12-Jun-16 5:22am
v2
Comments
CHill60 12-Jun-16 11:08am    
The "What I have tried:" section is for you to put the code that you have tried.
So what have you tried?

1 solution

Look at PIVOT : Using PIVOT and UNPIVOT[^]
 
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