I have the following tables
Vehicles, Accessories and AccLinking
The relevant fields are in
Vehicles: id, name, status
Accessories: id, name, status
AccLinking: id, accessoryid, vehicleid
Status is an integer with possible values of 1 to 6
accessoryid field represents id in Accessories table
vehicleid field represents id in Vehicles table
Ok. So now I need a list of vehicles (id, name) where status=6
and also where ALL the linked accessories have status=6
If a vechicle does not have any accessories then that should be included in
the list. So if any linked accessories do not have status=6 then the vehicle
should not be in the list.
Is there some simpler method of getting this list without nesting queries
heaps of times.
If you could figure this out and present it in an ASP page that would be
great!
/Lloyd