I have an existing view that returns data in the following format based on aggregating option names that have the same product_id. The view name is "vProdOptions"
option_name product_id
XSMALL (2-6) 17854
SMALL (6-10) 17854
MEDIUM (10-14) 17854
LARGE 18232
How do I return this data in an aggregated view formatted like this?
OPTIONS_AVAIL Product_ID
XSMALL (2-6), SMALL (6-10), MEDIUM (10-14) 127182
SMALL (6-10), MEDIUM (10-14) 166382
I am using MS SQL 2k5.
I am creating a new question here based on comments from these two questions. I realized that I needed a view instead.
http://stackoverflow.com/questions/2239375/error-with-sql-function-creation