I have a form with a multiple select form field among other fields called "IDAgent2".
That form calls a stored procedure and IDAgent2 is passed to the stored procedure.
Let's say IDAgent2 equals "1, 2, 3".
I need to repeat the following insert query for each value Y inside of IDAgent2 (1, 2 and 3):
INSERT INTO X
(IDAgent, IDEvenement)
VALUES (Y, @IDEvenement)
How do I parse @IDAgent2 for the different values separated by "," to run that query for each of them within the stored procedure?
Thanks.
That form calls a stored procedure and IDAgent2 is passed to the stored procedure.
Let's say IDAgent2 equals "1, 2, 3".
I need to repeat the following insert query for each value Y inside of IDAgent2 (1, 2 and 3):
INSERT INTO X
(IDAgent, IDEvenement)
VALUES (Y, @IDEvenement)
How do I parse @IDAgent2 for the different values separated by "," to run that query for each of them within the stored procedure?
Thanks.