Hello
I am trying to build an SQL table for cars. For this example, there are only 2 cars.
One of the cars comes in 1 colours, the other in 2, but there is no limit to the amount of colours (and each car have the same colour as another car etc). For this reason, I am using 2 tables. 1, for the car make and if it is petrol/diseal, the other table lists the colours available.
Using a join, I can create a view which allows me access to the table.
http://www.daverook.com/table.jpg shows the SQL tables (if my explanation wasn't useful). In this example all the colours are different but in the full database the colours are used multiple times
So, now to the ASP bit!
I want to display the 2 cars on my asp page (as a list)(C01 and C02) but as you can see I have 3 rows (C01, C01 and C02).
The issue is:
My asp page allows customers to filter by petrol/diseal and by colour so I need to join the 2 tables.
However, I don't want to list the same car twice which the join displays.
What is the best way around this? As there can be an almost unlimited amount of colours (eg, midnight blue, sky blue, sea blue etc) I can't add them as new columns!
Any suggestion is much appreciated