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: [email protected]
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