Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unique Identifier

Status
Not open for further replies.

EscapeUK

Programmer
Jul 7, 2000
438
GB
How do I create a select statement where a pass a string looking for a unique identifier.

at the moment i try this....

select * from MyTable where documentid = 'FB6EE5A7-FO3B-11D4-BDD3-00508B8BCA16'

but get this

Syntax error converting from a character string to uniqueidentifier.
 
try following
-----------------------------------------
select* from yourtable where documentid
CAST('FB6EE5A7-FO3B-11D4-BDD3-00508B8BCA16' AS GUID)
-----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top