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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Idea: Generate WITH clause from resultset

User_1871Feb 8 2022

I've run a query in Oracle SQL Developer:
image.pngScenario:
I want to share the resultset data on a forum — in a format that's easy for answerers to grab and use.
From my experience, WITH clauses are preferred by forum members, since WITHs avoid the need to create data in a local Oracle environment.
Example:

with cte as(
select 10 as asset_id, 1 as vertex_num, 118.56 as x, 3.8 as y from dual
union all
select 10 as asset_id, 2 as vertex_num, 118.62 as x, 1.03 as y from dual
union all
select 10 as asset_id, 3 as vertex_num, 121.93 as x, 1.03 as y from dual)

 --There are lots more rows. But it's too much work to write them all out.
   
select * from cte

Idea:
Could functionality be added to SQL Developer that automatically generates a WITH clause from the resultset?

Comments

NickR2600-Oracle

Thanks OTG!  I'm so glad you've enjoyed the course!  I greatly appreciate your sentiment because my major goal is to keep advocating for more game-based learning projects.  As powerful as the approach can be, it's often misunderstood or overlooked by the corporate world.

Jajopachi

Thanks staff of OTG!  I'm happy with this course!  I greatly appreciate your effort, game-based learning projects it's a fun way to learn. Thanks

1 - 2

Post Details

Added on Feb 8 2022
8 comments
366 views