26.4 CSV Function Signature 2
This function escapes special characters in a CSV value (CLOB).
Syntax
APEX_ESCAPE.CSV (
    p_string        IN CLOB,
    p_quote         IN BOOLEAN  DEFAULT TRUE,
    p_strip_html    IN BOOLEAN  DEFAULT FALSE )
    RETURN CLOB;Parameters
| Parameter | Description | 
|---|---|
| p_string | The string to be escaped. | 
| p_quote | If TRUE(default) andp_stringcontains special characters, enclose the result with thep_enclose_byparameter ofset_csv_parameters. | 
| p_strip_html | Default  TRUE, remove any HTML tags. | 
Example
The following example prints a CSV report with employee IDs and bio (a CLOB column) and non-default ; as separator.
                  
BEGIN
   apex_escape.set_csv_parameters (
       p_enclosed_by  => '"',
       p_separated_by => ';' );
   for i in ( select empno, bio from emp ) loop
       sys.dbms_output.put_line (
           i.empno || ';' || apex_escape.csv(i.bio) );
   END loop;
END;Parent topic: APEX_ESCAPE