Product Attribute Segment Data Source Strategy

Q: I have source attribute data that looks like the following:

PartNumberColorTexture
P1RedSmooth
P2BlueRough

What should my SQL look like to allow PIESCentral to load this data?

A: The query will look like this:

select [PartNumber], 'Color' as AttributeID, [Color] as AttributeData from Parts  
union  
select [PartNumber], 'Texture' as AttributeID, [Texture] as AttibuteData from Parts

This will produce the following:

PartNumberAttributeIDAttributeData
P1ColorRed
P1TextureSmooth
P2ColorBlue
P2TextureRough

Just repeat the above pattern, with one select for each attribute, separating the selects with ‘union’.

Revised: 2013-09-24