I want to delete rows who specific column exists in select statement like:
delete from [ProjectCustomer] pcc
where ProjectKey in (
select p.ProjectKey
FROM [Project] AS [p] inner JOIN [ProjectDesign] AS [pd] ON [p].[ProjectKey] = [pd].[ProjectKey]
inner JOIN [Design] AS [d] ON [pd].[DesignKey] = [d].[DesignKey]
inner JOIN [ProjectCustomer] AS [pc] ON [pc].[ProjectKey] = [p].[ProjectKey]
inner join Customer as c on pc.CustomerKey = c.CustomerKey
where d.Folio = 3014)
But in where clause of delete statement I get
Incorrect syntax near where clause
What am I doing wrong? Regards
delete pcc from [ProjectCustomer] pcc