Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting csv separator dynamically in oracle apex 5.0

3242541Aug 18 2016 — edited Aug 19 2016

I have a requirement to provide CSV separator based on user preference when he downloads an interactive report.

I tried to change NLS setting dynamically using a page process on page load but it didn't work.

used below code but no success-

IF :G_NS_CSV_SEPARATOR_USER = ';' THEN

EXECUTE IMMEDIATE('ALTER SESSION SET NLS_LANGUAGE = GERMAN');

EXECUTE IMMEDIATE('ALTER SESSION SET NLS_TERRITORY = GERMANY');

EXECUTE IMMEDIATE('ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '',;''');

ELSE -- Separator is ,

EXECUTE IMMEDIATE('ALTER SESSION SET NLS_LANGUAGE = AMERICAN');

EXECUTE IMMEDIATE('ALTER SESSION SET NLS_TERRITORY = AMERICA');

EXECUTE IMMEDIATE('ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ''.,''');

END IF;

Any suggestions?

Regards,

sarvesh

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 16 2016
Added on Aug 18 2016
2 comments
537 views