Convert VChar(100) to GUID in a stored proc

  • I have a classic asp page that is accessed via different pages. In some situations the:

    Request.QueryString("Contract_ID") is a vchar(100) and sometimes is coming a GUID.

    When it is vchar(100) and this value is passed to a stored proc, I want to check the data type and if it is not a uniqueidentifier type, I want to convert it to a uniqueidentifier type.

    How can I do that?

  • Duplicate post. No replies to this thread please. Direct replies to:http://www.sqlservercentral.com/Forums/Topic779934-338-1.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply