Using wildcard character
-
Hi, I have a following file names in my database. TestDocument _ 1 _ 0 TestDocument _ Evidence Test45 123_publish when i am entering the Test_ in the DocumentName textbox it is forst converted to uppercase and send to the query and query has following expression which returns all record where it should not have to return any record. please tell me the changes in the following expression. I am using the Oracle10g database. UPPER(DOC.ORIGINAL_FILE_NAME) like '%TEST_%' Thanks, Umesh Tayade .
-
Hi, I have a following file names in my database. TestDocument _ 1 _ 0 TestDocument _ Evidence Test45 123_publish when i am entering the Test_ in the DocumentName textbox it is forst converted to uppercase and send to the query and query has following expression which returns all record where it should not have to return any record. please tell me the changes in the following expression. I am using the Oracle10g database. UPPER(DOC.ORIGINAL_FILE_NAME) like '%TEST_%' Thanks, Umesh Tayade .
OK, I've already answered this in the C# forum, but I'll answer it here as well. As you are aware, the _ is a wildcard character, so it matches any character. If you need to match the _ as a valid character, then you need to escape it with the \ character, which means that your query becomes:
UPPER(DOC.ORIGINAL_FILE_NAME) like '%TEST\_%'
Forgive your enemies - it messes with their heads
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Hi, I have a following file names in my database. TestDocument _ 1 _ 0 TestDocument _ Evidence Test45 123_publish when i am entering the Test_ in the DocumentName textbox it is forst converted to uppercase and send to the query and query has following expression which returns all record where it should not have to return any record. please tell me the changes in the following expression. I am using the Oracle10g database. UPPER(DOC.ORIGINAL_FILE_NAME) like '%TEST_%' Thanks, Umesh Tayade .