I have the following:
In tableb there can be multiple records for a record in tablea.
Like to get to this:
tablea.id, tablea.name, tableb1.total1 (if type = 1), tableb2.total2 (if
type = 2)
I tried to setup a view where I link tableb twice to tablea, but I can't
figure out how to define things with regards to the relation.
In SQL it would be something along these lines:
SELECT DISTINCT `table1`.`name`, `tableb1`.`total`, `tableb2`.`total`
LEFT OUTER JOIN `tableb` as `tableb1` ON `tablea`.`id` =
`tableb1`.`tablea_id` AND `tableb1`.`type` = 1
LEFT OUTER JOIN `tableb` as `tableb2` ON `tablea`.`id` =
`tableb2`.`tablea_id` AND `tableb2`.`type` = 1
Is this possible with base in LibrOffice 3.3.2, but could upgrade if a
newer version provides this functionality.
Thanks in advance for any tips.
For unsubscribe instructions e-mail to: email@example.com
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
- [libreoffice-users] base - join same table multiple times · Werner F. Bruhin
Impressum (Legal Info)
: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (MPLv2
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our trademark policy