/ Published in: SQL
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"
I convert uniqueidentifier to string (nvarchar(50)) and set a variable.
"%s" is equal to "string"
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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)
URL: http://msdn.microsoft.com/en-us/library/ms178592.aspx