Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

BEGIN AND END INSIDE TRY BLOCK

$
0
0

I HAVE FOLLOWING CODE STRUCTURE.

BEGIN TRY

IF EXISTS(CHECK IF VALUES EXISTS)

        BEGIN

                  DO SOMETHING

        END

END TRY

BEGIN CATCH

                LOG ERRORS INTO TABLE

END CATCH

with the above structure. If i just run if exists it is wokring fine. If i run whole code it keeps on running and it never stops. Not sure if there is something wrong with code. Let me know if this is the correct way or if there is better approach for this.

Thanks in advance


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>