I have a table in the form(result set from a select query )
rec_no | f_id | f_value |
---|---|---|
1 | 1502 | text1 |
1 | 1503 | text2 |
2 | 1502 | text3 |
2 | 1503 | text4 |
2 | 1508 | text5 |
1 | 1509 | text6 |
1 | 1508 | text7 |
2 | 1509 | text8 |
and i need to convert this table in the below format
recno | 1502 | 1503 | 1508 | 1509 |
---|---|---|---|---|
1 | text1 | text2 | text7 | text6 |
2 | text3 | text4 | text5 | text8 |
the values inside f_id may vary but number of recno for reach f_id would be same. How to format the first formatted data into the second form using oracle script?