Based on the query you typed, it looks like your query string is a concatenation with the values entered, in which case you're already usign dynamic SQL. If not, then instead you could do something like this:
from emp_main a, emp_info b
where (t1_Date between :p_start and :p_end
or :p_start is null or :p_end is null)
and (Account= :p_account or :p_account is null)
and (customer= :p_customer or :p_customer is null)
01-29-2004, 02:17 AM
Thx for the reply,
But if i have to search based on ACCOUNT and CUSTOMER,
and i am sending an IN parameter, i want the cout to be based on both.
But if Customer is NULL and Account has a value, then i want to exclude that in the count.