Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 combining multiple records int one record

Author  Topic 

kifeda
Posting Yak Master

136 Posts

Posted - 2010-05-24 : 20:01:07
I'm writing an array in asp and I need to combine several records into one so I can insert the value into the database. Okay, so I have a product and the product has multiple options and values. So for example the door- which is the product, has table for options. In the options table there is door color, door size, door height, etc. There is also table for option values. That table has the primary key for the options table and the corresponding value. So when I combine these table together through inner joins, I get for example, five records for the door:

this is the productOptions table:

intproductOptionsId | intproductId | strlabelname | strvalue
-------------------------------------------------------------
54 44 DoorType Single
12 44 Color Red
36 44 Stype French

They all have the same inproductid, but how can I combine this into one record?

zstarsales04
Starting Member

20 Posts

Posted - 2010-05-25 : 02:26:07
spam removed
Go to Top of Page

kifeda
Posting Yak Master

136 Posts

Posted - 2010-05-25 : 11:17:18
what spam? this isn't spam it;s a legitimate question
Go to Top of Page

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2010-05-25 : 11:19:58
The "spam" was not about your post. It was a post from zstarsales04.

For your question, how should the output look like?
You say..it should be only 1 row...how should that combined row look like.

Also post your query that gave you the above result set.
Go to Top of Page
   

- Advertisement -