I am working with a sql stored procedure that uses the WHERE NOT EXISTS clause. The stored procedure keeps getting stuck. Below is an example of the WHERE NOT EXIST clause that is being used.
In looking at this, I am thinking that the SELECT 1 FROM BstCustomer is the problem. Wouldn't is be better to do something like "SELECT TOP 1 * from BstCustomer where BstCustomer = inId). This is a sql server stored procedure.
WHERE NOT EXISTS ( SELECT 1 FROM BstCustomer where BstCustomer = inId)