title: Convert UniqueIdentifier to string in SQL Server
body: <p>I want to convert <code>UniqueIdentifier</code> value to string value so I can read it.</p>
  
  <p>I am working SSRS Report where I have set datasource for one report. Now, ReportServer has one table named as <code>DataSource</code> and it has one column named as <code>Link</code> and its type is <code>Link uniqueidentifier no  16</code>.</p>
  
  <p>Is it possible to convert this value into <code>varchar()</code>?</p>
  
  <p>I have tried below but it gives same value.</p>
  
  <pre><code>--To fetch Link
  SELECT ds.Link,CAST(ds.Link AS VARCHAR(36)) str
  FROM   DataSource    AS ds
         JOIN CATALOG  AS c ON  c.ItemID = ds.ItemID
  WHERE  c.Name = 'ReportName'
  </code></pre>
  
  <p>It gives output like this,</p>
  
  <p><a href="https://i.stack.imgur.com/9HaVe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9HaVe.png" alt="enter image description here"></a></p>
  
  <p><strong><em>Note:</strong> I have already checked <a href="https://stackoverflow.com/questions/6299918/sql-server-converting-uniqueidentifier-to-string-in-a-case-statement"><strong>this</strong></a>, but doesn't helped me.</em></p>