Multiple Attributes into one Field or CSV

tl mike

Registered User.
Local time
Today, 11:00
Joined
Sep 7, 2007
Messages
117
I am trying to figure out a way to combine the options and attributes of a product into one field for export each having a different amount of options and attributes.

For instance I have a product table:
ProductPK
ProductName

Options Table:
OptionPK
Option

Attributes table:
AttributePK
Attribute

Then I have and Attributes to Product table:
ProductFK
OptionFK
AttributeFK
AttributeCost


So for instance I have the following products with the attributes
Field 1 Field 2
Product Options and Attributes

Field 1 Shorts001 - Field 2 Option Color - Attributes Green, blue, red

Field 1 Pants001 - Field 2 Option Size - Attributes Large + $10, Small + $5, X-Small

Field 1 Shirt001 - Field 2 Option Size - Attributes Large + $10, Small + $5, X-Small/ Option Color - Attributes Green, blue, red
 
Do a crosstab to bring all the attributes into fields then the next query simply concatenates them.

Stopher has at least a couple of fairly recent posts where he has demonstrated how the cross tab is done. One of them in the past month or so. It involves a DLookup to find the number of fields.
 

Users who are viewing this thread

Back
Top Bottom