Christian Coppe Posted January 11, 2010 Posted January 11, 2010 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 !
bcooney Posted January 15, 2010 Posted January 15, 2010 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.
Josh Ormond Posted January 15, 2010 Posted January 15, 2010 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.
bcooney Posted January 15, 2010 Posted January 15, 2010 FM doesn't have left outer-joins. So, this kludge is the only way.
comment Posted January 16, 2010 Posted January 16, 2010 this kludge is the only way. I believe exporting as XML with a custom XSLT stylesheet could be useful here.
Recommended Posts
This topic is 5425 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now