我需要在报告工具中为提示写一个sql。我得到了用' - '分隔的变量中的多个值的列表,并且这些值的数目可以变化(例如,“abc-def”eg2。“abc-def-xyz”)。动态数字在哪里条件在oracle中sql
现在我需要写这种形式(逻辑)的的Oracle SQL
select something
from somewhere
where someColumn in 'abc' -- use substr to extract abc
or someColumn in 'def' -- use substr to extract def
or ...till we don't find '-'.
我不能使用PLSQL的查询。要么我可能不知道要使用plsql中选择的变量,或者可能是报告工具不支持该变量。
在此先感谢。
我编辑了问题。你介意看看那个吗? – chemicalkt 2012-07-19 03:30:11