Since adding the "IN" statement I now get the following error: ERROR [42000] [Microsoft][SQL Server Native Client 11.0][SQL Server]Must declare the scalar variable "@status1". Connection string is as ...