I have table like below. Consider the query
select invoice_mth, inv_amt from table xdetails
where mobile_number=9080808080
data in the table
mobile_number invoice_mth inv_amt
9080808080 2010-10 20
9080808080 2010-11 30
9080808080 2010-12 40
I have to display the data from table like below.
I want invoice months to separate each month and amt separately.
MOBILE_NUMBER inv_m1 inv_m2 inv_m3 amt1 amt2 amt3
------- ----------------------------------------------------------
9080808080 2010-10 2010-11 2010-12 20 30 40
to display the data like above what I have to do?