[求助]在存贮过程中的查询语句如何让它实现动态条件查询?
我写了个存贮过程,其中有个隐式游标
for curl in (Select repo_code,repo_module,repo_name,sts From repo_tm
Where sts='A' And repo_code = nrepo_kind1
and repo_module =nrepo_kind2
Order By repo_code )
其中nrepo_Kind1,nrepo_kind2是存贮过程中的变量,如果要实现查询条件动态,如实现结果为 repo_module in('11','12') and repo_code Not In ('9901','9902','9977'),也就是说实现nrepo_kind1,nrepo_kind2动态,可能有时为in 有时为= 有时为like ,在存贮过程中应该如何编写呢?
请大大们多多指教!