Pl Sql Hex To Raw Conversion Error
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Oracle PL/SQL: ORA-06502 error when assigning a string to a raw variable up vote 1 down vote favorite I try to load some textinformation into clob fields. I reduced the code I'm having trouble to the following snippet: DECLARE WS_MAIN_CHUNK RAW(12001); BEGIN WS_MAIN_CHUNK := 'Do'; END; / It gives me the error ORA-06512 PL/SQL: numeric or value error: hex to raw conversion error. Why is the string 'Do' a hex value and how can I fix it -> Just assign the string to the raw variable? Thx for your help oracle plsql share|improve this question edited Nov 20 '12 at 15:54 Nicholas Krasnov 19.2k42849 asked Nov 20 '12 at 11:13 user685428 123129 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote accepted In Oracle, RAW data type is used to store binary data and any data that is byte oriented. You cannot directly assign a string value to a variable of RAW datatype. If there is such a need, you can use utl_raw package and cast_to_raw function to do that: SQL> DECLARE 2 WS_MAIN_CHUNK raw(12001); 3 BEGIN 4 WS_MAIN_CHUNK := utl_raw.cast_to_raw('Do'); 5 END; 6 / PL/SQL procedure successfully completed share|improve this answer edited Nov 20 '12 at 15:53 answered Nov 20 '12 at 11:19 Nicholas Krasnov 19.2k42849 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged oracle plsql or ask your own question. asked 3 years ago viewed 4886 times active
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error Want to Advertise Here? Solved ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error Posted on 2006-04-17 Oracle Database 1 http://stackoverflow.com/questions/13471988/oracle-pl-sql-ora-06502-error-when-assigning-a-string-to-a-raw-variable Verified Solution 6 Comments 10,097 Views Last Modified: 2008-01-09 I am getting the above error here. How do I convert a rowtype to a varchar DBMS_LOB.writeappend(r_data, length(sll_rec.OracleRow), UTL_RAW.CAST_TO_VARCHAR2 (sll_rec.OracleRow)); ------------------------------------------------------------------------------------------------------------------ function createOracleFile () RETURN CLOB IS cursor sll_cur is SELECT *from employees sll_rec sll_cur%ROWTYPE https://www.experts-exchange.com/questions/21816743/ORA-06502-PL-SQL-numeric-or-value-error-hex-to-raw-conversion-error.html ; r_data CLOB; begin open sll_cur; LOOP fetch sll_cur into sll_rec; exit when sll_cur%NOTFOUND; -- I am getting an error here DBMS_LOB.writeappend(r_data, length(sll_rec.OracleRow), UTL_RAW.CAST_TO_VARCHAR2 (sll_rec.OracleRow)); END LOOP; return r_data; 0 Question by:tech_question Facebook Twitter LinkedIn Google LVL 19 Best Solution byactonwang sorry, the above was wrong as I looked at the wrong place. >> UTL_RAW.CAST_TO_VARCHAR2(sll_rec.OracleRow) function UTL_RAW.CAST_TO_VARCHAR2() normally accept RAW datatype. If you pass in other Go to Solution 6 Comments Message Author Comment by:tech_question2006-04-17 I found what the error is, I had to add this statement but still I do not get the entire data that is being returned by the query , dbms_lob.createtemporary(lob_loc => r_data, cache=> TRUE, dur=> DBMS_LOB.call) ! How can I get the entire data returned by the query ! 0 LVL 34 Overall: Level 34 Oracle Database 34 Message Active 7 days ago Expert Comment by:markgeer2006
Programmer's Town »Databases »numeric or value error: hex to raw conversion error I will not understand so Pages 1 You must login or register to post a reply Topic RSS feed Posts [ 3 ] http://www.progtown.com/topic589882-numeric-or-value-error-hex-to-raw-conversion-error-i-will-not-understand-so.html 1 Topic by whoami 2012-05-08 11:01:03 whoami Member Offline Registered: 2009-09-29 Posts: 371 Topic: numeric or value error: hex to raw conversion error I will not understand so Good afternoon.Mistake :ORA-06502: PL/SQL: numeric or value error: hex http://itnewscast.com/applications/ora-06502-plsql-numeric-or-value-error-hex-raw-conversion-error-ora-06512-appswfevent-l to raw conversion error ORA-06512: at "ADMIN.P_APP$TEST", line 26 ORA-06512: at line 1I can not find an error (CREATE OR REPLACE PROCEDURE P_APP$TEST AS t_test XMLTYPE; t_clob CLOB; v_amount BINARY_INTEGER; v_buf_size CONSTANT BINARY_INTEGER: = 32767; v_offset NUMBER pl sql (38); v_buf RAW (32767); f_output utl_file.file_type; BEGIN DELETE TABLETEST; -- We receive XML SELECT XMLElement ("CheckTest") INTO t_test FROM dual; INSERT INTO TABLETEST VALUES (1, ' test ', t_test); COMMIT; -- Outswapping in a file on a disk f_output: = utl_file.fopen (' c:\test ', ' xml.xml ', ' w ', 32767); t_clob: = t_test.getClobVal; dbms_lob. OPEN (t_clob, dbms_lob.lob_readonly); v_amount: = v_buf_size; v_offset: = 1; WHILE v_amount> = v_buf_size LOOP Dbms_Lob. READ (t_clob, v_amount, v_offset, pl sql hex v_buf); - <
DBAAutovueBeehiveCRM & SiebelCloudE-Business SuiteIRMJD EdwardsJavaNetBeansOpenOfficeOracle FinancialsOracle RetailPeopleSoftSAPSupply Chain Management Warehouse ManagementServers & StorageHardwareLinuxOracle VDIOracle VMSolarisVirtualBoxVirtualizationOdds & SodsBest PracticesCertificationChannelsIndustry NewsMy Oracle SupportOracle OpenWorldSaaSSecurity Enter your keywords View the results at Google, or enable JavaScript to view them here. You are hereHome ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error ORA-06512: at "APPS.WF_EVENT", line 3600 Thanks to Vikram Das for this story Feb 04, 2013 6:34pm Applications Akhilesh pinged me today and told me that autoconfig was not working on a newly upgraded R12 instance. It was failing with these errors: Read the entire article at its source Feed: Vikram Das Original article Featured Top Stories NEW: ROAD for Oracle VM Availability Protection, Disaster Recovery and Operations Automation NEW: Oracle VM Private Cloud Reference Design Oracle Linux Yum Server Setup Guide Oracle VM Manager Installation Guide Oracle VM Server Installation Guide Hard and Soft Partitioning with Oracle VM The Unofficial Oracle Linux 6 Installation and Setup Guide weblogic.nodemanager. common.ConfigException Native version is enabled but node manager native library could not be loaded : NativeVersionEnabled E-T-L Architecture and Business Models Call For Participation is Open for the Xen Project User Summit in New York City MySQL & NoSQL – Best of Both Worlds. Upcoming webinar CRUD Operations in JDeveloper/ADF 11g R1 PS1 Table Component They're playing with my mind! Oracle VM Consulting|Oracle Support|Oracle News|Oracle Enterprise Manager|Oracle Cloud|Oracle LinuxContact|Privacy Statement|Company Info-© Copyright 2015