Please help me urgently (Problem in using delete statement)

Hello,
I want to run delete query where table name should come from a variable .I have written the following procedure but its not working .Could you please help me
DECLARE
processtemplatename VARCHAR2(64);
CURSOR T1Cursor IS
select Process_template_name from ProcessTemplate
where PROCESS_template_ID in
( select PROCESS_template_ID from PROCESSINSTANCE
where process_instance_id in
(select process_instance_id from processinstance where STATUS = 'PI_COMPLETED' OR STATUS = 'PI_REMOVED' ));
BEGIN
OPEN T1Cursor;
LOOP
FETCH T1Cursor INTO processtemplatename;
EXIT WHEN T1Cursor%NOTFOUND;
DELETE FROM processtemplatename WHERE process_instance_id in
( select process_instance_id from PROCESSINSTANCE where STATUS = 'PI_COMPLETED' OR STATUS = 'PI_REMOVED' );
END LOOP;
CLOSE T1Cursor;
END;
I am getting the error
ERROR at line 19:
ORA-06550: line 19, column 27:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 19, column 15:
PL/SQL: SQL Statement ignored
even when i used
DECLARE
processtemplatename VARCHAR2(64);
BEGIN
processtemplatename := 'example1';
DELETE FROM processtemplatename WHERE process_instance_id in
( select process_instance_id from PROCESSINSTANCE where STATUS = 'PI_COMPLETED' OR STATUS = 'PI_REMOVED' );
END;
I am still getting the same error message
Thanks,
Salam.

