1. I have two questions... I want to create a binary field with the data type long raw. When I insert, I am expecting to see a 32-bit binary field displayed. This is what I am doing:
create table fac
(fac_id long raw);
insert into fac (fac_id)
... But an "A" is displayed instead. I realize that A is an hex. Does anyone know how to insert hex to raw into long raw datatypes?
2. I have three tables.. the first one with values on a field that I want on the next two tables. Can anyone share a PL/SQL that updates the next two table with the value from the first table.
1. Use HEXTORAW function
From Oracel 8i SQL Reference:
INSERT INTO graphics (raw_column)
SELECT HEXTORAW('7D') FROM DUAL;
2. Why use PL/SQL? You can use SQL, try something like:
UPDATE tabb b
SET colb =
( SELECT a.cola
FROM taba a
WHERE b.taba_id = a.id
I just tested inserting long raw value with hextoraw. The problem is not the insert but the select. I inserted in SQL*Plus value ('AAAAAAAA') with and without hextoraw in long raw column, when i select column value 'A' is returned. SQL*Navigator returns for both rows the (same) binary value.
Click Here to Expand Forum to Full Width