PeopleTools and Lifecycle Management - PSFT (MOSC)

MOSC Banner

Query to CSV string - how to escape double quotes

Hi,

I have some code that runs as part of an app engine which outputs a Query to a comma-separated string:

&strCSV = %This.apiQuery.RunToString(&recPromptRecord, 0, %Query_TXT, - 1);

All of the columns returned are enclosed in double-quotes (regardless of whether the value contains a comma or not, but this isn't an issue). However, when the value extracted contains a double quote itself, the downstream system processing this file complains as these double quotes are not escaped. So for example if we were extracting departments you might get:

SETID, DEPTID, DESCR

"AAA01","BBB01", "This is fine"

"AAA02","BBB02","This "breaks" my downstream interface"

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center