Input Values Examples : P_ORDER_NUMBER = 5502158, 70045432 , 70045421
SELECT *
FROM oe_order_headers_all
WHERE 1 = 1
AND ( (ORDER_NUMBER IN ( SELECT REGEXP_SUBSTR (:P_ORDER_NUMBER
, '[^,]+'
, 1
, LEVEL)
FROM DUAL
CONNECT BY REGEXP_SUBSTR (:P_ORDER_NUMBER
, '[^,]+'
, 1
, LEVEL) IS NOT NULL))
OR (ORDER_NUMBER IS NULL AND :P_ORDER_NUMBER IS NULL)
OR:P_ORDER_NUMBER IS NULL);
SELECT *
FROM oe_order_headers_all
WHERE 1 = 1
AND ( (ORDER_NUMBER IN ( SELECT REGEXP_SUBSTR (:P_ORDER_NUMBER
, '[^,]+'
, 1
, LEVEL)
FROM DUAL
CONNECT BY REGEXP_SUBSTR (:P_ORDER_NUMBER
, '[^,]+'
, 1
, LEVEL) IS NOT NULL))
OR (ORDER_NUMBER IS NULL AND :P_ORDER_NUMBER IS NULL)
OR:P_ORDER_NUMBER IS NULL);
No comments:
Post a Comment