[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1425
  • Last Modified:

ORA-01008: not all variables bound

In Toad I am trying to execute an stored procedure which return an out variable O_RetMessage.
But when I try to execute the code I get error message as:
ORA-01008: not all variables bound
DECLARE  
    I_SerialNo NVARCHAR2;
    I_Status NUMBER;
    I_WONUMBER NVARCHAR2;
    I_EngineBuildProperty NUMBER;
    I_WorkStation NVARCHAR2;
    I_EmployeeNumber NVARCHAR2;
    O_RetMessage  NVARCHAR2;
    BEGIN 
    I_SerialNo :='1';
    I_Status  :='2';
    I_WONUMBER  :='3';
    I_EngineBuildProperty  :='4';
    I_WorkStation  :='5';
    I_EmployeeNumber  :='6';
    O_RetMessage :='7';
     --BEGIN
       execute immediate  MYSP(I_SerialNo,I_Status,I_WONUMBER,I_EngineBuildProperty,I_WorkStation,I_EmployeeNumber,O_RetMessage);
      --END;
      DBMS_OUTPUT.PUT_LINE('oRetMessage: ' || :O_RetMessage);
 
    END ;

Open in new window

0
thermalsun
Asked:
thermalsun
1 Solution
 
sdstuberCommented:
remove the :  on :O_RetMessage


DBMS_OUTPUT.PUT_LINE('oRetMessage: ' || O_RetMessage);
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now