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: NGENUITY <resumes_at_ngenuity.com>
Date: 1997/02/03
Message-ID: <01bc1213$77d3a950$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 Mon Feb 03 1997 - 00:00:00 CST

Original text of this message

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