Click here to Skip to main content
15,889,595 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have a following file names in my database.
TestDocument _ 1 _ 0
TestDocument _ Evidence
Test45

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 shouldn't return any record.
please tell me the changes in the following expression.

UPPER(DOC.ORIGINAL_FILE_NAME) like '%TEST_%'

Thanks,
Umesh Tayade
Posted
Updated 23-May-11 5:22am
v2

In t-SQL the underscore, "_", is also a wildcard character. While the percent sign, "%", accepts any values in any number of characters, the underscore accepts any value for exactly one character.
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900