Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to delimit a GUID in a SQLEXEC statement
Message
From
07/05/2004 13:09:45
 
 
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:
00901979
Views:
10

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}')


you can use:
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')

--or a binary version with the 3 left groups reverted

SELECT dlID2, dlID1, dlLTID, 2, 0 AS Processed, ltDESC, ltDESC 
FROM DataLink 
INNER JOIN LinkType ON ltID = dlLTID
WHERE  dlID1 = 0x13E463BE51CD894D8D17AF79829F21CE
....
Previous
Reply
Map
View

Click here to load this message in the networking platform