|
-
usually this is used for such thing:
you have do build dynamic where clause in application:
str_where:='1=1';
if A is not null then
str_where:=str_where||' AND T.A= '||A;
end if;
if B is not null then
str_where:=str_where||' AND T.B= '||B;
end if;
if C is not null then
str_where:=str_where||' AND T.C= '||C;
end if;
The nice thing is that you do not have to test str_where at every 'if' to add 'AND' inf front of it or not.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|