Good evening.
I have the following example procedure
CREATE PROCEDURE sp_listaFuncionarios
@nome_dept varchar(50)
as
SELECT * FROM Funcionarios WHERE nome_departamento IN (@nome_dept)
If, during the procedure call, you want to pass two concurrent values, such as Sales and Marketing.
I called the procedure this way
EXEC sp_listaFuncionarios '''Marketing'',''Vendas'''
But it does not return anything. I made a test by checking the value that is written to a variable
'Marketing','Vendas'
Taking this value and passing it directly into the query returns the values quietly.
Any suggestions on what I can do in the code?