DECLARE @CustomerId nvarchar(10) SET @CustomerId = 'Test' RAISERROR ('CustomerId ''%s'' does not exist in Customer table. Error: %o.', 16, 1, @CustomerId, @@ERROR)>The following raiserror works:
>RAISERROR ('CustomerId does not exist in Customer table. Error: %o.', 16, 1, @@ERROR) >>
>CustomerId einar does not exist in Customer table. Error: 0. >>