Click here to Skip to main content
16,001,979 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one table of data as shown below,

/Sno/ /Doctor Name/ /Total Revenu/ /Flag/
-------------------------------------------------------
1 DR.SALIM 163496.54 Pharmacy Sales
2 Dr.ARUN 16124.14 Pharmacy Sales
3 DR.SALIM 47150 LAB
4 Dr. SHAMNAD 2060 Discharge
5 DR.SALIM 38830 Discharge


converted into a table like below using SQL query,

/Sno/ /Doctors/ /Pharmacy Sales amount/ /Lab amount/ /IP Discharge amount/
--------------------------------------------------------------------
1 DR.SALIM 163496.54 47150.00 38830.00
2 Dr.ARUN 16124.14 0.00 0.00
3 Dr.SHAMNAD 0.00 0.00 2060.00


Thank you...

What I have tried:

tried SQL query with a temp table
Posted
Updated 14-Aug-18 1:04am

1 solution

 
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