Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Question w/code attch

PL/SQL Question w/code attch

From: Robert Ogren <rmogren_at_gte.net>
Date: Wed, 30 Sep 1998 23:04:17 -0700
Message-ID: <6uv5va$38o$1@news-1.news.gte.net>

I have having trouble getting this code to insert the "record" into a table.
I have not used a lot of the PL/SQL. Current Version O8.0.4 SQL

I get the problem oon the INSERT LINE
the Error I get is BAD BIND VARIABLE BUSYHOUR

The other wierd thing is that the DBMS_OUTPUT.PUT_LINE doesn't send anything to the screen.

Thanks for any information

Rob


CREATE OR REPLACE PROCEDURE BBusyHour(

        p_CurrentDate IN tblDayEcell.timeperiod%TYPE )
IS

    currentHour         CHAR(5);
    currentDate         CHAR(10);
    selectDate          CHAR(19);
    currentNetID        NUMBER;
    counter             NUMBER;

BEGIN     DECLARE
      TYPE sTimes_t IS VARRAY(48) of CHAR(5);

      TYPE busyrecord IS RECORD (
             timep      CHAR(19),
             netid      NUMBER(6,0),
             hold3      NUMBER(6,0),
             hold6      NUMBER(6,0),
             dispatch   NUMBER(6,0),
             control    NUMBER(6,0)
        );

       busyHour  busyrecord;

       sTimes sTimes_t := sTimes_t('00:00', '00:30', '01:00', '01:30',

'02:00', '02:30', '03:00', '03:30', '04:00',
'04:30', '05:00', '05:30', '06:00',
'06:30', '07:00', '07:30', '08:00', '08:30',
'09:00', '09:30', '10:00', '10:30',
'11:00', '11:30', '12:00', '12:30', '13:00',
'13:30', '14:00', '14:30', '15:00',
'15:30', '16:00', '16:30', '17:00', '17:30',
'18:00', '18:30', '19:00', '19:30',
'20:00', '20:30', '21:00', '21:30', '22:00',
'22:30', '23:00', '23:30'); currentDate := p_CurrentDate; selectDate := currentDate || currentHour; FOR counter IN 1..sTimes.COUNT LOOP BEGIN SELECT timeperiod,network_id,t_tch_hold_times_3, t_tch_hold_times_6, d_tch_hold_times,t_dcch_hold_times INTO busyHour FROM tblDayEcell ecell WHERE ecell.timeperiod = selectDate; EXCEPTION WHEN NO_DATA_FOUND THEN NULL; END; DBMS_OUTPUT.PUT_LINE(sTimes(counter)); DBMS_OUTPUT.PUT_LINE(counter); INSERT INTO tblBUSYHOUR VALUES(:busyHour); selectDate := currentDate || sTimes(counter); END LOOP;

    END;
END; Received on Thu Oct 01 1998 - 01:04:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US