Export multiple records,join query,multiple looping

Topics: Developer Forum
Dec 19, 2013 at 4:48 AM
I have two tables as following:
NOTE TABLE
Note Id, Description
1, description1
2, description2
3, description3
4, description4

SUBNOTE TABLE
Notes Refence ID, Description, value
1, subnote1,1
2, subnote2,2
3, subnote3,3
3, subnote4,4
3, subnote5,5
4, subnote6,6

I want the output similar as below in excel file with excel file download option:

Note ID, Description, SubNotes details
                          , subnode, value
1, description1, subnote1,1
2, description2, subnote2,2
3, description3, subnote3,3
                  , subnote4,4
                  , subnote5,5
4, description4, subnote6,6