Questing regarding level and connect by [message #624592] |
Tue, 23 September 2014 14:53 |
|
akull
Messages: 46 Registered: July 2012 Location: Argentina
|
Member |
|
|
Dear all,
I have to convert a simple string into its ASCII code for every character. So, I've wrote this simple code to archive the requirement
DECLARE
V_STRING VARCHAR2(30):='Ascii Test';
V_ASCII VARCHAR2(500);
BEGIN
FOR i IN 1..LENGTH(V_STRING) LOOP
V_ASCII:= V_ASCII || '|' || ASCII(SUBSTR(V_STRING,i,1));
END LOOP;
dbms_output.put_line(v_ascii);
END;
However, as far as I understood if I am not mistaken this simple requirement can be archieved in plain SQL. Can I do that with the Oracle Function level and connect by ?
Thanks in advance.
Steve.
|
|
|
|
|
|
|
|
|
|
|
|