Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> how do I pass the wildcard operator with a bind variable?

how do I pass the wildcard operator with a bind variable?

From: Eric Schlene <eschlene_at_purdue.edu>
Date: Wed, 01 Jul 1998 16:08:04 -0500
Message-ID: <359AA534.7EC0F3D1@purdue.edu>


I'm querying my database via the web using a stored procedure that accepts parameter arguments bound to variables within the select string. Specifically, my calling HTML form sends a five-character ZIP code string parameter. And it is evaluated in the where clause, ala
"WHERE address.zip_code LIKE :zip"

Ideally, I'd like the user to be able to enter a partial ZIP code, e.g.,
"902" , and get back all 902xx hits. Unfortunately, I don't seem to be
able to pass the "%" sign in the URL.

I've come up with a hack using single character wildcards, like this... RPAD(RTRIM(:zip),5,''_''). But the response time is unacceptable.

Anyone have a great idea on how to do this?

Thanks!

Eric Received on Wed Jul 01 1998 - 16:08:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US