DECLARE @temp varchar(50)
DECLARE @ID int=1234
SELECT @temp= CAST(@ID AS VARCHAR(50))
RAISERROR(N'This is how you concat with Raise Error %s',1,1 ,@temp);
output is
/*------------------------
DECLARE @temp varchar(50)
DECLARE @ID int=1234
SELECT @temp= CAST(@ID AS VARCHAR(50))
RAISERROR(N'This is how you concat with Raise Error %s',1,1 ,@temp);
------------------------*/
This is how you concat with Raise Error 1234
Msg 50000, Level 1, State 1
DECLARE @ID int=1234
SELECT @temp= CAST(@ID AS VARCHAR(50))
RAISERROR(N'This is how you concat with Raise Error %s',1,1 ,@temp);
output is
/*------------------------
DECLARE @temp varchar(50)
DECLARE @ID int=1234
SELECT @temp= CAST(@ID AS VARCHAR(50))
RAISERROR(N'This is how you concat with Raise Error %s',1,1 ,@temp);
------------------------*/
This is how you concat with Raise Error 1234
Msg 50000, Level 1, State 1
No comments:
Post a Comment