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
 combing tables from multiselect

Author  Topic 

tpiazza55
Posting Yak Master

162 Posts

Posted - 2007-02-09 : 09:10:15
i have a form that has a checkbox list

a table called checkboxitems populates the checkboxlist (checkname, checkid) and when submitted the selected items are put into another table's column selecteditems like "1,5,9"

is there a way to do an inner join or something to get the checkname dependent on which which items are in the selectitems

sshelper
Posting Yak Master

216 Posts

Posted - 2007-02-09 : 10:23:25
What you can do is to convert that comma-delimited values of selected items into a table using a table-valued function then use that table to join with your other table. Here's a link that performs something similar to what you are trying to accomplish:

http://www.sql-server-helper.com/functions/comma-delimited-to-table.aspx

SQL Server Helper
http://www.sql-server-helper.com
Go to Top of Page
   

- Advertisement -