My parents taught me never to "tokenize" in public.
First, please define (with examples) what you want to occur. Sample inputs with sample expected results and any necessary transformation explanations would be helpful for us to help you.
Mufasa
(aka Dave of Sandy, Utah, USA @ 20:44 (05Apr04) UTC (aka "GMT" and "Zulu"), 13:44 (05Apr04) Mountain Time)
Actually I have written a small Java program that uses split() function and returns String[]. I want to use this program in a PL/SQL procedure.
I am stuck at publishing the Java function. I tried:
CREATE OR REPLACE FUNCTION MIG_USER.SPLIT_STR (STR VARCHAR2, DELIM VARCHAR2)
RETURN VARRAY(20) OF VARCHAR2
AS LANGUAGE JAVA
NAME 'String_Mani.split_it(java.lang.String) return java.lang.String[]';
But it gives me error.
Also, I want to assign the return of String [] to VARRAY in PL/SQL.
If we are talking perticularly about a comma-delimited string, there is a procedure provided in the DBMS_UTILITY package.
DBMS_UTILITY.COMMA_TO_TABLE and
DBMS_UTILITY.TABLE_TO_COMMA
See the details in the "PL/SQL supplied packages reference" of Oracle.
If you want a generic tokanizer, you can write a little function/procedure for that purpose. I have done this before. Just use logic and some substr, instr etc etc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.