Hi Dan,
Ok, here's the query.
SELECT CONCAT(people.Title, ' ', LTRIM(people.Firstname), ' ',
LTRIM(people.Surname)) AS PersonName,
people.PersonId, issues.iId AS iiID, issues.Issue,
people.LastIssue,
subscription.iId AS subiId, subscription.Type,
subscription.AdType,
subscription.Delivery, subscription.Issues,
subscription.StartingAt,
address.Company, Address1, Address2, Address3, City,
Area, Country, PostalCode,
sent.iId AS SendId, sent.NumberSent,
textvalues.Text
FROM people
JOIN subscription ON people.iId = subscription.iPeopleId
JOIN sent ON sent.iSubId = subscription.iId
JOIN issues ON sent.iIssueId = issues.iId
JOIN address ON people.iId = address.iaParentId
JOIN textvalues ON textvalues.Id = subscription.Type
WHERE issues.Issue = '70' AND textvalues.Field = 'CBOSUBTYPE'
ORDER BY FirstName, Surname
It's producing an address list of subscribers to the next (here
hard-coded as '70', until I find out how to pass a parameter to a
query from a report, or at least in conjunction with a report) to
print address sheets. It's originally from my own (Visual FoxPro)
application that runs our magazine subscriptions. It's now "in
transition" to LO :-)
Regards
Mark Stanton
One small step for mankind...
--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
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
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: 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.