Home » RDBMS Server » Server Administration » Re: long raw
Re: long raw [message #369839] Thu, 19 October 2000 14:23
Don Thaler
Messages: 8
Registered: October 2000
Junior Member
I used the following script which uses the oracle
utl_raw procedure:
DECLARE
B LONG RAW;
MBASE_ID VARCHAR2(30);
MPIECE_NO NUMBER ;
MPART_ID VARCHAR2(30);
MCOMMENT VARCHAR2 (2000);
XLENGTH NUMBER;

CURSOR C1 IS
select rpad(rq.workorder_base_id,15),rpad(rq.piece_no,4),rpad(rq.part_id,15),
bits,BITS_LENGTH
from requirement_binary rb,requirement rq
where BITS IS NOT NULL AND rq.workorder_type = 'M' and rq.workorder_sub_id = '0' and rb.workorder_sub_id = '0'
and rb.workorder_type = 'M'
and rq.workorder_base_id = rb.workorder_base_id and rq.piece_no = rb.piece_no;
BEGIN
OPEN C1;
LOOP
FETCH C1 INTO MBASE_ID ,
MPIECE_NO,
MPART_ID ,
B,
XLENGTH;
EXIT WHEN C1%NOTFOUND;

IF LENGTH(MPART_ID) < 16 THEN
MCOMMENT := UTL_RAW.CAST_TO_VARCHAR2(B);
INSERT INTO TEMP_BOM_TEXT(BASE_ID,PIECE_NO,PART_ID,COMMENTS,LENGTH_OF_COMMENT)
VALUES (MBASE_ID,MPIECE_NO,MPART_ID,MCOMMENT,XLENGTH);
END IF;
END LOOP;
CLOSE C1;
END;
Previous Topic: Link
Next Topic: ORACLE TRIGGERS
Goto Forum:
  


Current Time: Sun Dec 22 15:34:21 CST 2024