1. Overview

This document will be helpful to print comma separated string with the new line report

2. Technologies and Tools Used

  • Oracle Plsql code.

 

3. Use Case

To display comma separated value in new line

4. Architecture 

Step1 :  Run below code.

 

Code:

create  FUNCTION break_string_f (

p_string      IN  VARCHAR2,

p_delimit     IN  VARCHAR2,

p_brake_line  IN  NUMBER DEFAULT 1

) RETURN VARCHAR2 AS

l_retval  VARCHAR2(32000);

lv_count  PLS_INTEGER;

BEGIN

FOR idx IN (

SELECT

column_value

FROM

apex_string.split(‘John,Sally,Bob,5’, ‘,’)–(p_string, p_delimit)

) LOOP

lv_count := lv_count + 1;

IF ( MOD(lv_count, p_brake_line) <> 0 ) THEN

l_retval := l_retval

|| ‘,’

|| idx.column_value;

ELSE

l_retval := l_retval

|| ‘,’

|| chr(10)

|| idx.column_value;

END IF;

 

END LOOP;

return (substr(l_retval,2));

END break_string_f;:

5.  Screen Shot

Output:

Recent Posts

Start typing and press Enter to search