Sample Header Ad - 728x90

Conversion failed when converting from a character string to uniqueidentifier

2 votes
1 answer
28776 views
I am creating a Dynamic CRM 2011 Report in SSRS. I use several joins, And use GUID in joins. For ex : Quote.OpportunityId=Opprtunity.OpportunityId The problem comes from parameters. I have a parameter which its label is a name and the value is GUID of a record. I retrieve them from a Dataset. The query of the this Dataset(named siteDataset) is this : select site.SiteId, site.Name from Site; the siteId goes to the value of the parameter and site.name goes to the label of the parameter, the Parameter is named siteId itself. But when I try to do this in another DataSet : siteGUIDInAnotherEntity='@siteId' Give me the subject Error. I even tried this : CONVERT(VARCHAR(50), site.SiteId) in siteId DataSet; But no success. Any help will appreciated.
Asked by alireza azadi (25 rep)
Feb 20, 2019, 12:56 PM
Last activity: Aug 9, 2019, 01:02 PM