[Example] Queries that can edit multi-tables
Posted: Tue Jan 17, 2012 5:11 pm
This thread arises from a recent post by DACM at:
http://user.services.openoffice.org/en/ ... 59#p216752
For some time now I have been experimenting with Queries that permit the editing of data from more than one Table source. As expalained in DACM's post the key is that the Query (or SQL) should include the PKs and linking FKs from each of the tables. In earlier versions of OOo Base this appeared not to be possible and even in OOo 3.3 there are limitations. For example, it appears to require the Query, or rather the underlying SQL, to be parsed by the Base GUI, and it only permits limited scope for adding new records.
In certain limited cases the ability to edit fields in more than one table from a single query or data form could have potentially useful benefits: for example, by comparison with the use of CONCAT for the display in a list box. I have attached a simple demo file to illustrate what can be done. I would welcome comments and be grateful to learn from the experience of others.
http://user.services.openoffice.org/en/ ... 59#p216752
For some time now I have been experimenting with Queries that permit the editing of data from more than one Table source. As expalained in DACM's post the key is that the Query (or SQL) should include the PKs and linking FKs from each of the tables. In earlier versions of OOo Base this appeared not to be possible and even in OOo 3.3 there are limitations. For example, it appears to require the Query, or rather the underlying SQL, to be parsed by the Base GUI, and it only permits limited scope for adding new records.
In certain limited cases the ability to edit fields in more than one table from a single query or data form could have potentially useful benefits: for example, by comparison with the use of CONCAT for the display in a list box. I have attached a simple demo file to illustrate what can be done. I would welcome comments and be grateful to learn from the experience of others.