View Full Version : De-normalize via query


CHRISTOPHER LENCKUS
12-19-2001, 06:47 AM
Good day all,
I have a table of items(cars, rugs or whatever), and a table of options(colors or whatever). I split up (normalized) the item table to eliminate the repeating fields of available options.

I need to show(via datasheet form)the available options for each item in one row.

Or, said another way, How can I put all the many in the same row as the one ?

What is the best way to do this?

Thanks
Chris

glynch
12-21-2001, 04:54 AM
Is the relationship between items and options one-to-many or many-to-many?

If it is only one item to many options then you can include an itemid field in your options table and then query all of the options that have a certain itemid value.

If it is many-to-many then you would need to create a third table holding one record for each incidence of an item and an option. Then query the third table however you want to get the desired result.

Both of these would create a query result set that consists of records, you said you wanted all of these values on a single row. Is that correct?

Bot

Dreamboat
12-22-2001, 09:20 PM
glynch: You think chris might just be talking about a cross-tab query? Just a thought.