Try this,
If you understand this, then you understand your problem.

SELECT COUNT( * )
  FROM DUAL
 WHERE dummy IN( SELECT *
                  FROM DUAL
                UNION ALL
                SELECT *
                  FROM DUAL );


On Mon, Apr 5, 2010 at 8:42 AM, Sairam <[email protected]> wrote:

> DECLARE
>  cnt number(10);
>  BEGIN
>                SELECT COUNT(*) INTO CNT TBL_ADDRESS WHERE ADDRESS_ZIP
> IN (SELECT * FROM TABLE(MY_PACK.STR2TBL('46227')));
>                DBMS_OUTPUT.PUT_LINE (cnt);
>  END;
>
> MY_PACK.STR2TBL() is a function which takes '|' delimited string,
> extracts values and returns a table of zipcodes. The function works
> fine and returns 46227 but the count returned is 0 instead of
> 280(count returned by directly running the query with 46227 in where
> clause).
>
> Cluesless so far on whats wrong. Any ideas please? Please help.
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Oracle PL/SQL" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/Oracle-PLSQL?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en

Reply via email to