HI Sergey,
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}')
Margaret.