Skip to Main Content

SQL Developer

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!

Copying from query results

Scott WesleyJul 25 2024

I have a question regarding the content copied from the query results window.

Let's say I run a query that contains a line feed character.

select 'Hello' output from dual
union all
select 'grand '||chr(10)||' universe' from dual;

When I copy the results from the query result

And paste it somewhere, it surrounds any content that contains a line feed with double quotes.

Hello
"grand 
universe"

My preferred output would be

Hello
grand 
universe

I tried using the worksheet hint after modifying the left/right enclosure for the Export: Text Format options (as described here)

select /*text*/ 'Hello' output from dual
union all
select 'grand '||chr(10)||' universe' from dual

"OUTPUT"
"Hello"
"grand 
universe"

But I guess you could say that made the problem worse.

Though I'm not sure the setting was effective, because when I unchecked “header”, the “OUTPUT” was still displayed.

I'm currently on 21.4, but have no reason not to upgrade (just haven't got around to it)

Scott

Comments
Post Details
Added on Jul 25 2024
2 comments
168 views