Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: alias error code on cursor select oracle 7.1.3?
The Legend wrote:
> hello could someone help me out on the next script i got the next error code
> on oracle 7.1.3.
>
> CURSOR get_the_info IS
> *
> ERROR at line 15:
> ORA-06550: line 15, column 8:
> PLS-00402: alias required in SELECT list of cursor to avoid duplicate column
> names
> ORA-06550: line 28, column 6:
> PL/SQL: Item ignored
>
> on this script what to me seems normal:
>
> DECLARE
> D_ORDNO VARCHAR2(15);
> D_COMP VARCHAR2(2);
> D_ORD_RDY VARCHAR2(1);
> D_WAVENO NUMBER(9);
> D_SHIP_DATE VARCHAR2(9);
> D_SCAN_DATE VARCHAR2(9);
> D_LINENO NUMBER(9);
> sql_code_num NUMBER(9);
> v_i NUMBER(1);
> v_j NUMBER(1);
> geen_ordrdy exception;
> geen_intface exception;
>
> --declare cursor
> CURSOR get_the_info IS
> select distinct do.comp,
> do.waveno,
> ds.ordernummer,
> ds.order_rdy_flg,
> trunc(ds.scan_date_time),
> trunc(ds.ship_date)
> from digi_check_serial ds,
> digi_check_orders do
> where ds.order_rdy_flg = '0'
> and do.orderno = ds.ordernummer
> group by do.comp,do.waveno,ds.ordernummer,ds.ordernummer,
> ds.order_rdy_flg,ds.scan_date_time,ds.ship_date;
> info GET_THE_INFO%ROWTYPE;
> BEGIN
> DBMS_OUTPUT.enable(20000);
> v_i := 5;
> v_j := 1;
> open get_the_info;
> WHILE v_i < v_j LOOP
> fetch get_the_info into d_comp,d_waveno,d_ordno,d_ord_rdy,
> d_scan_date,d_ship_date;
> EXIT WHEN GET_THE_INFO%NOTFOUND;
>
>
> thnks in advance,
>
> Ed
>
>
>
>
Hunching that line 15 is with the trunc...
trunc(ds.scan_date_time) as sdt,
trunc(ds.ship_date) as sd
probably in group by, too
-- Regards, Frank van BortelReceived on Wed Apr 28 2004 - 14:27:25 CDT