Conversion failed when converting from a character string to uniqueidentifier

  • Hello,

    I am trying to do an update based on a join condition and I am getting the following error:

    Conversion failed when converting from a character string to uniqueidentifier

    update PJ set PJ.efg=1 from abc pj join hackthis HAH

    on Pj.JID=hah.TId where pj.lss=0

    JID is a uniqueIdentifier and TID is an nvarchar(50). And I know its erroring out on the join condition because of 2 different datatypes.

    Is there a way that I convert/cast and fix this?

    Thanks

    “If your actions inspire others to dream more, learn more, do more and become more, you are a leader.” -- John Quincy Adams

  • cast on JID fixed the issue.

    “If your actions inspire others to dream more, learn more, do more and become more, you are a leader.” -- John Quincy Adams

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

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