It would be a pretty neat feature to be able to copy some big cursor which is using variables and constants from other packages with those replaced as literals.

We often end up spending a huge amount of time hovering above some variables to get the current variables and replace all of them by hand when we are trying to transfer a cursor from a package into a SQL window to find out what condition or join eliminated a certain row.
Are you referring to code running in the debugger in combination with the variable values at that point of execution?
Exactly.
Okay. One more question: would this be restricted to single DML statements (select, update, insert, delete)?

I have added this to the list of enhancement requests.
This would be a great simplification! Please put it on top of the list.
[quote=Marco Kalter]Okay. One more question: would this be restricted to single DML statements (select, update, insert, delete)?[/quote]

For me personally, yes. Most of the time it's transferring a big cursor to a sql window and replacing variables and package constants in order to execute that query and modify join/where conditions to find out why an expected row got filtered out or in order to use the explain plan window etc. Or even to check if the result looks right when modifying those cursors inside the pl/sql routines.

So basically it's just a fast transfer from pl/sql to running those DMLs in a sql window. That is like 95% what I would need a feature like this for.

But I guess it could be useful for concatenated strings too, especially in the context of dynamic sql, even with merged single quotes, which were used to escape those etc. But most of the time those are smaller statements which don't take that much time to replace by hand.
[quote=aLpenbog]
So basically it's just a fast transfer from pl/sql to running those DMLs in a sql window. That is like 95% what I would need a feature like this for.[/quote]

Yes, that would be a really nice feature. It is something I also do a lot. When I am debugging code, often I copy SQL containing constants and variables to an SQL window. Substituting them with literals, especially when these are current values in the debug window would be really neat!

A tip for the time being: You can add a colon : before all variables so you get the parameter popup when you execute the SQL window.
I also do it when writing code - particularly to tune SQL - I still use an Oracle 8 database frown

Normally I just replace variables etc with literals, but that is also a pain.

Something that catered for this woudl be nice, even if it is similar to substitution variables

Chris
© Allround Automations forums