Toad World® Forums

inconsistent behaviour with bind variable

Hi

Take this code in sqlplus

SQL> set autop on

SQL> VAR task_id NUMBER;

SQL> VAR task_name VARCHAR2(32);

SQL> EXEC :task_name := ‘ADV01’;

PL/SQL procedure successfully completed.

TASK_NAME


ADV01

SQL> EXEC DBMS_ADVISOR.CREATE_TASK (DBMS_ADVISOR.SQLACCESS_ADVISOR, :task_id, :t ask_name);

PL/SQL procedure successfully completed.

TASK_NAME


ADV01

TASK_ID


54615

When I run it in Toad, I am not getting the task_id back.

I see the same thing - looks like a bug. I’ll create a CR for this and have one of the developers take a look. Thanks.

From: laurentc.schneider_609 [mailto:bounce-laurentcschneider_609@toadworld.com]

Sent: Monday, March 24, 2014 10:23 AM

To: toadoraclebeta@toadworld.com

Subject: [Toad for Oracle - Beta Discussion Forum] inconsistent behaviour with bind variable

inconsistent behaviour with bind variable

Thread created by laurentc.schneider_609

Hi

Take this code in sqlplus

SQL> set autop on

SQL> VAR task_id NUMBER;

SQL> VAR task_name VARCHAR2(32);

SQL> EXEC :task_name := ‘ADV01’;

PL/SQL procedure successfully completed.

TASK_NAME


ADV01

SQL> EXEC DBMS_ADVISOR.CREATE_TASK (DBMS_ADVISOR.SQLACCESS_ADVISOR, :task_id, :t ask_name);

PL/SQL procedure successfully completed.

TASK_NAME


ADV01

TASK_ID