966727 wrote:Without Table Structures, we are helpless. Please post the Table structures and sample instances of Working as well as not working Inserts.
select is working but insert not
Do you have anything different that what I tried above?
create table test_table ( col1 varchar2(30), col2 varchar2(50) ); insert into test_table values ('0x0002', 'Test');
INSERT INTO csms_dbo06.testHi Manik,
VALUES (1, HEXTORAW (RAWTOHEX ('0X0002')), 'TEST');
Oracle will convert that string '0002' to the proper raw format automatically.
CREATE TABLE r1 ( EID NUMBER (10, 0), ERRORCODE RAW (2), XDESCRIPTION CLOB ); INSERT INTO r1 VALUES (1, '0002', 'TEST'); commit;
No conversion functions are necessary; just don't include the '0x' in the string.
select dump(errorcode) from r1 DUMP(ERRORCODE) Typ=23 Len=2: 0,2
Not exactly. Did you read that section? 'converts a value . . . with the same number of bytes'. That isn't what OP is asking for.
UTL_RAW.CAST_TO_RAW UTL_RAW.CAST_TO_RAW converts a value of data type VARCHAR2 into a raw value with the same number of bytes. The input value is treated as if it were composed of single 8-bit bytes, not characters. Multibyte character boundaries are ignored. The data is not modified in any way, it is only changed to data type RAW.