title: Declaring a Variable as a Unique identifier is not working fine
body: <p>I have written a simple SQL query where I declare a variable as an <code>UNIQUEIDENTIFIER</code> type, and I am trying to insert that into a table where the column is of <code>UNIQUEIDENTIFIER</code> type. But I get an error message saying </p>
  
  <blockquote>
    <p>Conversion failed when converting from a character string to uniqueidentifier.</p>
  </blockquote>
  
  <p>Can anyone help me with this?</p>
  
  <p>Here's my code:</p>
  
  <pre><code>DECLARE @SessionId AS UNIQUEIDENTIFIER;
  SET @SessionId='G51F4E30-E1AB-4E7E-8F5B-0E2613DC9001';
  
  PRINT @SessionId;
  
  INSERT INTO [DB_Name].[dbo].[table_name] ([SessionId])
  VALUES (@SessionId);
  </code></pre>