Please help me to identify problem

create or replace procedure test4(p_id in number) as
begin
declare
str varchar2(1000) := null;
begin
str := 'update test set ID=p_id';
execute_immediate(str);
end;
end;
but ehen i execute
exec test4(5);
this gives folowing error
ERROR at line 1:
ORA-00904: "P_ID": invalid identifier
ORA-06512: at "ITD.EXECUTE_IMMEDIATE", line 4
ORA-06512: at "ITD.TEST4", line 7
ORA-06512: at line 1
Please tell me how to resolve error and please tell me whats changing required if query uses bind variables.
Thanks

Better to use DBMS_SQL
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_sql.htm#sthref7370
SQL> var sal number
SQL> var job varchar2(10)
SQL> exec :sal := 1000
PL/SQL procedure successfully completed.
SQL> declare
  2      cursor_name integer;
  3      rows_processed integer;
  4      l_sql long := 'update emp2 set';
  5  begin
  6      if :sal is not null then
  7          l_sql := l_sql || ' sal = :a';
  8      end if;
  9      if :job is not null then
10          l_sql := l_sql || ', job = :b';
11      end if;
12      cursor_name := dbms_sql.open_cursor;
13      dbms_sql.parse(cursor_name, l_sql, dbms_sql.native);
14      if :sal is not null then
15          dbms_sql.bind_variable(cursor_name, ':a', :sal);
16      end if;
17      if :job is not null then
18          dbms_sql.bind_variable(cursor_name, ':b', :job);
19      end if;
20      rows_processed := dbms_sql.execute(cursor_name);
21      dbms_sql.close_cursor(cursor_name);
22  end;
23  /
PL/SQL procedure successfully completed.
SQL> exec :job := 'ANALYST'
PL/SQL procedure successfully completed.
SQL> /
PL/SQL procedure successfully completed.
SQL> select sal, job from emp2;
       SAL JOB
      1000 ANALYST
      1000 ANALYST

