Can you "resolve constants" in TOAD?

In plsql developer there is a way to replace automatically

select my_package.my_constant from dual.

by this

select 2 /*my_package.my_constant*/ from dual.

This is call resolve contants. does this feature exist in TOAD?

Welcome to the Toad for Oracle community on ToadWorld!

To my knowledge, nothing yet in Toad for Oracle that resolves constants. What is the main use case for this? e.g. Testing? Are "constants" only resolved in the context of SELECTS involving DUAL?

Hello,

I have queries (big queries, not only select from dual) in a package. When the function using a query doesn't return the expected result, I copy the query, replace arguments, and replace the value of the package constant. The last step take a lot of time witout "resolve constant".

This isn't exactly what you are asking for, but one thing you can do to make this easier is select the SQL within your package and do a CTRL+Enter. Toad will comment out the parts from the package and put in variables instead. They'll be easy to spot. You can then replace the variables with literals, or just hit OK and then the variable dialog will appear and you can put values in there. The variable dialog will remember the values that you put in for the next time you run it.

image

When you resolve constants in plsql developer, can you just put in a big query, click the "resolve constants" button and automatically they are all replaced? Or do you select the constant yourself?

-John