79080864

Date: 2024-10-12 11:11:09
Score: 2
Natty:
Report link

The CTE table only exists for the first DELETE and is no longer available for the second. You should use a #TempTable or @VariableTable to collect deleted EmpIds. After that, you can use that table for joining and deleting rows that match with EmpIds.

Reasons:
  • Whitelisted phrase (-1.5): you can use
  • Low length (0.5):
  • No code block (0.5):
  • User mentioned (1): @VariableTable
  • Single line (0.5):
  • Low reputation (1):
Posted by: T.M.Q