guttormvik
Member²
Use-case:
In my pl/sql packages I have selects that use package constants instead of literals.
When I want to test these, I copy them to a SQL window, and then I have to manually replace the package constants with the literals.
I'd like to automate this search/replace somehow.
Original, and most generic idea was; What if PL/SQL Developer allowed me to add entries to the Selection submenu, that calls any oracle (package) function and replaces the selection with the result? I could then write my own multi-value search/replace function.
Or, is this way of referring to package constants in pl/sql selects so normal that maybe there should be a 'Copy from PL/SQL' that did this automatically?
Example:
select r.*
from t_reservation r
join t_person p on p.dw_id = r.dw_id
where r.reservation_status reservation_status.cancelled
and p.person_status = person_status.active;
->
select r.*
from t_reservation r
join t_person p on p.dw_id = r.dw_id
where r.reservation_status 'C' /*reservation_status.cancelled*/
and p.person_status = 'A' /*person_status.active*/;
In my pl/sql packages I have selects that use package constants instead of literals.
When I want to test these, I copy them to a SQL window, and then I have to manually replace the package constants with the literals.
I'd like to automate this search/replace somehow.
Original, and most generic idea was; What if PL/SQL Developer allowed me to add entries to the Selection submenu, that calls any oracle (package) function and replaces the selection with the result? I could then write my own multi-value search/replace function.
Or, is this way of referring to package constants in pl/sql selects so normal that maybe there should be a 'Copy from PL/SQL' that did this automatically?
Example:
select r.*
from t_reservation r
join t_person p on p.dw_id = r.dw_id
where r.reservation_status reservation_status.cancelled
and p.person_status = person_status.active;
->
select r.*
from t_reservation r
join t_person p on p.dw_id = r.dw_id
where r.reservation_status 'C' /*reservation_status.cancelled*/
and p.person_status = 'A' /*person_status.active*/;
Last edited: