APEX Training

Sunday, 14 October 2012

APEX Reporting on Comment Columns

This function may help you if you need to report on columns with a lot of text. It will get rid of the carriage return and will help not to break your reports imported into Excel:

CREATE OR REPLACE FUNCTION x_rep (p_string IN VARCHAR2)
   RETURN VARCHAR2
IS
   v_string   VARCHAR2 (4000);
BEGIN
   v_string :=
      REPLACE (TRANSLATE (p_string, 'x' || CHR (10) || CHR (13), 'x'),
               ';',
               '/'
              );
   RETURN v_string;
EXCEPTION
   WHEN OTHERS
   THEN
      RETURN NULL;
END x_rep;
/


2 comments:

Cindy Dy said...

Nice post. I enjoy reading your article. I found new ideas and very good information. I will come back for the next post. Thank you.

John
www.imarksweb.org

joy said...

Everyone of us commit mistakes and pay for the charges but through that we learn to know what is right from wrong. We need to be careful of our actions and we should stay humble, seek assistance from God. If you have God in you, you will forget the bad things that are happening in you life, you became strong and never affected of it. So, let God stay in your heart and mind. Have a good day! I hope I inspire everyone here.

n8fan.net

www.n8fan.net