I have tables called PATIENTINFO and MEDICATIONINFO with columns as mentioned below
PATIENTINFO
PatiendId Disease
------------------------
1000 Fever
1001 Cold
MEDICATIONINFO
MedId PatiendId Medicine Value Reaction
------------------------------------------------------
100 1000 Med1 100 R
101 1000 Med2 200 L
102 1000 Med3 150 H
103 1001 Med1 120 L
104 1001 Med2 150 R
105 1001 Med3 300 H
I want result to be in the below format (Hibernate query)
Medicine Value1 Reaction1 Value2 Reaction2 .......(Value n ...Reaction n)
----------------------------------------------------------------
Med1 100 R 120 L
Med2 200 L 150 R
Med3 150 H 300 H
Can anyone help me out in this??