Select to view content in your preferred language

GUID in queryfilter where clause

2118
4
06-20-2011 06:49 PM
RickCote
Deactivated User
I'm sure that there's a simple answer to this but I'm missing it.

I want to query a feature class that has a column named PARENT_ID. The type is GUID.
My where clause is:

PARENT_ID = '6c1d6f56-b4d9-43ba-ac0a-038699229b6b'

I have records with this guid, but the featureClass.Search isn't returning features. Is there some trick to querying for a guid?

Thanks,
Rick
0 Kudos
4 Replies
VinceAngelo
Esri Esteemed Contributor
ArcSDE requires the left and right curly braces ('{6c1d6f56-b4d9-43ba-ac0a-038699229b6b}').
Without knowing what version of ArcGIS you're using, and what kind of data source, it's difficult
to give any other guidance.

- V
0 Kudos
RickCote
Deactivated User
I've also tried:

  "PARENT_ID = '{9dba6278-347d-4148-9e38-f4681fc88c29}'

I'm using the ArcEngine v. 9.3.1, and the data source is a file geodatabase.

Thanks,
Rick
0 Kudos
NickHarrison
Deactivated User
Try this:

LOWER("SYNC_ID") = '{6e6bca4b-fd5c-4de0-a97e-52ae96a9dfe7}'
0 Kudos
LanceShipman
Esri Regular Contributor
"SYNC_ID" = UPPER('{6e6bca4b-fd5c-4de0-a97e-52ae96a9dfe7}')

Will also work. This will be faster as it can use the index. LOWER("SYNC_ID") can't use the index.
0 Kudos