Revision: 40619
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 4, 2011 11:48 by emregulcan
Initial Code
DECLARE @raiseErrorCode nvarchar(50) SET @raiseErrorCode = CONVERT(nvarchar(50), YOUR UNIQUEIDENTIFIER KEY) RAISERROR('%s INVALID ID. There is no record in table',16,1, @raiseErrorCode)
Initial URL
http://msdn.microsoft.com/en-us/library/ms178592.aspx
Initial Description
You can see details on http://msdn.microsoft.com/en-us/library/ms178592.aspx , but I try to explain how you throw error with "uniqueidentifier" type parameters. I convert uniqueidentifier to string (nvarchar(50)) and set a variable. "%s" is equal to "string"
Initial Title
sql Raiserror with parameters
Initial Tags
sql
Initial Language
SQL