Possible errors:
Error converting data type varchar to uniqueidentifier
Or
Conversion failed when converting from a character string to uniqueidentifier
You must first convert the string to the uniqueidentifier type.
Example:
Declare@ GuidUniqueidentifier select@ Guid=Cast('16d85cfe-360f-44af-bc79-33bc1e89b698'As uniqueidentifier)ExecProc_getsiteusage @ guid
To create a new guid, do the following:
Declare@ GuidUniqueidentifierset@ Guid=Newid()Print'Value of @ guidis :'+Convert(Varchar(255),@ Guid)
Refer:
Generate GUID (unique identifier) in SQL Server
Http://www.dotnetspider.com/resources/4866-Generate-GUID-Unique-Identifier-SQL-Server.aspx
Failed to convert parameter value from string to guid
Http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/b3690c51-32fd-42cf-8c40-78407b9c4cc0
For more information about how to use stored procedures to obtain data, see
Http://www.informit.com/articles/article.aspx? P = 31283 & seqnum = 4
For the difference between cast and convert, refer
Http://www.informit.com/articles/article.aspx? P = 31283 & seqnum = 4