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

Home -> Community -> Usenet -> c.d.o.tools -> SQL Question

SQL Question

From: Wade Koteras <wade_at_igis.com>
Date: 1997/02/04
Message-ID: <01bc12b4$0cd91da0$eaa1e226@salsa>#1/1

I am using the Microsoft Internet Database Connector to hook some Java forms to an Oracle database. I'm running into a problem with a statement similar to the following:

select ... where lease_no like '%form_lease_no%'

What happens is that if the user does not enter a search value for the form_lease_no variable, the Internet Database Connector fills it in with a wildcard (%). The problem is that the wildcard will not match a null field (I think) and so records with null lease_no fields do not match. Is there a way around this in SQL or will I have to resort to generating the SQL from within Java?

TIA, Wade Received on Tue Feb 04 1997 - 00:00:00 CST

Original text of this message

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