john565218
I want to end the stored procedure if duplicate record is found.
What would be the best way to do it In the calling program VB6,
I would then like to capture the value 1 to display duplicate message.
Thanks.
IF EXISTS ( SELECT e.EmployeeID
FROM Employee e
WHERE
e.EmployeeID = @NewEmployeeID )
DROP dbo.#NewEmployee
RETURN 1
ELSE
...
...
END