I have the following three tables and I want to so as last table using a stored procedure. Can anyone tell me how I can join them?
Disc:
DiscId DiscName
1 a
2 b
3 c
DiscDetail:
DiscDetailId DiscId DiscDetailName Percentage
1 1 p 5
2 1 q 10
3 2 r 12
4 2 s 11
5 2 t 13
6 3 u 19
7 3 v 20
Pur:
PurId DiscId
1 1
2 2
3 1
4 1
I want to show data as follows:
PurId p q r s t
1 5 10
2 12 11 13
3 5 10
4 5 10