I have an object that has a string field that I store object id's in. When my apex code runs it looks at the object id in the string field and queries the apprpriate object unfortunately the where clause is not performing a case sensitive search so and id like '000000000000abc' matches id's like '000000000000abC', '000000000000aBc', '000000000000ABC' etc. and I need it to perform and exact match in the where clause. How do I do this?
Note the parentid__c in my custom object is a 18 character text field
CustomObject[] co = [select parentid__c from CustomObject__c where id='xxxx'];
string s = co.parentid__c;
Case[] c = [select id, name from case where id=:s];
returns more than the one record I'm looking for