Please help with database question
Posted on 2011-10-19
I have a list of customers. Each customer has purchased tickets and these are presented as different ticket numbers. The ticket numbers represent the content for example: the promotion(11), the venue (22) and the time (33) will give a ticket number 112233. A customer can purchase more than one ticket therefore can have more than one ticket number. The file will be provided pipe delimited as
email | ticketnumber
email@example.com | 112233,443322
firstname.lastname@example.org | 223311, 112233, 334422
i.e. the ticketnumber part will be comma seperated and quantity can vary.
We will have another table already provided in our database which will represent what these numbers mean
ticket number | promotion | venue | time
112233 | free | cinema | 12:00
223311 | half_price | cinema | 13.00
This data will be coming into our email system and we would like to setup a table which holds all email addresses for people who will be going to the cinema venue
I assume I can use SQL but it is how to manage the cell which has a number of comma seperated data which confuses me.
thanks for your help