I have a form that has a checkbox list. The form gets submitted and the checkbox list is saved into an array list. I want to save the main form data to one table and then save the ID created to the linking table with each item checked in the checkbox list.
I want to use a stored procedure to do this, so how do I get the ID that was just inserted and how can I pass the list of checkbox values that I stored in the array list?
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs).
Being someone who is always looking for alternatives to "work your data", I came across this …