Similar Messages

  • Hello, i restored and updated my iphone 4 to the latest version of 5.1.1 and after that when i connect my mobile to i tunes all i see is a big rectangle and a apple logo on left and a small lock on right side please help me fix this problem.

    hello,
    i restored and updated my iphone 4 to the latest version of 5.1.1 and after that when i connect my mobile to i tunes all i see is a big rectangle and a apple logo on left and a small lock on right side please help me fix this problem.

    I sloved this issue by resting my phone from settings>general>reset>reset all settings...the problem will be fixed

  • HT204088 Dear sirs,  Could you please help me on my problem with my apple ID  I create new account with security questions, and when I try to purchase paid application,it ask me for answers the questions but it's not working,  My account have 50$ and stil

    Dear sirs,
    Could you please help me on my problem with my apple ID
    I create new account with security questions, and when I try to purchase paid application,it ask me for answers the questions but it's not working,
    My account have 50$ and still didn't buy anything

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    (100546)

  • I have a problem with my iphone 4. My 3G always stays activated but I lose my network signal. The bars all get lost and I'm not able to receive / send sms, mms or phone calls. Could you guys please help me fix this problem? Ios 5.1.1

    I have a problem with my iphone 4. My 3G always stays activated but I lose my network signal. The bars all get lost and I'm not able to receive / send sms, mms or phone calls. Could you guys please help me fix this problem? Ios 5.1.1

    I haven't gotten a new sim card because the problem has been presenting itself in various cards not only mine. So far, all I've done is reset my network settings.
    Last night, I turned off the 3G tab and it had all the signal bars. Today, I did the network reset and it's working apparently. But like I said before, previously the bars just disappear and the iphone only has the 3G activated.

  • HT201272 A few songs from my old purchase is not available for download. It shows as purchased but I can't download it. Please help me resolve this problem, what do I need to do to enable download for all my purchased songs/movies etc. - Avinash

    Hi,
    A few songs from my old purchase is not available for download. It shows as purchased but I can't download it. Please help me resolve this problem, what do I need to do to enable download for all my purchased songs/movies etc.
    - Avinash

    The purchases are probably hidden:
    http://support.apple.com/kb/ht4919

  • I cannot install itunes on my windown 7 laptop.  Error says "computer not modified".  Please help me with this problem.

    I cannot install Itunes and Icloud on my Sony Vaio Laptop - Window 7.  Error says " computer/system not modified".  Please help me with this problem. 

    Hello there, jag123059.
    The following Knowledge Base article offers up some great steps to follow for resolving issues with installing iTunes:
    Issues installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/ht1926
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • Urgent, Please help me in this problem.I am getting problem while installation

    I am using Windows 8 in my system. I am trying to install Sql Server in system . Everything is fine, but finally  when i click on install button i am getting the following error .
    please help me quickly. I well be thankful to you.

    Triple post meanwhile:
    http://social.msdn.microsoft.com/Forums/en-US/7fafa499-ca1e-42f7-a117-73df924d9847/urgent-please-help-me-in-this-problemi-am-getting-problem-while-installation?forum=sqlsetupandupgrade
    http://social.msdn.microsoft.com/Forums/en-US/a1c7978c-2f84-495f-a8b6-9e9fe46654d7/getting-problem-while-installing-sql-server-2012?forum=sqlsetupandupgrade
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Please help me fix this problem it's driving me crazy. I have tried installing and reinstalling photoshop EXTENDED several time and each time i lunch it ask me for the serial number in which i entered it once entered nothing happens

    Please help me fix this problem it's driving me crazy. I have tried installing and reinstalling photoshop EXTENDED several time and each time i lunch it ask me for the serial number in which i entered it once entered nothing happens

    Hi Glenn,
    Kindly try out the steps mentioned in the link below and see if you are able to serialize your software.
    Sign in, activation, or connection errors | CS5.5 and later, Acrobat DC
    Try Solution 2: Clean up cached user login information.
    Please share the results after performing the steps.
    Thanks,
    Atul Saini

  • HT1338 Could you please help me with the problem. I have mac os 10.7.4 on my macbook pro retina and want to update it to 10.7.5. I had been waiting for 2 hours to do it, but then it appeared that it was impossible. What should I do?

    Could you please help me with the problem. I have macbook with retina with mac os 10.7.4 ann want to update it to mac os 10.7.5. I had been waiting for 2 hours to do it and had tried 3 times but it appeared that it was impossible. What should I do?

    You can download the standalone updates:
    OS X Lion Update 10.7.5 (Client Combo)
    OS X Lion 10.7.5 Supplemental Update

  • I can't click below the toolbar .half inch to 3inch from right to left. all words or letters are not working. please help to resolve this problem. thanks!

    Everytime I open firefox, all words or letters below the toolbar half inch to 3 inch from right to left are not clickable(not working). but they are working or clickable on google crhome or internet explorer. please help to resolve this problem. thanks!

    The '''''Yahoo! Toolbar''''' and the '''''Babylon''''' extension have been reported to cause that problem. They seem to invisibly extend downward over the top of the web page display area. Disable or uninstall those add-ons.
    *See --> http://support.mozilla.com/en-US/kb/Uninstalling+add-ons
    *See --> http://support.mozilla.com/en-US/kb/Cannot%20uninstall%20an%20add-on
    *See --> http://kb.mozillazine.org/Uninstalling_toolbars
    *See --> https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • Urgent Please help with a Conferencing problem in CUCM 6.1

    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
    mso-para-margin:0cm;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;
    mso-bidi-font-family:"Times New Roman";
    mso-bidi-theme-font:minor-bidi;}
    We have a configuration of CUCM 6.1. We have 24 voice ports (FXO) configured in H 323 registered with the call manger.  A CUE 3.2 configured for IVR and mail box. Gateway is a Cisco 3845 and the IOS version is 12.4(15) T10
    The problem is whenever a conference is configured with an outside number the FXO port is not releasing after the call disconnects.  It is not FXO disconnect problem. This happens only when a conference is taking place. There is no problem with any other outside or inside calls.
    I am attaching the configuration of Gateway. Please help me with the problem, I am very much thankful for you that.

    The Family pack covers upto 5 computers, other Install Disc cover one computer only.

  • Z10 not working at all please help in solving this problem

    Z10 has been stuck in "Preparing Blackberry HUB" mode for hours despite several restarts and battery pulls. Five swipe solution to restarting HUB only results in screen flashing on and off. Frustrated. Any ideas appreciated. Phone calls too not working, cant receive email, text messages or launch applications although preview screen seems to be working.
    Have reviewed other threads for solution with no success. Would rather not use security wipe option.
    Please help in sloving this problem 

    I would start with a Security Wipe:
    To perform a Security Wipe please follow the instructions below. Be sure and use BB Link to make a full backup before proceeding with the wipe:
    http://www.blackberry.com/btsc/KB33591
    Once the wipe is complete you can restore your backup. Keep in mind that data in the backup may be the source of the original problem and restoring it may restore the problem, as well. To alleviate this I recommend not restoring the Settings portion of the backup.
    If that doesn't work then use an autoloader to reload the OS:
    http://supportforums.blackberry.com/t5/BlackBerry-10-OS-Device-Software/Upgrading-OS10-devices-using...
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • Good evening I would please help me, IGood evening I would please help me, I have problems with flash player when update on my computer Flash Player for windows 8, gives me error in the installation that is not apply on my computer. Please help. Thank You

    Good evening I would please help me, IGood evening I would please help me, I have problems with flash player when update on my computer Flash Player for windows 8, gives me error in the installation that is not apply on my computer. Please help. Thank You

    First, confirm that ActiveX Filtering is configured to allow Flash content:
    https://forums.adobe.com/thread/867968
    Internet Explorer 11 introduces a number of changes both to how the browser identifies itself to remote web servers, and to how it processes JavaScript intended to target behaviors specific to Internet Explorer. Unfortunately, this means that content on some sites will be broken until the content provider changes their site to conform to the new development approach required by modern versions of IE.
    You can try to work around these issues by using Compatibility View:
    http://windows.microsoft.com/en-us/internet-explorer/use-compatibility-view#ie=ie-11
    If that is too inconvenient, using Google Chrome may be a preferable alternative.

  • My iphone keeps freezing, then turning itself off. Please help me resolve the problem whatever it is

    My iphone keeps freezing, then turning itself off. Please help me resolve the problem whatever it may be.

    You said that you restored it.  "forgot to mentioned that ive tried all of that"
    When you restore, you can restore from backup or as new.
    Did you or did you not restore it?
    iPhone User Guide (For iOS 5.0 Software)

  • I am facing a problem in my IPod . it is not detected by computer i tried every possible thing i changed cable i installed new itunes still its not coming up in itunes. can you please help me regarding this problem.

    i am facing a problem in my IPod . it is not detected by computer i tried every possible thing i changed cable i installed new itunes still its not coming up in itunes. can you please help me regarding this problem.

    This is for Windows: http://support.apple.com/kb/TS1538

Maybe you are looking for

  • No subscription found - want to use encore with premiere cc

    i have a cc subscription as a student and i want to use encore with premiere cc on a mac. i downloaded the cs6 version of premiere, tried to install but it says it can't find a subscription (even thought i am logged in with my adobe id).  I saw on an

  • Error While trying to connect to System

    Dear Experts, I have raised an issue with SAP and they are trying to connect to our system, but getting connection error. From SM59 i got the following error. Error Details from SM59 - ABAP -SAPOSS -  Connection Test Logon     Connection Error Error

  • EDI order Segregation

    Hi i'm new to EDI environment! The requirement is to make EDI robust enough to handle software orders(ZSW order type) in addition to the regular orders(ZEDI and ZCAT).We have a third party tool which submits order to Sap from sources like(customers o

  • Can i avail buying iphone 4s for $99 for use in the philippines?

    can i avail buying iphone 4s for $99 which i intend to use in the philippines?

  • APP world error

    When trying to download any app it says 'an error has occurred please try again later'.  Been saying this for a couple of days now. Any ideas please?