我需要在報告工具中爲提示寫一個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