Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to get the count using list values sql

vsmNov 11 2014 — edited Nov 26 2014

DECLARE

v_rec_cnt number:=0;

Type v_table is table of varchar2(9);

card_tab v_table:= v_table(

'372131483',

'372131566',

'372131618',

'372131720',

'372131801',

'372131885',

'372131976',

'372132058' .......110000lacks records)

and org_colo_cam_id=6827;

begin

For i in card_tab.First..card_tab.Last

   loop

     SELECT count(1) into v_rec_cnt FROM dtc_tab_random_no dorn

      WHERE org_colo_cam_id = 6827 and

      nvl(attribute01,'@NULL@')='IN OFFICE'

      and dorn_card_no  = card_tab(i);        

      

       v_rec_cnt := v_rec_cnt + 1;

   end loop;

   dbms_output.put_line('count:'||v_rec_cnt);

   END;

i need to get the records  bove list values i have write the script execute i got this error can u please help for this

i have IN operator but 1000 is limit for IN operator thanks for help

Error at line 1

ORA-06550: line 4, column 11:

PLS-00801: internal error [22510]

ORA-06550: line 4, column 11:

PL/SQL: Item ignored

ORA-06550: line 117342, column 10:

PLS-00320: the declaration of the type of this expression is incomplete or malformed

This post has been answered by vsm on Nov 26 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 24 2014
Added on Nov 11 2014
4 comments
998 views