Why getting this error... bind varibale does not exists?

SET SERVEROUTPUT ON
drop table test22;
create table test22(c1 number);
insert into test22 values (1);
insert into test22 values (2);
insert into test22 values (3);
insert into test22 values (4);
commit;
desc test22;
select * from test22;
create or replace procedure test_exec
(c in varchar2)
IS
s1 varchar2(200) := 'select count(*) from test22 ';
v1 number;
begin
DBMS_OUTPUT.put_line('values-->'||s1);
execute immediate s1 INTO v1 using :;
DBMS_OUTPUT.put_line('values-->'||v1);
end;
declare
c number := 3;
begin
test_exec(c);
end;
Procedure created.
ORA-01006: bind variable does not exist
ORA-06512: at "THINSLICE.TEST_EXEC", line 8
ORA-06512: at line 4

> execute immediate s1 INTO v1 using :;
Get rid of the 'using' clause. You can't name a PL/SQL variable ':' anyway (and even if you could, you would still have to declare it first, and even if you'd done that, your dynamic string has no bind variable).

Similar Messages

  • Why an "ORA-01006: bind variable does not exist" error when no dynamic SQL?

    Hi all,
    While running PL/SQL in SQL Developer 3.2.09, I got the following error after adding a section of code. Note that nothing I'm doing has anything to do with dynamic SQL (which is what 01006 is supposedly about).
    Error report:
    ORA-01006: bind variable does not exist
    01006. 00000 - "bind variable does not exist"
    *Cause:   
    *Action:
    After commenting out the new chunk of code that caused the error, the error persisted.
    After deleting the new code, the error went away.
    What the heck!?!? If you have any ideas, please lay 'em on me.
    Thanks so much,
    Kim
    P.S. It's a few hundred lines of code, so I didn't append it to this post and I don't see how to attach a file.

    Let's review a few facts:
    1. You post a question in the sql developer forum that has no apparent relation to sql developer. You could confirm this by doing the test using sql*plus or some other tool.
    2. You provide NO information about what database you are even using. The only clue is an ORA -xxx message that means SOME version of Oracle is involved.
    3. You provide NO information about what the four digit version of Oracle DB is being used.
    4. You provide NO information about what the code in general or what that specific section of the code is even doing. The code could be doing literally anything that Oracle is capable of doing.
    That's a bit like calling a mechanic you don't know, telling them your car is making a funny noise and asking them what the problem with your car is.
    >
    While running PL/SQL in SQL Developer 3.2.09, I got the following error after adding a section of code. Note that nothing I'm doing has anything to do with dynamic SQL (which is what 01006 is supposedly about).
    Error report:
    ORA-01006: bind variable does not exist
    01006. 00000 - "bind variable does not exist"
    *Cause:
    *Action:
    The error gives no indication of where the error occurred in the code.
    >
    Your first clue that your troubleshooting method is seriously flawed is when you make statements that aren't supported by any evidence at all but appear to be nothing but your opinion.
    Your second clue is when those statements appear to directly contradict what Oracle is telling you.
    I'm talking about these two statements you make; which you state as if they were universal truths
    >
    nothing I'm doing has anything to do with dynamic SQL
    (which is what 01006 is supposedly about).
    >
    If thoe were true then your 'unstated' conclusion appears to be that Oracle is wrong in saying 'bind variable does not exist'
    Sorry - but I would place my money on Oracle.
    I'm sure the above may sound harsh - it is intended to be. My four major rules (there are more) when troubleshooting Oracle problems.
    1. Assume that Oracle is CORRECT when it tells you there is a problem.
    2. Assume that you are WRONG if your opinion conflicts with what Oracle is telling you - see rule #1.
    3. Don't make ANY other assumptions. You can form hypotheses but don't state them as facts until they are proven.
    4. Your 'opinion' is only useful to the extent that it can help you form meaningful hypotheses - see rule #3.
    >
    To reiterate, there is no dynamic SQL in the code.
    >
    To reiterate - if, as you state, that error relates to dynamic SQL and bind variables then it can not be disputed that:
    ORACLE DOESN'T AGREE WITH YOU!
    So let's try it my way and hypothesize that Oracle is correct (see rule #1 above).
    Then by definition this statement by Oracle is correct
    >
    ORA-01006: bind variable does not exist
    >
    And that should immediately raise this question:
    1. where might there be a bind variable that does not exist?
    which leads to a prerequisite question:
    2. where are ALL of the bind variables that might be being used?
    Question #2 is where you need to start your search. Here are at least five possibilities (there are more)
    1. your code - this should be easiest to check and you state that your 'anonymous' block does not have any.
    2. a table trigger - triggers that use the :NEW, :OLD or :PARENT pseudocolumns. Those psuedocolumns are BIND variables and the trigger code that uses them is, by definition, dynamic sql.
    3. a pl/sql package/function/procedure - any of these might be being called from trigger code or a view that is involved in the transaction. Any of these could take a parameter and/or use bind variables and cause your problem if that bind variable does 'not exist'.
    4. a functional index - can also trigger code from #3 above
    5. an audit trigger that logs the audit activity that your user or your code is performing. This code could be trying to use a SYS_CONTEXT environment variable that has not been created and cause a 'bind variable does not exist' error.
    See rule #1 - Oracle is CORRECT. Until you have identified and examined ALL of the code (not just your anonymous block) being executed and ruled it out you should continue with the hypotheses that Oracle is CORRECT.
    In the (extremely) unlikely event that you can show that Oracle is NOT correct you should file a SOR with Oracle.

  • Error: Bind Variable Does not Exist

    Hello,
    I am getting a bind error, Although I have only one bind variable, the debug output shows three bind parameters exist. Please let me know why this happens ?
    04/08/11 17:02:50 [5341] SELECT Property.PID, Property.CID, Property.REO, Property.MLS, Property.ADDRESS, Property.CITY, Property.STATE, Property.ZIP, Property.FAX, Property.TEL, Property.STYLE, Property.NROOMS, Property.NBEDS, Property.NBATHS, Property.SQFT, Property.AGE, Property.LPRICE, Property.LDATE, Property.EXPDATE, Property.FCDATE, Property.REDEMPTIONDATE, Property.MORTGAUGER, Property.FNAME, Property.FID, Property.BPOVALUE, Property.BPODATE, Property.WDATE, Property.TRASHOUT, Property.LAWNCARE, Property.REKEYED, Property.VACANCYSTATUS, Property.LOCKBOX, Property.PROPSTATUS, Property.LAGENT, Property.ENTRY, Property.USERID, Property.CONTACTID, Property.TAXID, Property.COBORR, Property.BORCONTACT FROM PROPERTY Property WHERE (Property.USERID = :1)
    04/08/11 17:02:50 [5342] Bind params for ViewObject: PropertyView1
    04/08/11 17:02:50 [5343] Binding param 1: 10097
    04/08/11 17:02:50 [5344] Binding param 2: 10097
    04/08/11 17:02:50 [5345] Binding param 3: 10097
    04/08/11 17:02:50 [5346] ViewObject: PropertyView1 close single-use prepared statements
    04/08/11 17:02:50 [5347] QueryCollection.executeQuery failed...
    04/08/11 17:02:50 [5348] java.sql.SQLException: ORA-01006: bind variable does not exist

    setWhereClauseParams must have been called on this VO to set more than required number of parameters. Could you check for that possibility?

  • When  do we get ORA-01006 bind variable does not exist

    I am updating data base taking data from client to data base through a session bean. The data is being updated but this error message is also coming.what could be the reason.

    I had the same error and was using the incorrect number of parameters for my prepared statement. I had too many. Could it be that you are using the wrong prepared statement?

  • Getting an error "the Application does not exist"  in FR

    user got the message to shows there is a searching error: the application doesn’t exist member
    in HFM while pulling FR report

    Hi Folks,
                  I am still noty able to get to create a customer.Following fields is being sent:
      <?xml version="1.0" encoding="UTF-8" ?>
    <ns0:BAPI_CUSTOMER_CREATEFROMDATA1 xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
    <PI_COPYREFERENCE>
      <SALESORG></SALESORG>
      <DISTR_CHAN></DISTR_CHAN>
      <DIVISION></DIVISION>
      <REF_CUSTMR></REF_CUSTMR>
      </PI_COPYREFERENCE>
    <PI_PERSONALDATA>
      <TITLE_P></TITLE_P>
      <FIRSTNAME></FIRSTNAME>
      <LASTNAME></LASTNAME>
      <MIDDLENAME></MIDDLENAME>
      <SECONDNAME></SECONDNAME>
      <CITY></CITY>
      <DISTRICT></DISTRICT>
      <POSTL_COD1></POSTL_COD1>
      <POSTL_COD2></POSTL_COD2>
      <PO_BOX></PO_BOX>
      <PO_BOX_CIT></PO_BOX_CIT>
      <STREET></STREET>
      <HOUSE_NO></HOUSE_NO>
      <BUILDING></BUILDING>
      <FLOOR></FLOOR>
      <ROOM_NO></ROOM_NO>
      <COUNTRY></COUNTRY>
      <COUNTRYISO></COUNTRYISO>
      <REGION></REGION>
      <TEL1_NUMBR></TEL1_NUMBR>
      <TEL1_EXT></TEL1_EXT>
      <FAX_NUMBER></FAX_NUMBER>
      <FAX_EXTENS></FAX_EXTENS>
      <E_MAIL></E_MAIL>
      <LANGU_P></LANGU_P>
      <CURRENCY></CURRENCY>
      <ONLY_CHANGE_COMADDRESS></ONLY_CHANGE_COMADDRESS>
      </PI_PERSONALDATA>
      </ns0:BAPI_CUSTOMER_CREATEFROMDATA1>
    I have done the following:
    (1) Previously I was using a DIALOG user in the usid/pwd section of the receiver RFC adaptor,now I have created a communication user.
    (2) The data present in the above instance is being successfully inserted when testing thru the test tool in SAP 6 backend
    Do I have to do anything additonal?
    Regards,
    Premjit

  • Bind variable does not exist...

    Hi,
    I have an Access UI which is calling an Oracle package. The package has a simple command:
    INSERT INTO Table1 SELECT * from Table2
    The above query runs fine in Oracle directly, but when I run it through the package, I get the error "Bind variable does not exist". What does that mean? The query does not have any parameters. Similar queries running thgough the package that insert into other tables work fine.
    Something with structure of Table2 (this is a new table)?
    Thanks.
    Edited by: markk2 on Jan 12, 2009 9:59 PM
    Edited by: markk2 on Jan 12, 2009 10:10 PM

    I am not sure what's package you were talking about. Is it a package designed in Access?
    Access to Oracle is using ODBC, some of the SQL syntax specific to Oracle may not work. You might also check how table1 and table2 defined in Access. Are they all linked Oracle tables or one of them is Access table?
    Do you have any Oracle error message like ORA-xxxx ?

  • Post Goods Issue - error : Class type does not exist - Message no. VK662

    Hi,
    I am trying to do Post Goods Issue and getting this error: Class type does not exist
    When double click on the error, it shows it is a message no vk662.
    Any help to resolve it is appreciated. Thanks in advance.
    -Sri

    Sri
    There is a problem in batch determination.
    The batch you assigned to the material does not have a class or if it has a class, that class does not exist.
    Display the batch from the delivery item  using MSC3N and go into the Classification tab. You should have a class of class type 22.  See if that class exists in CL03 and its status in basic data tab. Work on these lines and revert.
    Hope this helps.

  • Error: package jxl does not exist

    I've tried everything on this thread from 2007
    how to import a jxl package?
    and I still get the error: package jxl does not exist.
    I've:
    1)added the the excelapi subdirectory that contains the jar file to the system class path, then I tried explicitly adding the jxl.jar file to the classpath (below)
    c:\Program Files\Java\jdk1.7.0_02\bin\; c:\Program Files\Java\jexcelapi\jxl.jar;
    2)I tried adding a copy of the jxl.jar file to the java\jdk1.7.0_02\bin\ subdirectory also.
    Anyone have any other troubleshooting ideas?
    Thanks,
    Rob
    Edited by: 915729 on Feb 20, 2012 11:35 AM

    Neither of those is a very good idea.
    You're also not telling how you're trying to compile the code.
    If with javac, you should use the -cp switch to include the jxl library in the classpath.

  • Report painter execution error - KH014  "Report does not exist".

    Hi All,
    I customized one report in FSI3 and used SE43 to create a t code for this report. In the development system, report will be executable from this t code.
    Transport requests are successfully transported from development to production without any error. But on production when I tried to execute the report, I am getting the error KH014 - "Report does not exist".
    While checking in production I found that the report was missing from report tree in FSI3 and as a result the customized report cannot be executed. As per basis guys there was not a issue in request transportation.
    Has anyone encountered similar problem? How was it resolved?
    Thanks.
    Prashant

    Hi Mikko,
    Thanks for your reply but your solution is not working.
    Hi Stacy,
    I can execute the report from t codes like FSI3 & FSI0 in development.
    I used SE43 for t code creation. At the time of t code creation there is a option called "Drilldown" under Report type heading, In drilldown option I selected my report from report type 002 (Financial Statement Key Figure) and created the t code. After this I transported both the request to production server.
    Please let me know if this is wrong method or there is any other option to transport this report in Production.
    Thanks & Regards,
    Prashant

  • Error: Path ID does not exist. (WWC-50001)

    when i try upload a binary file via table based portal-form then i get the
    Error: Path ID does not exist. (WWC-50001)
    The problem is: It was working for three times and then never.
    tips in this direction was be very helpfull.
    Thanks
    Mehmet Celikaslan
    null

    Thomas,
    This is bug # 1689009, it is fixed in 3.0.9 release. The only workaround I have is to edit the generated form package and manually remove/comment all calls to wwdoc_api.remove_document in upload_XXX procedures.
    Thanks,
    Dmitry

  • I am getting this error message "ORA-01006: bind variable does not exist.

    My code works fine like this:
    DECLARE
    v_JOBTYPE varchar2(8);
    v_STATUS varchar2(8);
    v_FAILURE varchar2(8);
    v_CAUSE varchar2(8);
    v_ACTION varchar2(8);
    BEGIN
    SELECT EVT_STATUS, EVT_FAILURE, EVT_CAUSE, EVT_ACTION, EVT_JOBTYPE
    INTO v_STATUS, v_FAILURE, v_CAUSE, v_ACTION, v_JOBTYPE
    FROM R5EVENTS WHERE ROWID = :ROWID;
    IF NVL(v_STATUS, 'X') = 'C' AND NVL(v_JOBTYPE , 'X') IN ('BRKD','UNPLBRKD','FILTRA', 'LUB', 'FAC') AND (v_FAILURE IS NULL OR v_CAUSE IS NULL OR v_ACTION IS NULL) THEN
    RAISE_APPLICATION_ERROR( -20001, 'FAILURE, CAUSE AND ACTION FIELDS MUST BE POPULATED');
    END IF;
    END;
    But I want to change the code to include a record (ACT_TRADE) from another table(R5ACTIVITIES). I am getting this error message "ORA-01006: bind variable does not exist - POST-UPDATE 200Before Binding". Any help would be appreciated.
    DECLARE
    v_STATUS varchar2(8);
    v_FAILURE varchar2(8);
    v_CAUSE varchar2(8);
    v_ACTION varchar2(8);
    V_CODE varchar2(8);
    V_EVENT varchar2(8);
    V_TRADE varchar2(8);
    BEGIN
    SELECT R5EVENTS.EVT_STATUS, R5EVENTS.EVT_FAILURE, R5EVENTS.EVT_CAUSE, R5EVENTS.EVT_ACTION, R5EVENTS.EVT_CODE, R5ACTIVITIES.ACT_EVENT, R5ACTIVITIES.ACT_TRADE
    INTO v_STATUS, v_FAILURE, v_CAUSE, v_ACTION, V_CODE, V_EVENT, V_TRADE
    FROM R5EVENTS, R5ACTIVITIES WHERE V_CODE = :V_EVENT;
    IF NVL(v_STATUS, 'X') = 'C' AND NVL(v_TRADE , 'X') IN ('MTM','MTL','MTMGT', 'FTM', 'FTL', 'FTMGT', 'R5') AND (v_FAILURE IS NULL OR v_CAUSE IS NULL OR v_ACTION IS NULL) THEN
    RAISE_APPLICATION_ERROR( -20001, 'FAILURE, CAUSE AND ACTION FIELDS MUST BE POPULATED');
    END IF;
    END;

    Thank you for your responses. Your feedback was helpful. This is what I ended up doing for a solution:
    DECLARE
    v_JOBTYPE varchar2(8);
    v_STATUS varchar2(8);
    v_FAILURE varchar2(8);
    v_CAUSE varchar2(8);
    v_ACTION varchar2(8);
    v_GROUP varchar2(30);
    BEGIN
    SELECT EVT_STATUS, EVT_FAILURE, EVT_CAUSE, EVT_ACTION, EVT_JOBTYPE, USR_GROUP
    INTO v_STATUS, v_FAILURE, v_CAUSE, v_ACTION, v_JOBTYPE, v_GROUP
    FROM R5EVENTS, R5USERS WHERE R5EVENTS.ROWID = :ROWID
    AND USR_CODE = O7SESS.CUR_USER;
    IF NVL(v_STATUS, 'X') = 'C' AND NVL(V_GROUP,'X') IN ('MTM','MTL','MTMGT','FTL','FTMGTS','PLANNER','DISPATCH','PMCOOR','R5') AND (v_FAILURE IS NULL OR v_CAUSE IS NULL OR v_ACTION IS NULL) THEN
    RAISE_APPLICATION_ERROR( -20001, 'FAILURE, CAUSE AND ACTION FIELDS MUST BE POPULATED');
    END IF;
    END;

  • I am getting a 'MIDI timeout' error message when I open garageband. I am not using any other apps so why is this happening. Restarting does not solve the issue.

    I am getting a 'MIDI timeout' error message when I open garageband. I am not using any other apps so why is this happening. Restarting does not solve the issue.

    I should also add that I am using core audio, no external MIDI device and Garageband v 6.0.5. Thanks

  • Why do I get this error: The operation could not be completed because an error occurred when creating frame 1364 (error -1).

    In motion 5, when I go to export - H.264 - I get this error: The operation could not be completed because an error occurred when creating frame 1364 (error -1). Why and How do I Fix It???

    What version of FCPX ?

  • I can't sync my iphone to itunes i get this error message "Iphone could not sync because the sync failed to start" Help? both my computer windows and my phone are on the current versions of ios and itunes

    I can't sync my iphone to itunes i get this error message "Iphone could not sync because the sync failed to start" Help? both my computer windows and my phone are on the current versions of ios and itunes

    Hello lenmin,
    Thanks for using Apple Support Communities.
    To help resolve this issue where you're repeatedly prompted to authorize with your Apple ID in iTunes when syncing, please follow the directions in the article below.
    iTunes: Missing folder or incorrect permissions may prevent authorization - Apple Support
    Have a great weekend,
    Alex H.

  • Adobe Acrobat Pro XI 11.0.06 when I reduce file size or try to optimize, I get this error: The document could not be saved. A number is out of range. I do the exact same thing every month and it works. I did it a few days ago and it worked. I receated the

    Adobe Acrobat Pro XI 11.0.06 when I reduce file size or try to optimize, I get this error: The document could not be saved. A number is out of range. I do the exact same thing every month and it works. I did it a few days ago and it worked. I receated the pdf, I renamed it. tried to do it before I imported more pages. no go. the 16 mg pdf will normally reduce to 5 or 6

    Hi,
    Are you facing the issue with any pdf file?
    Please try updating Acrobat to 11.0.7 and check.
    You might also want to repair Acrobat and see.
    Regards,
    Rave

Maybe you are looking for

  • How to push idoc from r/3

    how to push idoc from r/3

  • MD04 for account assignment E and item cat L

    Hi I have created PR for perticular material X by running MRP. PR is created with account assignment catagory E and item catagory L. now i converted this PR into PO. my problem is PO is not visible in MD04 for x material. only PR is visible. what is

  • Windows2008 AD RMS support office Mac 2011

    Hi Dose Windows 2008 ADRMS will support office Mac 2011 clients? as i understand from this link for mac office 2011 required windwos 2008R2 AD RMS . please let me know if you have alternative solution or setting for existing  windows 2008 AD RMS to s

  • How to add business systems into DIRECTORY?

    Hi, I have problem to add business system into Business Systems list in my scenarion in the Integration Directory. These systems are already in the SLD, but when I try to assign a business system, I have only choice to assign XI... How to solve this

  • Forum engine might be broken.

    Forum engine might be broken. I tried to post here: http://forums.lenovo.com/t5/Windows-7-Discussion/X61-Bluetooth-device-is-not-detected-in-Windows-7-6... It said: Correct the highlighted errors and try again. - And there was nothing highlighted to