Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to delimit a GUID in a SQLEXEC statement
Message
 
 
To
07/05/2004 12:47:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00901407
Message ID:
00902318
Views:
13
Margaret,

SQL Server doesn't require curly bracets and can covert 'BE63E413-CD51-4D89-8D17-AF79829F21CE' to a uniqueidentifier just fine. You can use SQL Profiler to see what actualy was sent to SQL Server.

>
>I truncated the last 4 characters of the GUID when I posted it on UT. It is a valid GUI of 36 value 'BE63E413-CD51-4D89-8D17-AF79829F21CE'
>
>I tired some more things this AM. The solution seems to be that when I build the statement because it a GUID I need to double delimit it with the ' and then with {. With both delimiters it runs.
>
>
>SELECT dlID2, dlID1, dlLTID, 2, 0 AS Processed, ltDESC, ltDESC
>FROM DataLink
>INNER JOIN LinkType ON (ltID = dlLTID)
>WHERE  dlID1 = '{BE63E413-CD51-4D89-8D17-AF79829F21CE}'
>and dlid2 not
>in('{BE63E413-CD51-4D89-8D17-AF79829F21CE}','{DDC0D5BB-D4CF-40D5-AFB0-9777A64C85B2}')
>
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform