Hi All,
I am using a Dynamic SQL to call an Oracle query. Now this query has number of conditions in where clause. The user can pass a value or not, so if I am using the variable place holder(?) then I am not able to do null check.
The where caluse is something like this:
where ( lmi_ref_no = ? or ? is null )
and( request_primary_borrower = upper(?) or ? is null )
If user does not pass lmi number, then I have to skip that search parameter in where clause. But in that case ? becomes blank and the where clause becomes ’ ’ is null which fails.
Is there a way to defineth input parameters at run time or atleast pass null bvalue in them?
Note: I am avoiding using ${} construt because of DBA directive.