Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 28, 2012 01:32 PM by Ajay2707
Aug 28, 2012 08:43 AM|LINK
i would like to ask about i have 4 parameter, and those 4 parameter is used to filter column if the parameter is not empty.
how can i join those 4 parameter as filter column if it has value(not empty), if empty, just ignore this filter in select clause.
in this case only 2 and 4 para. has value
select * from table_1 where col_a=para_2 and col_b=para_4
but how can i join the clause and execute sql in package. (pl/sql oracle)
string sql='select * from table_a where 1=1');
string con=' and col_1='+para_1;
my logic like the above coding.
Aug 28, 2012 01:32 PM|LINK
select * from table_1 where col_a=para_2 and ( col_b=para_4 or para_4 is null)