Query with Underscore Character
Posted: Thu 10 Dec 2009 09:27
Hello,
I use dotConnect for Oracle V 5.25.49 together with the Entity Framework and an Oracle 10g database and I want to query for database entries which contain an underscore character. For this I use following statement:
var l_Query = l_EntitiesContext.CUSTOMER.Where(item => item.LASTNAME.Contains("_"));
This statement returns the whole dataset of the CUSTOMER table independent from the LASTNAME entry because the underscore character is interpreted as a wildcard for a single character.
Is there any possibility to 'escape' the underscore character to tell the provider respectively the database not to use it as wildcard ?
Thank you for your help.
Best Regards,
Volker
I use dotConnect for Oracle V 5.25.49 together with the Entity Framework and an Oracle 10g database and I want to query for database entries which contain an underscore character. For this I use following statement:
var l_Query = l_EntitiesContext.CUSTOMER.Where(item => item.LASTNAME.Contains("_"));
This statement returns the whole dataset of the CUSTOMER table independent from the LASTNAME entry because the underscore character is interpreted as a wildcard for a single character.
Is there any possibility to 'escape' the underscore character to tell the provider respectively the database not to use it as wildcard ?
Thank you for your help.
Best Regards,
Volker