Hi, I need to delete some rows from table where indexes are equal indexes in table variable
declare @m_table as table
(
number NUMERIC(18,0)
)
...
inserting some rows into @m_table
...
DELETE ct FROM [dbo].[customer_task] ct
inner join project_customer pc on pc.id_customer = @m_table.number
inner join customer_user cu on cu.id_project_customer = pc.id
WHERE ct.id_csr_user = cu.id AND ct.id_status = 1;
but this code generates an error: Must declare the scalar variable "@m_table" How to solve that ?