We are running on oracle 10g.
I am building the sql in the report builder 10g,
the requirement is when the user passes :p_vendor, one value, then it should
get the result for that vendor,
if the user does not pass anything then :p_vendor = 'ALL'. (all vendors)
here is my shot at that :
WITH vendorinfo AS
(
select
primaryvendor,
vendor,
memocount,
unreadcount,
unreadperct,
unreadlist
from inspivendormemo_vw
)
SELECT
primaryvendor,
vendor,
memocount,
unreadcount,
unreadperct,
unreadlist
FROM vendorinfo
WHERE (:p_vendor = 'ALL' and primaryvendor IN (SELECT primaryvendor FROM vendorinfo))
or
:p_vendor != 'ALL'
-----------------------------------------
I am getting the following error when i say ok in query builder. :
ORA - 24324 : service handle not initialized
WHERE (:p_vendor = 'ALL' and primaryvendor IN (SELECT primaryvendor FROM vendorinfo))
am i doing something wrong? syntax issue? please help.
Billu.