Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 3rd, 2008, 09:08 AM
Authorized User
 
Join Date: Feb 2008
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to disable the wildcards(% and _)

Hi Friends,
I have a search option in my web page. My input from UI is any thing like alphabets,numbers, special chars(%$#_). My query is select * from vendor where vendor_name like 'vendorname%'; The condition input is(vendorname) anything. Based on the input i have to display the results. My query is working fine for all conditions except the input % and _. B'coz, these values are wild cards in Database. How can I send as a String in database if the values are %_. I'm using Java, J2ee and DB2. Please help me.
Regards
Kasi.


Regards
Kasi
__________________
Regards
Kasi
 
Old February 4th, 2008, 12:32 AM
Friend of Wrox
 
Join Date: Oct 2007
Posts: 130
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via AIM to urtrivedi
Default

i m not sure but try backwork slash before special character

if user input is abd_dcd then replace(userinput,"_","\_")
if user input is abd_dcd then replace(userinput,"_","\_")

find proper syntax for replace function in front end you are using

urt

Help yourself by helping someone.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ObjectDataSource and Wildcards pipelineconsulting ASP.NET 2.0 Professional 1 October 19th, 2006 09:08 PM
XSLT Wildcards? kwilliams XSLT 2 September 28th, 2005 10:54 AM
Datetime, wildcards etc SoC Classic ASP Basics 6 July 19th, 2005 08:53 PM
Using wildcards in subquery hman SQL Language 2 April 11th, 2005 06:18 AM
Help using wildcards in query hman SQL Language 2 April 6th, 2005 03:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.