aspose file tools*
The moose likes JDBC and the fly likes How to use underscore as literal not as wild char Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Reply locked New topic
Author

How to use underscore as literal not as wild char

cute nonni
Greenhorn

Joined: Jan 02, 2012
Posts: 7
Hello dears,


I'm using oracle and need to use the underscore as literal not as wild char in qurery

I found on the internet something like this




and if there is SAMPLE_NAME equales ABC_XYZ it will be feached


but in my case the string that i compare to is variable(entred by user)



Is there any way to disable using '_' as wildchar in general in queris???

or the only solution is to process user input before using it in LIKE statement !

thanks in advance
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18657
    
    8

That looks like it's a duplicate of this post: http://www.coderanch.com/t/589575/JDBC/databases/underscore-as-literal-not-as... so let's keep that as the active thread and close this one.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use underscore as literal not as wild char