Delete a record

Server: Oracle RAC 11.2.0.3.0

OS: Linux Red Hat 6.6

Question: I need to delete records from a table. How can I do? Please advice if you need more information.

Thank you.

Hello

user9273329 wrote:

Thank you very much for your help.  I delete 18 records from this table. So make this removal order 18 times or there is another way by using a delete command to delete all the records of 18.

Thank you.

You can do it with 1 DELETE statement.  Use a WHERE clause that evaluates to TRUE for the 18 lines that you want to remove, but evaluates to FALSE (or UNKNOWN) for all other lines.

If you have trouble, after a test script complete that people who want to help you can run to recreate the problem and test their ideas.  CREATE TABLE and INSERT for a small table and results statements requested from these data (i.e., what the table looks like once the complete DELETION) count.  Also include your best attempt at a DELETE statement.

Simplify the problem.  Rather than remove the 18 lines, post a problem where you want to delete lines 2 or 3.  Once you see how it's done, you'll be able to remove any number you need.

Check out the Forum FAQ: Re: 2. How can I ask a question on the forums?

Tags: Database

Similar Questions

  • Clearing deleted database records

    Greetings. 8 gb Fuze has been great, but annoying problem:

    If I delete a record via windows, while the "rocket" is connected to my PC of votes, deleted records still appear on the menus of the rocket. The only way to remove the entries for the deleted files is "manually delete record" on the "rocket" for each file. This is the normal behavior? It would be nice if the "rocket" acknowledged that the files have been deleted and automatically deleted these entries in the list when it is disconnected from the pc.

    Larson wrote:

    Greetings. 8 gb Fuze has been great, but annoying problem:

    If I delete a record via windows, while the "rocket" is connected to my PC of votes, deleted records still appear on the menus of the rocket. The only way to remove the entries for the deleted files is "manually delete record" on the "rocket" for each file. This is the normal behavior? It would be nice if the "rocket" acknowledged that the files have been deleted and automatically deleted these entries in the list when it is disconnected from the pc.

    It should do during initialization "Refreshing Your Media" at startup and after non-colmatage of the computer. You may need to remove when you're connected in MTP mode (I don't trust Auto-defaut). I don't know if you want to change file names to something other than the stamp of date/time by default that the MTP mode is required otherwise the new names of files will not be saved.

    Alternatively, you can delete the file "mtable.sys" in the root directory of the "rocket" (in MSC mode only) when you are connected to your computer. It is the file of database and if deleted, it will completely re - build a new during the update, instead of simply updated the exsiting data.

  • I accidentally delete the record microphone to sound property. sleekbook 14 tsb132tx

    help please, I accidentally delete the record microphone to sound property.

    where can I download the microphone for my sleekbook 14 B132tx TS.

    help please someone.

    Thanks in advance.

    Hello

    Do a right-click the speaker icon in the taskbar, then select recording devices.

    Right-click on an empty area of the next window and enter a tick against the "Show disabled devices" and "Show disconnected devices".

    If your microphone will now appear in the list of devices, right click, and then select activate.

    Kind regards

    DP - K

  • How to delete several records by selecting the check box

    Hi I am a newbie in oracle forms Builder. I want to delete multiple records at the same time, when I click on the button. I have a 'emp_block' and 'control_block '.

    emp_block information: -.

    I have all the columns displayed in this block as empno, ename, sal, hiredate, deptno, comm.

    Other than that I add a new item of type "checkbox" and his name is "checkbox".

    control_block information: -.

    I have a "push button" in this control block.

    I added trigger "when-button-pressed" and write this line of code: -.

    EXECUTE_TRIGGER("ON-DELETE");

    COMMIT;

    "DELETE" is a trigger of form level. In this trigger, I wrote this code: -.

    BEGIN

    DELETE FROM EMP WHERE EMPNO =: EMP_BLOCK. CHECKBOX;

    END;

    Problem: -.

    Not one selected record is deleted when I click on the button Delete.

    I want to check little matter how much and when I press on delete button it has deleted all records whose box has been checked.

    Please help me...

    Welcome to the forum.

    In your WHEN-BUTTON-PRESS-trigger, just put your entire code and remove this EXECUTE_TRIGGER thing.

    To remove all verified records within a block, you must loop through the block and delete each record, something like

    BEGIN
      GO_BLOCK('YOUR_DATA_BLOCK');
      FIRST_RECORD;
      LOOP
        EXIT WHEN :SYSTEM.RECORD_STATUS='NEW';
        IF :YOUR_DATA_BLOCK.CHECKBOX='Y' THEN
          DELETE_RECORD;
        ELSE
          EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';
          NEXT_RECORD;
        END IF;
      END LOOP;
    END;
    

    Make sure that you set the property "value when checked" section of box check "Y".

  • delete the record

    I've have my suite creative CS3 and you want to delete the record from my account.

    Hey April,

    I recommend you contact customer service about her.

    Kind regards
    Rahul

  • How to delete duplicate records

    Suppose I have a table with N columns and K TAB (K < N) for which I should not have duplicated (in other words, the K column can be a key primary candidated)
    Can you give me a SQL query to delete duplicate records of TAB for columns K?
    Thank you very much!

    remove the tab where rowid not in (select min (rowid) of the TAB group by k)

  • Update and delete a record

    Hi all
    I have a requirement in oracle forms 6i

    I have a block of data that is in a table
    There are 5 columns
    1 column is only display and 4 others are normal text fields where we can insert update and delete these records
    My requirement is when a user updates a record that should trigger an alert and the alert should ask if the user wants to update that particular record
    The user presses Yes, then the record should be updated if the record should show as it has been shown previously
    Similarly in case of delete an alert should fire where we have to ask confirmation if the user presses Yes, then the record must be deleted from the database
    otherwise the registration should be visible on the form again as we
    my 3rd requirement which is also
    I have an element field which is the normal text and only display field is the description
    When you enter a new record when I enter in the item field and press tab or navigate outside the scope of the element, then the description of the element must be pouplated in the decsription read only field

    Please help me in the above 3 cases
    I'm new to forms
    I use an ID of friends that has a lot of messages

    Thanks in advance

    1)
    your first requirement I'd prior block UPDATE trigger:

    DECLARE
        v_alert_button NUMBER;
    BEGIN
        v_alert_button := SHOW_ALERT('your_alert'); -- "Do you want to update?"
        IF v_alert_button = ALERT_BUTTON1 -- assuming "No"
        THEN
            -- reset value:
            :YOUR_BLOCK.YOUR_ITEM1 := GET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM1', DATABASE_VALUE);
            -- optionally set item to valid if you don't want validations to fire:
            SET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM1', ITEM_IS_VALID, PROPERTY_TRUE);
            -- do this for every item:
            :YOUR_BLOCK.YOUR_ITEM2 := GET_ITEM_PROPERTY('YOUR_BLOCK.YOUR_ITEM2', DATABASE_VALUE);
            ...
            ...
            -- finally reset record status:
            SET_RECORD_STATUS(:SYSTEM.CURSOR_RECORD, STATUS, QUERY_STATUS);
            -- interrupt PRE-UPATE trigger:
            RAISE FORM_TRIGGER_FAILURE;
        END IF;
    END;
    

    (not tested, please try for yourself)

    2)
    trigger the alert first remove the trigger.

    3)
    You can do within the WHEN-VALIDATE-ITEM trigger or a list-of-value (LOV) that returns the values of description.

  • delete all records at once UCM

    Hi all

    Let me know how to clean my content server (to delete all records from content server).
    Is there a room any or a way to delete all the records at the same time?

    Kind regards
    Vijay

    A simple way is to use Archiver (Administration > Admin Applets > archive)
    Create a new archive (Edit > Add)
    Export (Actions > export)
    Check the delete the revisions after archive successful.

    This gives you a conveniently saved content with no content and all content server.

    Note that this will only remove the content and rating will give you a blank content server Vanilla so things like custom meta data fields, model components security all will remain.

    Tim

  • Delete a record of DB of BPM

    Hello

    Can I delete a record from database of bpm.

    for example, if I raise an event, it should delete a database record.

    Components catalog SQL help us?

    Does removal of privileges are there?

    Sharma

    Hi Sharma

    Yes, we can delete a record of BPM DB engine. But I suggest "Soft Delete".

    All instances of created BPM process are stored in the table 'PProcInstance' of the database engine.

    In this table, the column "State" corresponds to the current state of process instance.

    For example State 1---> Running; 32---> completed; 64--> Aborted; etc.

    To remove soft please run & commit the query below:

    UPDATE PPROCINSTANCE SET STATE = 64 WHERE INSTID =.

    I hope this will help you.

    Thank you
    Santosh K.

  • Before file is deleted, the record must be insert into another table

    Hi friends,

    I have to create tabular form to delete some record. Using this tabular form I deleted successfully.
    But I want to when I delete a record before deleting record that he should go to another table.



    How can I do that.




    Ed

    Hello

    You create before you remove the trigger table.
    http://download.Oracle.com/docs/CD/B10500_01/server.920/a96524/c18trigs.htm

    BR, Jari

  • Impossible to delete the record from the table using the form

    I have a stored procedure (function, actually) that allows an administrator to manually delete a record in a table.

    When I call my form there will be no effect. The record remains in the table.

    In both cases, I connect to the database to the same user.

    I am able to call a test function in the database which returns a field in the record, so I think I can at least communicate with and retrieve results from the database using a stored function. As soon as I approach him "select" "delete from", no luck.

    If I try to run the SQL in my form with a statement of FORMS_DDL, it seems to run smoothly when I not in the code in the debugger, but it had no effect. FORMS_SUCCESS reports TRUE if DBMS_ERROR_TEXT has the following: ORA-01403: no data found. I don't know how the DBMS_ERROR_TEXT is that FORMS_SUCCESS is not set to FALSE.

    Any ideas as to why I am unable to remove using my form but can when you call the function registered directly/manually?

    Using Oracle Forms & DB 10.0.2.0.1.

    Patrick,

    After each Insert / Update / Delete statement, you have to COMMIT . Then only it will be in select statements.

    Kind regards

    Manu.

  • Problem with deleting a record

    I'm trying to figure out how to delete a record in a MySQL table using php on DWmx2004 server behaviors.
    I have two pages: Page 1 (ck_insert.php) lists organizations of a field in the table. Next to each name is a "Delete" text link that leads to the Page 2 (ck_delete.php).

    My link href page ck_delete.php ck_insert.php reads as follows:
    < a href = "ck_delete.php? scrap = <?" PHP echo $row_rstSix ["ck_pk"];? > ">"
    (ck_pk being the autoincremented in the MySQL table primary key field.)

    On the second page, the selected organization appears in the expression "you want to remove (organisation_to_be_deleted) from the database?
    Then I put in a box with the name of "gone" and the value Checked "gone".
    Next is a button named 'Submit' tagged 'remove '.

    The correct variable is transferred to the Page 2, but then when I click the button to delete the record deletion does not occur...

    Please take a look at:
    http://www.hopeless.me.UK/deleteimage.htm
    where I posted the Page 2 image and images of the relevant DW completed dialog boxes.

    The entries are clearly incorrect, because the system has not yet reached the goal of deleting a record and return the first page. I would be very grateful for help in sorting this point and tell me where I can find a clear explanation of how I'm supposed to take on this important task. So far what I've read left me confused, as you can see!
    Thank you

    Relax everyone. I've sorted it. I had to add a hidden field to the form.
    Done and dusted.

  • Error when updating or deleting a record

    Hi all...

    I created àtable with 2 fields Group_id and GroupName group_master
    the user determines a groupname in a text box and press save. Before committing a number of seq will be generated
    inside the form of procedure and it will be inserted.

    The insert works fine.

    But when I select a record that's to say a groupname and edit this content and commit, he is not committing.

    When I checked the error display he showed Ora-01400 cannot insert null values into the table.

    IAM not not inserting a value here iam update group name only.

    even when I delete a record, it shows same error...

    can someone help with this problem...

    Thanks in advance...

    How to put

    clear_block (no_commit) or clear_block (no_validate) after go_block ('group_master');

  • How this code deletes the record from the database company?

    Hello, I'm at the beginner level and I would like to learn more about this code of a book. I have several questions below, I hope I can get any help
    Thank you

    · How this code deletes the record from the database company?
    · Where is the connection to the db?

    · What part or command is that deletes the record?
    · What does that mean?
    < link rel = "stylesheet" href = "styles.css" >

    < html >
    < head >
    < /title > < title > test code
    < link rel = "stylesheet" href = "styles.css" >
    < / head >

    < body >

    < h1 > delete a record from the company < / h1 >

    < table >
    < action = "CompanyDeleteForm.cfm cfform" method = "POST" > "
    < b >
    < td > < table > C_ID
    < td >
    < cfinput type = "Text".
    name = "C_ID".
    message = 'Please enter the C_ID '.
    validate = "integer".
    required = "Yes".
    size = "22".
    MaxLength = "20" >
    < table >
    < /tr >
    < b >
    < td > < table >
    < td >
    < input type = "submit" value = "Delete a rec of the company" >
    < table >
    < /tr >
    < / cfform >
    < /table >

    < / body >
    < / html >
    -----------------------------------------------

    This isn't. He sends the value of C_ID in a form variable to an action (CompanyDeleteForm.cfm) page that would delete code.

    Phil

  • &amp; lt;mx:RemoteObject.../ &amp; gt; and deleting a record

    I use a RemoteObject to a CFC call that works pretty well right now. I am able to add, edit and delete records. An improvement I have to do, is if I try to remove a record that I should not be able to delete because of relational integrity issues, I.e. remove a record that is linked to another record in another table, I need to display a message to the user them teling registration can not be deleted.

    If I try to delete a record in the database will not let me delete I get a generic error message will freak out at my end users. Because of this I put the code in the CFC that prevents the CFC to try to delete a record, it should not. Problem is if the user attempts to delete a folder which cannot be deleted how can I return something (a window), back of my CFC telling them that impossible to delete the record at the moment?

    Right now the code which calls the RemoteObject looks like this (he uses a custom event to pass in variables).

    private void secTypeAddedHandler(event:SecTypeAddEvent):void / / it's the listener for the event of type dry new Add.
    {
    getAllSecStuff.addSecRole (event.secTypeToAdd); Pass the event with the addSecRole method of CFC variables.
    getAllSecStuff.getSecRoles (); Refresh data
    }

    <!--appeal WebService-->
    < mx:RemoteObject id = "getAllSecStuff" destination = "ColdFusion" source = "ISIF. WebServices.Flex.SecRoles"showBusyCursor ="true">
    < name mx:method = "getSecRoles" result = "getSecRolesHandler (event)" / >
    < / mx:RemoteObject >


    My CFC looks a bit like this:
    < name cffunction = "addSecRole" = "remote access" returntype = "string" >
    < name cfargument = "sectype" type = "struct" required = "yes" >
    < CFSET MyReturnString = "" > "".
    < CFIF STUFFTO Add... >
    < CFQUERY... to add data >
    < CFELSE MOD STUFF >
    < CFQUERY... change data >
    < CFELSE >
    < CFIF to know if I can remove it or not >
    < CFQUERY DEL DATA >
    < CFELSE >
    < CFSET MyReturnString = "No can do" > ".
    < / CFIF >
    < / CFIF >

    < cfreturn MyReturnString >
    < / cffunction >

    I guess my big question is I know that the CFC returns a string variable. How can I tell Flex to look at this value? If the returned string is set to "No can do" then I want to display a popup window indicating to the user that they cannot delete this record because it is associated with another record. If the returned string is set on "" I don't want to do anything.

    Thanks in advance for the help!

    Have an ordinary day...
    KomputerMan ~ |  :-)


    In fact I'm getting return a string in add it / mod / delete function. The only reason why I do the getSecRolesHandler
    call is to refresh my datagrid to show what changes have been made.

    I guess what I'm looking for, it's how to see what is returned by the getAllSecStuff.addSecRole (event.secTypeToAdd); call. Does show that I'm pretty new to Actionscript 3?

    So after a bit more digging, I found that I had to add a result call my RemoteObject call. So now my code looks like this:

    Then I created a function as follows, and life was good!
    [Bindable]
    private var MyUpDateResults:String = new String();

    private void getSecRoleEventStatus(event:ResultEvent):void
    {
    MyUpDateResults = event.result as String
    If (MyUpDateResults is "ClassTmp")
    {
    Alert.Show ("cannot remove the security role because it is associated with a model CF.", "can't delete the folder '");
    }
    }

    Thanks for the help, you put me on the path to enlightenment!

    Have an ordinary day...
    KomputerMan ~ |  :-)

Maybe you are looking for