Toad World® Forums

Autofill not working correctly in all situations: constants

Use the following code, that is not really doing something and won’t execute but it is to demonstrate the problem I’ve found:

DECLARE

c_x CONSTANT VARCHAR2(20) := ‘X’;

BEGIN

SELECT *

FROM DUAL

WHERE dummy = c_x;

END;

If you go to the select and do an Ctrl-Enter for executing the select, you get a popup with

SELECT *

FROM DUAL

WHERE dummy = :C_X

Clikc OK and you get the variables popup as below. The problem is that the quotes are picked up from the constant declaration, so if you execute directly, you get no records, while you would expect one. So every time I test my query I must remove first all the quotes on the varchar2 constants…

Groetjes,
Wim

google.com/+WimdeLange

Thanks, fixed for next beta.

Michael

On 11/18/2013 03:27 AM, wimdelange_062 wrote:

Autofill not working correctly in all situations: constants

Thread created by wimdelange_062
Use the following code, that is not really doing something and won’t execute but it is to demonstrate the problem I’ve found:

DECLARE

c_x CONSTANT VARCHAR2(20) := ‘X’;

BEGIN

SELECT *

FROM DUAL

WHERE dummy = c_x;

END;

If you go to the select and do an Ctrl-Enter for executing the select, you get a popup with

SELECT *

FROM DUAL

WHERE dummy = :C_X

Clikc OK and you get the variables popup as below. The problem is that the quotes are picked up from the constant declaration, so if you execute directly, you get no records, while you would expect one. So every time I test my query I must remove first
all the quotes on the varchar2 constants…

Inline afbeelding 1

Groetjes,

Wim

google.com/+WimdeLange

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta
notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.