This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
CREATE OR REPLACE FUNCTION F_SPLITNTEXTDATA ( P_TEXT_I IN VARCHAR2(4000), P_DELIMITER_I IN CHAR ) RETURN TY_SPLITDATAWITHKEYTAB PIPELINED AS L_STRING LONG DEFAULT P_TEXT_I || P_DELIMITER_I; N NUMBER; I NUMBER; OUT_REC TY_SPLITDATAWITHKEYOBJ := TY_SPLITDATAWITHKEYOBJ(NULL, NULL); BEGIN L_STRING := P_TEXT_I; I := 1; N := INSTR (L_STRING, P_DELIMITER_I); LOOP EXIT WHEN L_STRING IS NULL OR N=0;
OUT_REC.ROWUID := I; OUT_REC.VALUE1 := LTRIM (RTRIM (SUBSTR (L_STRING, 1, N-1 ))); PIPE ROW(OUT_REC); L_STRING := SUBSTR (L_STRING, N + 1); N := N; N := INSTR (L_STRING, P_DELIMITER_I); I := I+1; END LOOP; OUT_REC.ROWUID := I; OUT_REC.VALUE1 := LTRIM (RTRIM (SUBSTR (L_STRING, N+1 ))); PIPE ROW(OUT_REC); END; / SHOW ERRORS;
But,I am getting a error as below :
PLS-00103: Encountered the symbol "(" when expecting following: := . ) , @ % default character The symbol ":=" was substituted for "(" to continue.
What could be the reason for getting the above error?Am I going wrong somewhere?Please let me know.Thanks in advance.