COALESCE(NULLIF(@intError, 0), @@ERROR)
Database
1
Posts
1
Posters
0
Views
1
Watching
-
Anybody know if the COALESCE(NULLIF ...)...) can raise error itself, and if it safely to use this combination of checking error status Every time after i calling to some store procedure i use this: ------------------------------------------ DECLARE @intError int EXEC @intError = myProcedure @param1, @param2 ..... SELECT @intError = COALESCE(NULLIF(@intError, 0), @@ERROR) IF(@intError =0 ) ...... ...... -------------------------------------------- my question is, can the @@ERROR variable have an error that COALESCE or NULLIF function were raise? Thanks. P.S. if it's not good idea to use it after calling to stored procedures so what can u advice me ------------------------------------ To study, study and only to study