This my procedure, when i try to run the procedure it says
"coitem_linenumber" is not a scalar variable.
Can any one say what is the error and how i can correct it
Expand|Select|Wrap|Line Numbers
- declare
- wotype CHARACTER;
- id integer;
- so_no ALIAS FOR $1;
- _wono integer;
- _wolno integer;
- woisid integer;
- wostdate date;
- wosdate date;
- woqty integer;
- wopno text;
- woprj integer;
- woordid integer;
- BEGIN
- select max(wo_id) into id from wo;
- wotype := 'W';
- LOOP
- IF id=0 THEN id=1;
- ELSE id=id+1;
- END IF;
- UPDATE coitem SET coitem_order_type=wotype,coitem_order_id=id
- WHERE (coitem_cohead_id=(SELECT cohead_id from cohead where(cohead.cohead_number=so_no)));
- select
- cohead_number into _wono,
- coitem_linenumber into _wolno,
- coitem_itemsite_id into woisid,
- coitem_lastupdated into wostdate,
- coitem_scheddate into wosdate,
- coitem_ordqty into woqty,
- (cust_number||'-'||cust_name) into wopno,
- cohead_prj_id into woprj
- from custinfo,cohead,coitem
- where ((cust_id=cohead_cust_id) and (cohead_id=coitem_cohead_id) and (coitem_order_id=id));
- select max(evntlog_order_id) into wo_ordid from eventlog where(eventlog_number=(wo_no||'-'||wo_lno));
- Insert into wo values(id,wo_no,wo_lno,'R',wo_isid,wo_stdate,wo_sdate,'S',wo_ordid,wo_qty,0,'','','',0,0,wo_pno,wo_prj,1,0) ;
- END LOOP;
- END;