If you've designed your table as i mentioned, you can retrieve those details from CustomerPurchases table.
If you want to retrieve a customer's details about past purchases, etc..
Let the user to enter particular customer's customer code. then show customer details (Customer Name, Address, etc..) from CustomerMaster table and select relavant records from CustomerPurchases(Items bought, Date,purpose) table for that customer.
nalaka hewage
|