I have two tables.
1st table has the following format:
table name:student
structure:
student_id student_name
1 John
2 Marsh
3 Samuel
2nd table has the following format:
table name:paymentDetails
structure:
student_id payment month
1 1000 jan
1 2000 feb
1 3000 mar
2 1000 jan
i want an output table like following
studentname payment month payment month payment month
john 1000 jan 2000 feb 3000 mar
please keep in mind that my details table(paymentDetails) can have any number of rows for a particular student_id
I have read a lot of articles about cross apply/cross join/cross tabs/pivots ....but cant resolve my problem