I have a query that uses multiple times the same parameter, in SQLDeveloper, calls Replacement Variable (VS), for example, &empresa
.
If you use this VS with the query below:
SELECT
*
FROM
pedido
WHERE empresa = &empresa;
SQLDeveloper before executing the query, asks for the value of the VA, then it informs and it performs the query.
Problem:
If you create a more complex query, using the same VA more than once, SQLDeveloper asks for the VA value all the time. I would like to know if there is a way to ask only once.
Q: I do not want to use another variable to save the VA value and then use the variable in several places.