DELETE FROM DATABASE + restored again?

there is a statement
DELETE FROM DATABASE <dbtab> (<ar>) [CLIENT <cli>]
ID <key> .
Suppose I have mistakenly deleted from the database
can it be

Hi,
there is a syntax like DELETE FROM DATABASE as you mentioned.
But never ever use that to delete a record in DATABASE TABLE as you cannot recover that data.
hope this helps.

Similar Messages

  • Kan I restore my deleted from iCloud kontatke again?

    kan I restore my deleted from iCloud kontakte again ?

    Unfortunately, New Zealand doesn't have an Apple store. The closest we have is something called Yoobee, who i'm going to have to visit on the weekend. As while I got my iPad back fixed today, I have been unable to load all of my apps from the Cloud. Weirdly some of the Apps loaded, and I even synced one with my Mac, only to find later that they had disappeared. Now some are showing open but not working. This has been the most frustrating experience. I have always loved my iPads (this is my 3rd one) but I am seriously regretting paying for this one.

  • ADF delete from database.

    Hi,
    I am trying to design a page which will delete a particular row from one or more database tables. The jdeveloper version is 11.5 and the database is oracle 10.2 version.
    How can I do it?
    Thanks

    Hi all, Thanks for the reply..
    Actually I am trying to delete one record at a time, from the same table, from which m populating it on the jspx..
    That means the list source and the base source are same..which is not possible..
    What can be the solution for it ??
    I tried to create a separate view object for population on jspx and kept it in list source.. And I am using different view object in base source.. Both view objects refer to the same table..
    But it is not working out..the problems are..
    The record is getting deleted only for the first time when i run it.. Even after getting deleted from database, the record shows up in the list..
    And when i do the same operation one more time in the same session, 1st record in the table is getting updated with the value which i tried to delete..
    And I am not using managed bean..
    regards

  • Dynamic record deletion from database table

    Hi,
    I need to delete selected records from database table(dynamic names). Table names are being passed from main program with some of their field names. The record to be deleted from the database table is being decided based on the fields passed for the table and their contains passed from the main program.
    It is not possible to write dynamic where clause for DELETE statement directly.
    So, I created a dynamic internal table and i am trying to fetch all records using SELECT statement(for which we can write dynamic where condition, something like...SELECT...WHERE (itab).  ) which need to be deleted in the iternal table.
    Piece of code :
              CONCATENATE c_im v_tablefield1 INTO v_imprtfield1.
              CONCATENATE v_tablefield1 c_in v_imprtfield1
                       into s_condition separated by space.
              APPEND s_condition TO t_condition.
              PERFORM GET_DYNAMIC_ITAB USING s_flds_agtab-tabname
                                    changing t_itab.
              ASSIGN t_itab->* TO <itab>.
    *Select the data (to be deleted) from the database table
               SELECT * FROM (s_flds_agtab-tabname) INTO TABLE <itab>
                 WHERE (t_condition).
    *Delete the records from the table
               IF SY-SUBRC = 0.
                 DELETE (s_flds_agtab-tabname) FROM TABLE <itab>.
               ENDIF.
    Here t_condition is of standard table of WHERETXT.
    t_condition at the run time before giving dump was:
    SPART IN IM_SPART
    AND KUNNR IN IM_KUNNR
    Here IM_SPART is renge type of SPART and IM_KUNNR is renge of KUNNR.
    I am getting a DUMP:
    The WHERE condition has an unexpected format.
    Error analysis                                                                               
    The current ABAP/4 program attempted to execute an ABAP/4 Open SQL
    statement containing a WHERE condition of the form WHERE (itab) or
    WHERE ... AND (itab). The part of the WHERE condition specified at
    runtime in the internal table itab contains the operator         
             IN (v1, ..., vn)                                        
    in incomplete form.                                              
    How to correct the error
    If the error occurred in a non-modified SAP program, you may be  
    able to find a solution in the SAP note system.                  
    If you have access to the note system yourself, use the following
    search criteria:                                                 
    "SAPSQL_IN_ILLEGAL_LIST"                               
    "SAPLZSD_TAB_REFRESH " or "LZSD_TAB_REFRESHU01 "       
    "Z_SD_REFRESH_AGTABLES"                                
    If you cannot solve the problem yourself, please send the
    following documents to SAP:                             
    I would like to know whether "IN" operator is allowed in (itab) of WHERE clause. While testing I changed the "IN" to "=" specifying a suitable value there. It worked. So please let me know if i can give "IN" operator using renge table in the dynamic where clause.
    Thanking you,
    Surya

    Hi again,  so if you can not use the IN in a dynamic where clause you might be forced to dynamically build the entire select statement,  Here is a sample program which may give you some ideas, notice that we are writing the select statement code, putting it in another program and generating the subroutine at runtime, then call this routine.  I'm sure that this will help you see what you need to do.
    report zrich_0003 .
    tables: kna1.
    types: t_source(72).
    data: routine(32) value 'DYNAMIC_SELECT',
                 program(8),
                 message(128),
                 line type i.
    data: isource type table of t_source,
                xsource type t_source.
    ranges:
            r_kunnr for kna1-kunnr.
    data: ikna1 type table of kna1.
    data: xkna1 type kna1.
    r_kunnr-sign = 'I'.
    r_kunnr-option = 'EQ'.
    r_kunnr-low    = '0001000500'.
    append r_kunnr.
    xsource = 'REPORT ZTEMP.'.
    insert xsource  into isource index 1.
    xsource = 'FORM dynamic_select'.
    insert xsource  into isource index 2.
    xsource = 'Tables r_kunnr ikna1.'.
    append xsource to isource.
    xsource = 'select * into table ikna1 from kna1'.
    append xsource to isource.
    xsource = 'where kunnr in r_kunnr.'.
    append xsource to isource.
    xsource = 'ENDFORM.'.
    append xsource to isource.
    generate subroutine pool isource name program
                             message message
                             line line.
    if sy-subrc = 0.
      perform (routine) in program (program) tables r_kunnr
                                                    ikna1.
    else.
      write:/ message.
    endif.
    loop at ikna1 into xkna1.
      write:/ xkna1-kunnr.
    endloop.
    Regards,
    Rich Heilman

  • Delete from database Table

    Hi,
    To delete data from database table using internal table I am using following statement.
    DELETE dbtab       FROM TABLE itab.
    Itab is a sorted table.Just wondering if table type matters while deleting database entries using internal table.which is efficient table type for deleting records from database table?
    Regards
    Nilesh

    Hi Nilesh
    The row type of the internal table must be a data object with at least the same length and alignment as the key structure of the database table. The key is read according to the structure of the table line, and not that of the row type. It is a good idea to define the row type with reference to the structure of the database table.
    From SAP Help
    DATA: BEGIN OF WA,
    CARRID TYPE SPFLI-CARRID,
    CONNID TYPE SPFLI-CONNID,
    END OF WA,
    ITAB LIKE HASHED TABLE OF WA
    WITH UNIQUE KEY CARRID CONNID.
    WA-CARRID = 'UA'. WA-CONNID = '0011'.
    INSERT WA INTO TABLE ITAB.
    WA-CARRID = 'LH'. WA-CONNID = '1245'.
    INSERT WA INTO TABLE ITAB.
    WA-CARRID = 'AA'. WA-CONNID = '4574'.
    INSERT WA INTO TABLE ITAB.
    DELETE SPFLI FROM TABLE ITAB.
    Besides, it is so technical what algorithm is run to delete records from the DB table when an internal table is given. If you want you can have a quick test using GET TIME. However, it seems logical that if your internal table is sorted with respect to any index, especially the primary index, of the DB table this may increase performance.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • Delete from Database?

    How do you delete a row from a database. I have 2 columns (user and password)in the Database so far with 4 records. I have constructed a frame with 4 radiobuttons and a jbutton. I want the program to delete for example the first record if the first radiobutton is selected. I am nearly there but I need a little help.I am struggling with the SQL code needed.
    here is what i've done so far:
    public void deleteser(){
    String rdsn = "jdbc:borland:dslocal:C:\\JBuilder6\\bin\\userinfo.jds";
    String rdbUser = "Adham";
    String rdbPass = "reqs";
    try {
    Connection cons = DriverManager.getConnection(rdsn, rdbUser, rdbPass);
    Statement stmnt = cons.createStatement();
    String query = "SELECT*FROM Users"; // Users is the name of the table
    ResultSet rs = stmnt.executeQuery(query); // ResultSet object to hold the result of the query
    //int cnt = 0;
    while (rs.next()) {                                                                                       String s = rs.getString("User");
    String p = rs.getString("Password");
    //cnt++;
    if (duser1.isSelected()){
    break;}
    else if (duser2.isSelected()){
    break;}
    else if (duser3.isSelected()){
    break;}
    else if (duser4.isSelected()){
    break;}
    else if (duser5.isSelected()){
    break;}
    rs.close();
    stmnt.close();
    cons.close();
    } catch (Exception e) {
    e.printStackTrace();
    return;

    Still unable to do it, this is how it looks now:
    public void deleteser(){
    String rdsn = "jdbc:borland:dslocal:C:\\JBuilder6\\bin\\userinfo.jds"; // the odbc address of the DB.
    String rdbUser = "Adham"; // the user account to the DB.
    String rdbPass = "reqs"; // password for the dbuser.
    try {
    Connection cons = DriverManager.getConnection(rdsn, rdbUser, rdbPass); // gets a connection to the DB
    Statement stmnt = cons.createStatement();
    Statement instmnt = cons.createStatement(); // get a statement which can execute the sql-code
    String query = "SELECT * FROM Users"; // Users is the name of the table
    ResultSet rs = stmnt.executeQuery(query); // ResultSet object to hold the result of the query
    int cnt = 0;
    while (rs.next()) {                                                   // 'next' takes you down to the next row of the DB
    String s = rs.getString("User");
    String p = rs.getString("Password");
    cnt++;
    if (cnt==1 && duser1.isSelected()){
    String sql = ("DELETE FROM USERS VALUES ('"+ s + "','"+ p +"')");
    instmnt.executeUpdate(sql);}
    else if (cnt==2 && duser2.isSelected()){
    String sql = ("DELETE FROM USERS VALUES ('"+ s + "','"+ p +"')");
    instmnt.executeUpdate(sql);}
    else if (cnt==3 && duser3.isSelected()){
    String sql = ("DELETE FROM USERS VALUES ('"+ s + "','"+ p +"')");
    instmnt.executeUpdate(sql);}
    else if (cnt==4 && duser4.isSelected()){
    String sql = ("DELETE FROM USERS VALUES ('"+ s + "','"+ p +"')");
    instmnt.executeUpdate(sql);}
    else if (cnt==5 && duser5.isSelected()){
    String sql = ("DELETE FROM USERS VALUES ('"+ s + "','"+ p +"')");
    instmnt.executeUpdate(sql);}
    rs.close();
    stmnt.close();
    cons.close();
    } catch (Exception e) {
    e.printStackTrace();
    return;

  • DELETE FROM database table takes more time...

    Hi Friends,
    The below statement takes more time.
    LOOP AT i_final.
      DELETE FROM zcisconec WHERE werks = i_final-werks
                              AND aufnr = i_final-aufnr
                              AND vornr = i_final-vornr.
    ENDLOOP.
    Internal table I_FINAL will have more than 80,000 records.
    DB Table zcisconec have 4 primary key fields out of 10 fields.
    Below 4 fields are primary key fields
    WERKS
    AUFNR
    VORNR
    MATNR
    Please guide me..How to optimize it?
    Regards,
    Viji

    HI,
    Check this one ,
    put a break point on that delete statement and add another line of code after, like .... CHECK SY-SUBRC = 0. Now got to debug and stop at the DELETE statement, check the number of records in your DB table, now hit F5 to step to the next statement, now go back to SE16 and refresh, do you see the number change? It should.........if you are selecting the data correctly, make sure that you are getting data into the IT_  table.
    DELETE zcisconec from i_final.
    CALL FUNCTION 'DB_COMMIT'.
    Regards,
    Ansari.
    Edited by: Ansari Samsudeen on Sep 15, 2009 8:14 AM

  • Request templete - is it possible to delete from database?

    Hi All,
    is it possible to delete/disable request template from OIM database after we use it to generate some request?
    best
    mp
    Edited by: J23 on 2012-02-17 05:48

    If can change configuration (delete) of request template any time, via UI, don't do it via sql query.
    http://docs.oracle.com/cd/E21764_01/doc.1111/e14316/req.htm#BABFJHDF
    If you are talking about deleting or changing request dataset, sure you can do it any time Again If you going to perform any MDS operation keep the backup of MDS.

  • Delete entry from Database table

    Hi,
    I configured one PCR scenerio in SPRO node -> business Packakes/ funtional packages-> Manager self service-> Personal Change request -> Group Change request scenerio.
    later I deleted that entry in backend, but still the same entry exist in db table "TWPC_PCR_Groups" .
    How can we delete that entry?
    thanks

    Hi,
    If you just want to delete a single entry from database table then you have to it in debug mode .
    go to se11->Give table name->Press F7( ie: display table entries)-> Goto the table contents (CTRLSHIFTF10)->Select the entry you want to delete->Give /H in the command bar ->enter into debug mode-> Give code as DELE -> save it. and press enter. Your entry will be deleted from database.
    Hope this helps..

  • Urgent -Create  RFC for update the database and delete from the database

    Hi Guy's,
    Please help me how  to create the RFC for update to databse and delete from database(step-by-step) procedure.
    Thanks and Regards,
    Sai.

    Hi,
    Please go through the following link,
    reward if helps.
    [RFC Step By Step|https://www.sdn.sap.com/irj/sdn/wiki?path=/pages/viewpage.action?pageId=39728]
    regards,
    mahantesh

  • EJB/JPA Related: Objects are not going to delete from a Collection

    Hi All,
    I am developing a WebDynpro application using EJB3 model with JPA as a persistence tool. I have mapped using Annotations.
    All other works run fine but If I deleted a record through view It will not delete from database.
    I have two entities : First : OperationDayWorkingCapitalPlan in which following relation is defined:
         @OneToMany(mappedBy="operationDayWorkingCapitalPlan",targetEntity=BranchPartyCollectionsPlan.class,
           fetch=FetchType.EAGER, cascade=CascadeType.ALL)
         private Collection<BranchPartyCollectionsPlan> branchPartyCollectionsPlans = new  
           ArrayList<BranchPartyCollectionsPlan>();
    related methods:
         public Collection<BranchPartyCollectionsPlan> getBranchPartyCollectionsPlans() {
              return branchPartyCollectionsPlans;
         public void setBranchPartyCollectionsPlans(
                   Collection<BranchPartyCollectionsPlan> branchPartyCollectionsPlans) {
              this.branchPartyCollectionsPlans = branchPartyCollectionsPlans;
         public void addBranchPartyCollectionsPlan(BranchPartyCollectionsPlan branchPartyCollectionsPlan) {
            this.branchPartyCollectionsPlans.add(branchPartyCollectionsPlan);
            if (branchPartyCollectionsPlan.getOperationDayWorkingCapitalPlan() == null || branchPartyCollectionsPlan.getOperationDayWorkingCapitalPlan() != this) {       
                 branchPartyCollectionsPlan.setOperationDayWorkingCapitalPlan(this);
         public void removeBranchPartyCollectionsPlan(BranchPartyCollectionsPlan branchPartyCollectionsPlan) {
              if (branchPartyCollectionsPlan == null)
                   return;
              if (this.branchPartyCollectionsPlans != null)
                   if (this.branchPartyCollectionsPlans.remove(branchPartyCollectionsPlan)) {
                        branchPartyCollectionsPlan.setOperationDayWorkingCapitalPlan((OperationDayWorkingCapitalPlan)null);
    and Second one is : BranchPartyCollectionsPlan in which the following relation(inverse) is defined:
    @ManyToOne(fetch=FetchType.EAGER)
         @JoinColumn(name="OPERATIONDAYWORKINGCAPITALPLANID")
         OperationDayWorkingCapitalPlan operationDayWorkingCapitalPlan
      related getter and setter:
         public OperationDayWorkingCapitalPlan getOperationDayWorkingCapitalPlan() {
              return operationDayWorkingCapitalPlan;
         public void setOperationDayWorkingCapitalPlan(
                   OperationDayWorkingCapitalPlan operationDayWorkingCapitalPlan) {
              OperationDayWorkingCapitalPlan oldOperationDayWorkingCapitalPlan = this.operationDayWorkingCapitalPlan;
              if (oldOperationDayWorkingCapitalPlan != null){
                   oldOperationDayWorkingCapitalPlan.removeBranchPartyCollectionsPlan(this);
              this.operationDayWorkingCapitalPlan = operationDayWorkingCapitalPlan;
              if (operationDayWorkingCapitalPlan != null){
                   operationDayWorkingCapitalPlan.addBranchPartyCollectionsPlan(this);
    Plz help me where am I wrong. Why objects(BranchPartyCollectionsPlan) from collection not delete when I merge the main object (OperationDayWorkingCapitalPlan).
    Edited by: kapitsu on Oct 27, 2009 10:24 AM

    Hi Mayank,
    You can check the below Link.
    PSA Not Deleting, error : DDL time(___1):.....0 milliseconds
    Regards
    Rahul

  • Hi, i had recently formatted my iphone with no itunes backup. i restored my data with icloud but all the pics didn'y come back. now when i tried to restore again, icloud deleted all my pics from the server too!! is there any way i can get them back??

    hi, i had recently formatted my iphone with no itunes backup. i restored my data with icloud but all the pics didn'y come back. now when i tried to restore again, icloud deleted all my pics from the server too!! is there any way i can get them back??

    Back from where?
    You choose to not copy them off to a computer as they are designed to be.
    If they are no longer showing in iCloud, they are gone.

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • How can I delete the site (created in webDB) from database?

    Hi I have the WebDB 2.2 and Database server Oracle8i and I created a lot of sites with WebDB but I do not know how can I delete them from database server. Could somebody help to me?

    Log into sql plus as webdb
    Drop user <site name>_admin cascade;
    Drop user <site name>_public cascade;
    Drop user <site name> cascade;
    and drop any other users you have made specically for this site.
    Remove the dad from the listener settings.
    If you wish to use this site name again in the same database you also have to delete a record from a table in the Webdb schema.
    I can't remeber what that is.....
    Good Luck
    Dave.
    null

  • How to restore a site deleted from SharePoint Designer 2010

    Hi All,
         I have opened a test server site in share point designer 2010, & deleted that particular site in SP designer 2010,can anyone let me know how to restore the site by using SharePoint Designer?
    I followed below mentioned procedure to restore the site using SharePoint Designer
    Open SharePoint Designer, File tab, Sites under File Tab, Open site, specified the URL of site,opened..
    It is getting connected to the Organisation network & showing "path does not exist,check the path and try again".
    Whether, Is it possible to restore the site deleted from share point designer in site collection recycle bin. or
    Is it possible to copy the site from Production server to test server.
    Waiting for an response at the earlier.
    Thanks in Advance.
    Badri

    Hi Badri,
    1.You could not restore site deleted from SharePoint designer in site collection, you can only restore the site deleted from
    UI in site collection recycle bin, deleted from end user recycle bin.
    2.You can export the site from production server, then import it to test server.
    http://technet.microsoft.com/en-us/library/ff607895(v=office.14).aspx
    Best Regards.
    Kelly Chen
    TechNet Community Support

Maybe you are looking for

  • Working with Human Task Service

    Hello everybody, I'm trying to do some exercises with Human Task Service and ADF, but I have no clue how to do it. Ok here is what I'm trying to do. I've got a small BPMN process, which calls a WebService and gets a list of locations. Afterwards the

  • Outbound Messages not generating on Published

    I tried publishing a PO Confirmation and a Save + Send a Scheduling Agreement Confirmation from the Supplier view. However no outbound xml messages were generated. I have been reading posts of activating the Badis but in another proejct that we recen

  • A Question For Mods

    If you want a reply from the mods, its best to complete a contact the mods form and they will look properly at the issue. I dont think the PS3 is wireless N, so using old technologhy. You could always try home plugs? John

  • AIR voice recognition

    Hi everybody I am making an app in flash CS6 and adobe AIR 3.2, i try to make a voice recognition and I use this ANE file ( http://blog.ruedaminute.com/2012/01/voice-command-adobe-native-extension-ane-control-your- air-for-android-apps-with-voice-com

  • Query LDAP from Oracle Toad

    Hi friends, Can you please help me how to use sql query (select statement) from Oracle TOAD to query and retrieve records from LDAP? Thank you.