Oracleで動的クエリを使用していますが、条件のどこに文字列パラメーターを渡すと、機能しません。
for x in (
SELECT DISTINCT column_id
FROM table
WHERE column_id in (in_column_ids)
/* WHERE column_id in (15,16,17) =>works */
/* => in_column_ids is a varchar type which
holds comma separated value */
and column_title=in_column_title /* works */
)
ここで、その in_column_ids に値を直接保持すると、クエリが機能します。しかし、パラメータとして渡されている値は では機能しないようですwhere in
。
何か案が ?