The  missing from is a typo error. There is no error. The count doesnt
match. But I found the issue to be mismatch(char and varchar) in
datatypes between the table column type returned from the function and
zipcodes column. Thanks for your time.

Sairam

On Apr 5, 12:21 pm, Andrej Hopko <[email protected]> wrote:
> First I see missing clause FROM in first select (INTO CNT {FROM}
> TBL_ADDRESS)
>      if that does not help, then write again and error code ORA or PLS
> would be helpful next time
>
> regards
>
> Andrej Hopko
>
> On 5. 4. 2010 17:42, Sairam 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

Reply via email to