• DECLARE @TABLE AS TABLE(

    id UNIQUEIDENTIFIER)

    INSERT INTO @TABLE

    SELECT Newid()

    SELECT *

    FROM @TABLE

    WHERE CONVERT(VARCHAR(255), id) = 'd65cafc-1435-45d3-acce-dc464f02c4b1'

    How's that?


    Forever trying to learn
    My blog - http://www.cadavre.co.uk/
    For better, quicker answers on T-SQL questions, click on the following...http://www.sqlservercentral.com/articles/Best+Practices/61537/
    For better, quicker answers on SQL Server performance related questions, click on the following...http://www.sqlservercentral.com/articles/SQLServerCentral/66909/