I have two tables with data and I know I can use JOINS to list all data with duplications in a monolithic table but I need something along the following lines for user display purposes.
Groceries table: Itemname, Category, Brandname, Manufacturer, Packaging, Units, Weight, Note, Picture, Barcode, Deleted, Record History table: (ItemDataId corresponds to the Record number in Groceries table) ItemDataId, Boughton, Boughtfrom, Quantity, Aisle, Price, Discount, Total, Note, Record If I "SELECT * FROM Groceries" to list all records, how do I arrange a query to list each record in the groceries table with all matching history items under each record. I:e (Just including column names for reference) ItemName: 'Dishwashing Liquid', BrandName: 'HoneySuckle', Manufacturer: 'Reardon' BoughtOn: '12/02/2000', BoughtFrom: 'Aldi', Quantity: '3', Aisle: '15', Price: '$1.50' BoughtOn: '18/06/2001', BoughtFrom: 'Coles', Quantity: '1', Aisle: '1', Price: '$2.50' BoughtOn: '12/02/2000', BoughtFrom: 'Safeway', Quantity: '5', Aisle: '8', Price: '$6.50' ItemName: 'Sticky Tape', BrandName: 'StickRite', Manufacturer: 'Rogers' BoughtOn: '22/05/2011', BoughtFrom: 'Big-W', Quantity: '12', Aisle: '9', Price: '$.30' BoughtOn: '22/05/2011', BoughtFrom: 'Big-W', Quantity: '12', Aisle: '9', Price: '$.30' -- View this message in context: http://sqlite.1065341.n5.nabble.com/List-record-from-one-table-and-all-matching-in-another-tp71385.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users