This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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
Sheriff

Joined: Oct 14, 2005
Posts: 19719
    
  10

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: How to use underscore as literal not as wild char
 
It's not a secret anymore!