MSSQL IF/ELSE condition + LOG

DECLARE @DEBUG VARCHAR(MAX) DECLARE @NB_ROLE_EXISTANT int SET @NB_ROLE_EXISTANT=1 select @NB_ROLE_EXISTANT = count(*) from RASSEMBLEMENT IF @NB_ROLE_EXISTANT != 0 BEGIN SET @DEBUG = 'ROLE EXISTE ' + convert(varchar, @NB_ROLE_EXISTANT) RAISERROR(@DEBUG,0,83) WITH NOWAIT END ELSE BEGIN SET @DEBUG = 'ROLE EXISTANT ' RAISERROR(@DEBUG,0,83) WITH NOWAIT END

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.