January 11, 201015 yr Hi, I have a table A with records. They are linked to table B, 1->n. I need to export the records of A and B in Excel. Everybody knows that the good way to do so is to go in table B and to export the records of B and the linked data of A one row for each record of table B. But... I need to export ALL the records of table A, and NOT all records of table A have related records in table B... So, if I am in table B before to export, I have no access to some records of table A... (those without linked records in :. I tried to find an answer in the forum, but whitout success. For me, the only solution is to start the export from a model of table A, but how to succeed in exporting the related records of table B in such a way that each record of B creates a row in Excel ? For the linked records of B, it is nor necessary to have the related data of A on the same row, but it is necessary to create one row by linked data of table B. Is it possible ? Thank you !
January 15, 201015 yr How about creating a reporting table, that at the end of the script which loops thru A has all the records that you'll need for excel? Start in A, and if there are children, gtrr put those records in the reporting table, back to A. If not, put the record in A. Next A record.
January 15, 201015 yr It goes against the natural order of relational databases, but I agree with bcooney. Move the records into a separate table using a script. Export, then either delete the records in the reporting table...or save them to append to later.
January 16, 201015 yr this kludge is the only way. I believe exporting as XML with a custom XSLT stylesheet could be useful here.
Create an account or sign in to comment