And BTW you do not need that clumsy CURSOR c.. OPEN c.. FETCH c INTO... CLOSE c etc. It is "reserved" for more complex cases when you cannot use:
<pre>
FOR P IN
     select Process_template_name
          from ProcessTemplate
          where PROCESS_template_ID in
               (select PROCESS_template_ID
                    from PROCESSINSTANCE
                    where process_instance_id in
                         (select process_instance_id
                              from processinstance
                              where STATUS = 'PI_COMPLETED'
                                   OR STATUS = 'PI_REMOVED'
LOOP
     EXECUTE IMMEDIATE
          'DELETE FROM ' || P.Process_template_name ||
               ' WHERE process_instance_id in
                    (select process_instance_id
                         from PROCESSINSTANCE
                         where STATUS = ''PI_COMPLETED'' OR STATUS = ''PI_REMOVED''
END LOOP;
</pre>

Similar Messages

  • PLEASE HELP ITS URGENT (PROBLEM IN INCLUDE)

    IF I EXECUTE IN 4.6C ITS NOT GIVIN NY ERROR BUT THE SAME CODE IN 6.0 IS GIVING ERROR
    IF NOT ( ( text_flag = 'X' AND tcode_level > 0 ) OR
                 ( text_flag_level0 = 'X' AND
                   tcode_level      = 0   AND          )    ).
    ERROR IS:
    Incorrect logical expression: "AND" or "OR" must be preceded by an          
    expression (e.g. a comparison).          
    PLZ HELP ME AS IT IS VERY URGENT.
    THANX IN ADVANCE

    Hi anit,
    1. minor mistake
    2. remove this AND in bold.
    IF NOT ( ( text_flag = 'X' AND tcode_level > 0 ) OR
    ( text_flag_level0 = 'X' AND
    tcode_level = 0 <b>AND</b> ) ).
    regards,
    amit m.

  • My Itunes is no longer allowing me to manage my music on my phone i can no longer select on my iphone to make playlists and delete music. Please help fix my problem.

    My Itunes is no longer allowing me to manage my music on my phone i can no longer select on my iphone to make playlists and delete music. Please help fix my problem. Iphone4s, 32gigs, IOS 7.1.2
    I don't know why it stopped working but it happened a month or two ago but the option on this phone that's usually all the way to the left when you select your device but now its not and I don't know what caused it. ive already tried troubleshooting my problem but have found no help.

    Hello Salmomma,
    Thank you for the details of the issue you are experiencing when trying to connect your iPhone to your Mac.  I recommend following the steps in the tutorial below for an issue like this:
    iPhone not appearing in iTunes
    http://www.apple.com/support/iphone/assistant/itunes/
    Additionally, you can delete music directly from the iPhone by swiping the song:
    Delete a song from iPhone: In Songs, swipe the song, then tap Delete.
    iPhone User Guide
    http://manuals.info.apple.com/MANUALS/1000/MA1658/en_US/iphone_ios6_user_guide.p df
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • Javafx deployment in html page(please help me urgent)

    i used the following method to deploy javafx in an html page.
    javafx file is:
    package hello;
    import javafx.scene.*;
    import javafx.stage.Stage;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import javafx.scene.paint.Color;
    import javafx.scene.effect.DropShadow;
    Stage {
        title: "My Applet"
        width: 250
        height: 80
        scene: Scene {
            content: Text {
                x: 10  y: 30
                font: Font {
                     size: 24 }
                fill: Color.BLUE
                effect: DropShadow{ offsetX: 3 offsetY: 3}
                content: "VAARTA"
    I save the file as HelloApplet in a 'hello' named folder in my D:
    after that i downloaded from internet html code as
    <html>
        <head>
            <title>Wiki</title>
        </head>
        <body>
            <h1>Wiki</h1>
            <script src="dtfx.js"></script>
            <script>
                javafx(
                    archive: "HelloApplet.jar",
                    draggable: true,
                    width: 150,
                    height: 100,
                    code: "hello.HelloApplet",
                    name: "Wiki"
            </script>
        </body>
    </html>now i typed in DOS prompt as javafxc.exe HelloApplet.fx & i got the class files .
    _The main problem which is coming is how to create HelloApplet.jar file which is used in the html page without which the html page is not displaying the javafx script. Please help me urgently i am in the middle of my project & stuck up due to JAVAFX                   i am using WIndowsXP & javafx-sdk1.0 when i am typing jar command inside hello package it is displaying invalid command.in DOS prompt. If there is any other method to deploy javafx in html page then specify it also.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Crossposted: [http://forums.sun.com/thread.jspa?threadID=5323288].
    Please don't crosspost without notifying others. It is rude in terms of netiquette. Stick to one topic.

  • Please help with slideshow problems!

    Am using Photoshop Elements 8 and trying to make a slideshow. Have tried 4 times now and keep ending up with same problem, cannot reopen project to continue edititing.  Won't show up in orginizer and when I find on harddrive and try to open get message " wmv file cannot be opened".  How can I save a
    slideshow inprogress and be able to reopen and continue to edit and make slideshow?  I want to thank anyone who can help me with this in advance as I
    have gotten so frustrated that I want to just scream.
    Thanks

    Thanks for the help, thought I had done so but maybe not.  Anyway will have another go at it, now may I ask another
    question?  I am trying to add audio to slideshow.  I have some music I purchased thru amazon as mp3 files but I get
    message no codec and when I try to add wmv I get same message.  What type of file do I need and how can I add
    multiple songs to one slideshow.   I have one little wmv file that will go in, but it just replicates itself multiple times until
    it fills slide show. 
    Thanks again, sorry to be a bother, but this thing is driving this old man crazy.
    Date: Sun, 26 Dec 2010 20:34:32 -0700
    From: [email protected]
    To: [email protected]
    Subject: Please help with slideshow problems!
    You need to save the slideshow project in order to be able to go back later and make changes or additions to an existing slideshow . The wmv file is a final output format.
    Now you are most probably using only the Output command: that is what makes the wmv file.
    You should also do the Save Project command. (and I make it a practice to do the Save Project command before I do the Output command).
    If you look at the Elements Organizer 8 Help, there is a topic on "Create a slide show".
    -- Very close to the beginning of that topic is a screen shot of the Sldie Show Editor screen,
    -- The bar below the usual menu bar is labeled with a "B" and called the Shortcuts bar.
    -- The 1st entry on that Shortcuts bar is "Save Project"
    It is the Save Project command that saves the information about which photos, audio, etc you placed in that specific slide show so that you can come back again to do subsequent editing.  Save each Project with a unique name.
    After completing the Save Project command, you shoud see an "icon" in the Organizer for that slide show.
    Note:  you must also keep the photo files and audio files which you have used in this slide show: you can't delete them because the project file does NOT contain a copy of the photos, it only has the identification and folder location of the photo and audio files.
    >

  • Please help! We got a used Mac Mini and we don't have the former owner's password, so we can't install anything like flash player.  Does anyone know how to get around this?

    Please help! We got a used Mac Mini and we don't have the former owner's password, so we can't install anything like flash player.  Does anyone know how to get around this? I don't know how to wipe the hard drive, and the support online doesn't seem to work.

    As posted previously:
    Reinstall OS X without erasing the drive
    Do the following:
    1. Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
    If installing Leopard the process is similar in some respects.  If you wish to begin anew then after selecting the target disk click on the Options button and select the Erase and Install option then click on the OK button.  To install over an existing system do the following:
    How to Perform an Archive and Install
    An Archive and Install will NOT erase your hard drive, but you must have sufficient free space for a second OS X installation which could be from 3-9 GBs depending upon the version of OS X and selected installation options. The free space requirement is over and above normal free space requirements which should be at least 6-10 GBs. Read all the linked references carefully before proceeding.
    1. Be sure to use Disk Utility first to repair the disk before performing the Archive and Install.
    Repairing the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger, Leopard or Snow Leopard.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer. Now restart normally.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Do not proceed with an Archive and Install if DU reports errors it cannot fix. In that case use Disk Warrior and/or TechTool Pro to repair the hard drive. If neither can repair the drive, then you will have to erase the drive and reinstall from scratch.
    3. Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When you reach the screen to select a destination drive click once on the destination drive then click on the Option button. Select the Archive and Install option. You have an option to preserve users and network preferences. Only select this option if you are sure you have no corrupted files in your user accounts. Otherwise leave this option unchecked. Click on the OK button and continue with the OS X Installation.
    4. Upon completion of the Archive and Install you will have a Previous System Folder in the root directory. You should retain the PSF until you are sure you do not need to manually transfer any items from the PSF to your newly installed system.
    5. After moving any items you want to keep from the PSF you should delete it. You can back it up if you prefer, but you must delete it from the hard drive.
    6. You can now download a Combo Updater directly from Apple's download site to update your new system to the desired version as well as install any security or other updates. You can also do this using Software Update.

  • [ETL]Could you please help with a problem accessing UML stereotype attributes ?

    Hi all,
    Could you please help with a problem accessing UML stereotype attributes and their values ?
    Here is the description :
    -I created a UML model with Papyrus tool and I applied MARTE profile to this UML model.
    -Then, I applied <<PaStep>> stereotype to an AcceptEventAction ( which is one of the element that I created in this model ), and set the extOpDemand property of the stereotype to 2.7 with Papyrus.
    -Now In the ETL file, I can find the stereotype property of extOpDemand as follows :
    s.attribute.selectOne(a|a.name="extOpDemand") , where s is a variable of type Stereotype.
    -However I can't access the value 2.7 of the extOpDemand attribute of the <<PaStep>> Stereotype. How do I do that ?
    Please help
    Thank you

    Hi Dimitris,
    Thank you , a minimal example is provided now.
    Version of the Epsilon that I am using is : ( Epsilon Core 1.2.0.201408251031 org.eclipse.epsilon.core.feature.feature.group Eclipse.org)
    Instructions for reproducing the problem :
    1-Run the uml2etl.etl transformation with the supplied launch configuration.
    2-Open lqn.model.
    There are two folders inside MinimalExample folder, the one which is called MinimalExample has 4 files, model.uml , lqn.model, uml2lqn.etl and MinimalExampleTransformation.launch.
    The other folder which is LQN has four files. (.project),LQN.emf,LQN.ecore and untitled.model which is an example model conforming to the LQN metamodel to see how the model looks like.
    Thank you
    Mana

  • I made upgrade for IOS to 7.04 but my iphone is second hand and when iphone need to make activation ,i don't have the apple ID so my iphone didn't work from this time so please help me urgent

    I made upgrade for IOS to 7.04 but my iphone is second hand and when iphone need to make activation ,i don't have the apple ID so my iphone didn't work from this time so please help me urgent.

    There isn't one.
    amrzaky wrote:
    I can't contact with previous owner s i need another solutoin
    The Apple ID and Password that was Originally used to Activate the iDevice is required.
    If you cannot get this information from the seller
    Removing a device from a previous owner’s account
    You need to return the Device for a refund, as you will not be able to re-activate it.

  • HT5312 i forgot my secret question, please help me this problem. Thanks

    I forgot my secret question, please help me this problem. Thanks

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    And/or see the  More Like This  section on the right.

  • Hi please help me how can I use my iPhone 4 I am at vocation my is not working please help

    Hi I am at vocation at Italy I am not able to use my phone please help me how can I use my phone overseas thank u

    You need to make your own ringtones in iTunes then sync them to your phone. Follow the directions here:
    http://osxdaily.com/2010/09/04/make-free-iphone-ringtones-in-itunes-10/

  • HT1937 I would like to help me. My iPhone was lost and stolen and I didn't have configured Find My iPhone. So I could n't find it. Please help me to find it or delete my information and photos. This is my serial No: DN*****TWD. Thank U

    I would like to help me. My iPhone was lost and stolen and I didn't have configured Find My iPhone. So I could n't find it. Please help me to find it or delete my information and photos. This is my serial No: DN*****TWD.  
    <Personal Information Edited by Host>

    If you didn't set up Find My iPhone, there's nothing we can do to help you. Sorry.

  • Please help I need to rest the deleted history

    Please help I need to rest the deleted history

    rest??
    Did you mean "restore"?
    Sorry, if you deleted your browsing history it is gone. No backups are made for browsing history, unless you have that set that up in a 3rd party application. Or if you have a backup of the places.sqlite file, which is where that data is stored in Firefox.

  • Please help if you can: I accidentally deleted the IPOD app for my IPAD 3. I need it to enable HOME SHARING. How can I restore or reinstall it? It is not an app I bought, it came on the IPAD from Apple.

    Please help if you can: I accidentally deleted the IPOD app for my IPAD 3. I need it to enable HOME SHARING. How can I restore or reinstall it? It is not an app I bought, it came on the IPAD from Apple

    See These Support Articles for Home Sharing
    Understanding  >  http://support.apple.com/kb/HT3819
    How to  >  http://support.apple.com/kb/HT2688
    Troubleshooting  >  http://support.apple.com/kb/TS2972

  • When I try to open my applications, they won't open. I can only open them by right click open. Please help. I need to use this for school.

    I can open files on my desktop and I can only open them by right click then open. Please help ASAP. I am using this MacBook for school. Pls help asap

    Macbook Pro
    System Preference > Trackpad > Point and Click
    At the bottom adjust the Tracking Speed slider.
    Best.

  • Why that when I record a video in my iPhone 4s then I will transfer it to my laptop, the video is in slow motion? Please help so that I can use always my video recording feature. Thanks!

    Why that when I record a video in my iPhone 4s then I will transfer it to my laptop, the video is in slow motion? Please help so that I can use always my video recording feature. Thanks!

    Video is synced from the computer to the iPhone via iTunes. You need to load the video into iTunes, make sure it is iPhone compatible before you do that, and once it is in iTunes, then sync to the iPhone.
    Never said what computer OS you were using. Also, the computer processor, amount of RAM can make a difference with HD video.

Maybe you are looking for

  • FM for getting employees by JOB

    Hi All, Does anybody know the function module to be used to get a list of employees with a particular job code in SAP HR? Thanks for the help. Regards, Krishnakumar PM

  • How comples return types and parameters are mapped

    Hi all! I want to know how complex return types and parameters in a java interface gets mapped to wsdl? for example how would the wsdl for the following interface shall look like: interface ComplexReturns{    java.util.Date getLuckyDate(java.util.Dat

  • Win2000pro terminates applicatio​n

    My LabVIEW5x application (exe or not) is closed by win2000pro because it creates several temp files in the temp directory. Windows suggests that these temp files are "NOT A VALID WINDOWS IMAGE". The temp files are created by CINS or dlls, ie. SQL too

  • Add new records

    Good morining to everybody I must add a a lot records into tables T180a T180P ecc I don't want add it manually one to one. Exist a way faster? Example add records by a text file (.txt). Thanks a lot for your support

  • What is the easiest way to transfer photos from a samsung g2 to my iMac?

    What is the easiest way to transfer photos from a samsung g2 to my iMac?