Jdbc modifying/deletion of entire rows..

Hi..
I have a database...
at a given particular row I need to modify ALL columns in that row to something such as:('a','b','c','d','e','f','g')
Is there anyway to iterate through the rows until you get to the row you want? Like with this resultSet?
int row=z[z_index].getRow();
ROWNUM=row;
try
String query = "SELECT ID, D, BREED, SEX, SIZE, COLOR, HAIR FROM dogsDB";
con = DriverManager.getConnection(url);
stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(query);
int rowCount=0;
while (rs.next())
++rowCount;
if(row==rowCount)
//INSERT CODE TO MAKE IT INSERT INTO VAR ROW[ROWNUM]
stmt.close();
con.close();
catch(SQLException ex)
System.err.println("SQLException: " + ex.getMessage());

at a given particular row I need to modify ALL columns in that row to something such.Does that make any logical sense?
If I have a customer table if I modify all the columns then I don't have the same customer any more. Presumably I don't have the same account number.
If I have an order record (assocation with a customer) and I modify all the columns, then that record is no longer associated with the customer. Once again I no longer have the same order.
Could anyone provide a business case for doing this?

Similar Messages

  • Delete from multiple rows elements from Array

    I have an array that contains about 3700 rows, and 4 columns. Every 37 rows a cycle of data begins. I would like to delete the first row of every cycle of data (i.e. row 1, row 38, row 75, row 111, etc -- until I have deleted every 37th row in the entire array). Then if possible I would like to take an average of rows 2 through 37, 39 through 74, 76 through 110, etc...
    Any help would be greatly appreciated.

    > After I modify the arrrays, I am displaying them both in lab view (in
    > multiple different graphs and a table), and then also using active X
    > to transfer the data to Excel (where is will be re-arranged and
    > plotted accordingly).
    >
    > I indeally need to get an average of the points in the array about
    > every 36 rows, and then display this, since I am looking to track the
    > output decay over time. If you have any suggestions as how I might
    > find and average of every x number of rows in an array, and either
    > input these into another array or a table, that would be greatly
    > appreciated.
    >
    I can't see the original post about the data shape, but if you have a 2D
    array, wire it into a For loop. Use i mod 36 equals 0 to select whether
    you
    add the array to the current total in the shift register, or whether
    you divide the total array by 36 and append it to the averages array,
    then overwrite the total to restart the process. If the rows isn't
    doesn't contain an integer multiple of 36 rows, you need to deal with
    the excess data either ignoring or making an average with a different
    denominator. I'd assume you do this outside the loop.
    Greg McKaskle

  • Please suggest solution for deletion of  all rows in table at a time

    Suggest me pl/sql code for a push button in form to ‘delete entire rows’ in a table.
    BEGIN
    LOOP
    DELETE
    FROM mytable(say table name)
    WHERE ROWNUM < 20000;
    EXIT WHEN SQL%ROWCOUNT = 0;
    COMMIT;
    END LOOP;
    END;
    I wrote this code but not deleted .
    Execute immediate ‘truncate table <tablename>’; this code too not working.
    What my need is ‘ I don’t want to put entire block fields in the form, just I want to put a push button and when I pressed it must delete all rows in a particular table.
    That I want to delete all rows form builder runtime not by entering sql.8.0 and then there delete the rows.
    thanks in advance
    prasanth a.s.

    to delete all records in a table, if you want to get good performance, then use:
    FORMS_DDL('TRUNCATE TABLE your_table_name');
    It is better than use DELETE FROM TABLE_NAME. But if you have condition in where clause, then you have to use DELETE FROM ...

  • Deleting BOTH duplicate rows in Excel

    Hi everyone,
    I have just been introduced to Applescript and I was hoping to automate some things at my workplace. One of the first activities that I have been trying to figure out involves Excel 2008, which is running on a G5 (Latest version of Mac OS X updated just today). It involves deleting both duplicates of records--file numbers--in a long one column list (there may soon be thousands of these records piling up, with many duplicates.)
    Someone over at MacScripter ("mikerickson" @ http://macscripter.net/viewtopic.php?id=32340) posted the following code for using Excel autofilter to delete only one instance of each duplicate row:
    *tell application "Microsoft Excel"*
    *set myMessySheet to get worksheet "Sheet1" of workbook "Workbook2.xls"*
    *set myMessyRange to get current region of range "A1" of myMessySheet*
    *set myCleanRange to get resize (get offset (myMessyRange) column offset ((count of columns of myMessyRange) + 1)) row size 1*
    *advanced filter myMessyRange action filter copy copy to range myCleanRange with unique*
    *-- optional deletes dirty range*
    *delete range (entire column of (get resize myMessyRange column size ((count of columns of myMessyRange) + 1))) shift shift to left*
    *end tell*
    This code works great when I copy and paste in Applescript Editor. Now, I need to find all duplicates in my data and delete both of the numbers, leaving only the single instance records/numbers. There are even instances where a number shows up three or more times; it would be great to get rid of those as well.
    Thank you in advance to anyone who can help me with this.

    I think you're going to have a hard time doing this because the original script used Excel to do the heavy lifting (i.e. filter the duplicates). The keyword with unique in the advanced filter is what's doing that.
    Off hand, I don't see an equivalent option for the filter that finds singletons in the list. Without that you'll need to iterate through the list manually, excluding the duplicate entries.

  • How to create new or delete the existing row in the grid....

    hi my friends...
    i am developing report using Reuse_alv_grid_display...
    my requirement is... At runtime
              1.  i may create new row on the grid (empty row inwhich  i may enter the data).
              2.  i may delete a existing row in the grid
              3.  i may edit the existing data...
    then i have to trace the modification in the grid in one internal table...
    how can i get into this.....
    note:
    i have some idea to edit the existing record in the grid and trace those modification,
    but i don't know abt how to create new or delete the existing row....
    can you give me some idea...

    Hi deva,
    write a class which implemets these methods
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
    To handle the toolbar on alv
         handle_toolbar
           FOR EVENT toolbar OF cl_gui_alv_grid
              IMPORTING e_object e_interactive,
    To handle the buttons on the alv grid
         handle_user_command
           FOR EVENT user_command OF cl_gui_alv_grid
           IMPORTING e_ucomm.
    endclass.
    Now Implement these methods.
    CLASS lcl_event_receiver IMPLEMENTATION.
    To handle the toolbar on alv
      METHOD handle_toolbar.
       DATA ls_toolbar  TYPE stb_button.
        CLEAR gs_toolbar.
        MOVE 3 TO gs_toolbar-butn_type.
        APPEND gs_toolbar TO e_object->mt_toolbar.
        CLEAR gs_toolbar.
        PERFORM icon_create USING 'ICON_INSERT_ROW' gs_toolbar-icon.
        MOVE text-010 TO gs_toolbar-function.
        MOVE text-012 TO gs_toolbar-quickinfo.
        MOVE ' ' TO gs_toolbar-disabled.
        APPEND gs_toolbar TO e_object->mt_toolbar.
        CLEAR gs_toolbar.
        PERFORM icon_create USING 'ICON_DELETE_ROW' gs_toolbar-icon.
        MOVE text-011 TO gs_toolbar-function.
        MOVE text-013 TO gs_toolbar-quickinfo.
        MOVE ' ' TO gs_toolbar-disabled.
        APPEND gs_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.
       METHOD handle_user_command.
    In this form, check the function code(e_ucomm has the function code), based on that do the required action.
    as i said yesterday(i.e for appending a row, deleting a row, modifying a row)
        PERFORM user_command USING e_ucomm.
      ENDMETHOD
    endclass.
    Before calling the alv method, create a object of this class.
    DATA :
          gref_event_receiver  TYPE REF TO lcl_event_receiver,
          gv_tables_alv          TYPE REF TO cl_gui_alv_grid.
          CREATE OBJECT gref_event_receiver.
          SET HANDLER   gref_event_receiver->handle_user_command
                        FOR gv_tables_alv.
          SET HANDLER   gref_event_receiver->handle_toolbar
                        FOR gv_tables_alv.
    check this program for event handling, it is the similar way
    demo_abap_objects_events
    Hope u understood this.
    Regards,
    Prasant
    reward if helpful

  • Delete hash value row in Bex report output

    Hi All,
    Can anybody suggest how can i remove hash value(not assigned) row in Bex report out put.
    my report looks like this:
    rows
    project position
      (hierarchy)
      WBS element
        (hierarchy)
        Order
    For each Project position and WBS element hierarchies, i did supress the " not assigned" tick in hiearchy attributes in RSH1.
    but in colums i have budget as one of the column.
      this budget comes from project position nodes to last node of WBS element but not in order, for order it will be blank but after this order a new row coming up with bold" Not assigned" with that budget amount against this not assigned.
    My problem is how can i get rid of this not assinged entire row. I search so many links in SDN, they talk about just to replace the not assigned  to some other value as blank or something like that.
    Please suggest me how can i get rid of this.
    i did tried to restrict Order with "#" but then the whole budget column getting blank.
    Regards
    Robyn.

    HI Arun,
    As i mentioned earlier, i have gone through these links, they just talk about replacing # value or Not Assigned  to some other value or blank.
    my issue is i need to get rid of that entire row.
    when i drop proj def hierarchy ,then wbs hierachy starts, sometimes at the end of wbs hierarchy i get row with #
    and sometimes after wbs hierarchy ,then order row then # row is coming.
    even after i tick supress unassigned nodes in both Projdef and wbs hierarchies.
    i am not supposed to simply replace #( not assigned) symbol or text with some other symbol or text ( thats what they discussing in these links).
    i created that macro they said in those links but its just deleting # symbol to blank not the whole row.
    hope i made my issue clear.
    i have seen so many other links as well
    [Re: Bex macros]
    Regards
    Robyn.

  • BEx Browser BEx Workbook: No "Insert Entire Row" Option

    We have a workbook with 2 queries embedded in it. Query 1 starts on Row 10 and Query 2 starts on Row 15. When the workbook is launched from Analyzer, we receive a popup window that has the title "SAP BEx: Not Enough Cells to Display Results" and it provides us with 3 options:
    1) Overwrite Existing Cells
    2) Insert cells below the results area
    3) insert entire rows
    When we launch the same workbook through BEx Browser, this popup window does not appear, which causes the results to be displayed in error.
    I was wondering if anyone came across this situation and what was your fix.
    We do not have the option of moving the queries to separate tabs on the workbook.  We have also attempted to write a macro that would launch both queries with many, many rows between them and then have the macro delete the blank rows in between them so that the two queries are together in the worksheet.  But the issue here is that the macro works when we launch the Workbook through BEx Analyzer, but when the same workbook is launched through BEx Browser, the macro is not processed.
    Thanks for your help.

    Hi P-Dup,
    Just pass by and see this thread, maybe this helps you: I have the same issue, I simply remove the query from its worksheet, create a new worksheet and insert this same query in the new worksheet. It works then for me. (You might reuse the same worksheet, but I prefer clean one).
    Please note that if you have other worksheets with formula refering to this query, the query worksheet should be copied to another worksheet and these formula should be link to this result worksheet (search and replace). It is not good to refer directly to the query worksheet though. Otherwise you would loose the references.
    Hope that helps you.
    Cheers
    Hoang

  • How do I sort specific cells without affecting entire rows?

    In Excel I can sort specific cells ascending/descending and only what I highlight will sort.
    In Numbers, when I try to do that the entire row sorts.
    Is there a way to only sort the highlighted cells and not have the rest of the rows sort as well?

    Here's a link (Dropbox download) to a Copy Sort Acending service, that in your menu would look similar to this:
    To use it, select the cells you want to sort, just as in Excel, and make the choice from the menu.
    After that, unlike Excel, click once in the first cell where you want the sorted values to start appearing (either the original range, or a different range if you want) and type command-v or option-shift-command-v to paste.
    The one-time installation takes a double-click on the .workflow package and a click on 'Install'. You may also have to go to System Preferences > Security & Privacy and click 'Download anyway'.  Installing simply moves the service to your Library > Services folder so that it will appear in your menu. It does nothing to the innards of your Mac, and does not run unless you specifically tell it to by choosing it from the menu or running it from within Automator. You can view the script by opening it in Automator.  You can remove the service if you don't need it by holding down the option key in Finder, choosing Go from the menu and navigating to Library > Services, where you can delete it the way you would any other folder or package.
    SG

  • Detect Entire row change status

    Hi All,
    I have a use case in which I have editable table(Table has 4 columns) where user can change some rows. I want to detect all the rows modified by the user and want to save the old rows from data base in another table before committing new values(modified values).
    I have seen some samples where we can detect a particular attribute has changed or not but I don't know how to implement entire row change. Please help me regarding this issue.
    I am using ADF Rich Components , ADF BC , JDev 11.1.1.5 and Oracle data base
    Thanks,
    Rajesh.

    Frank Nimphius-Oracle look to be the wrong thread you answered
    You can overwrite the prepareForDML() method of the EO in question as this gets called foe every row you changed. There you have access to the old values by eo.getPostedAttribute(index) and can insert the row into another table.
    Timo
    Message was edited by: TimoHahn
    @Frank ah, you already fixed it :)

  • A script to delete all table rows containing a specific text

    Hello,
    I've tried some old scripts but can't get around to the right solution.
    I need a script that will delete all rows in a table that contain a specific single-word text, something like "xxx".
    Anyone's got an idea?
    Thanks

    Hi,
    To remove a row use row.remove() method.
    So iterate through table.rows and remove the one matched a condition.
    If we talk about condition you have to be more accurate - what do you mean "a row contain a text":
         ==> 1st cell contains,
         ==> any cell contains.
    Entire row contents is an array of its cells.contents, so your 1st row text is:
    rows[0].contents.join(" ")     ==> string
    Jarek

  • Hi Apple Team, I would like to change the iCloud account on my iPhone, however it says I must 'delete the account' before doing so? Does this mean that I delete the entire existing account, or just delete it from my phone specifically?

    Hi Apple Team, I would like to change the iCloud account on my iPhone, however it says I must 'delete the account' before doing so? Does this mean that I delete the entire existing account, or just delete it from my phone specifically?

    From the iPhone only.

  • How do I delete stored email addresses in my iphone? When sending photos, I don't want to have certain email addresses  "popping up" from the internal memory, I've deleted my entire "Contact" list but they still appear.  Help please!

    How do I delete stored email addresses in my iphone? When sending photos, I don't want to have certain email addresses  "popping up" from the internal memory, I've deleted my entire "Contact" list but they still appear.  Help please!

    As with the Mail app on a Mac, the iPhone's Mail app stores all email recipients in a list of previous recipients which is separate from the address book or contacts. The email address autofill feature when addressing an message pulls from Contacts and from the list of previous recipients.
    Different from the Mail app on a Mac, there is no access to the list of previous recipients with iOS on an iPhone, iPod Touch, or iPad to remove a previous recipient from the list, or to add a previous recipient to the address book or contacts that is not already entered - not at the present time anyway.
    The only way to purge the list of previous recipients at the present time is by restoring your iPhone with iTunes as a new iPhone or not from your iPhone's backup, which will start being re-populated again with every sent message.

  • How to change the semantic color of entire rows in a table.

    Hi, in the past I already managed to change the semantic color of a cell by a condition (for example all the cells with negative number -> I set negative semantic color)
    My question is how can I change the semantic color of the entire row where this cell belong, and not only the cell. Im using NW2004.
    BTW, Im not a java programmer, neither a Webdynpro expert, just an ABAP Programmer. So try to be very explicit, Thx.

    Rodrigo,
    You can just bind correspondign property of every cell editor (TextView) of every column to the very same context attribute. Next, when you change attribute value for certain elemnt, the whole row (every cell editor in row) will get same value.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • How to delete the selected rows with a condition in alv

    dear all,
    i am using the code in object oriented alv.
    WHEN 'DEL'.
    PERFORM delete_rows.
    FORM delete_rows.
    DATA : lv_rows LIKE lvc_s_row.
    data : wa_ROWs like LVC_S_ROW.
    FREE : gt_rows.
    CALL METHOD alv_grid->get_selected_rows
    IMPORTING
    et_index_rows = gt_rows.
    IF gt_rows[] IS INITIAL.
    MESSAGE s000 WITH text-046.
    EXIT.
    ENDIF.
    loop at gt_rows into wa_ROWs .
    if sy-tabix ne 1.
    wa_ROWs-INDEX = wa_ROWs-INDEX - ( sy-tabix - 1 ).
    endif.
    delete gt_sim INDEX wa_ROWs-INDEX .
    endloop.
    the rows to be deleted from int.tab gt_sim not in the alv display.
    all the rows should not be deleted if one of the field in gt_sim eq 'R'.
    how to check this condition

    dear jayanthi,
            ok if i am coding like that as u mentioned ,
              it will exit the loop when first time the field value is 'R'.
      if any of  the selected rows contains  field value 'R'. it shold not delete all the selected rows.
    as u suggested it will not delete after first time the field value is r.
    i am deleting it by tab index so,
    suppose if i am selecting the row without field value R say its tabix is 1.
      the next row with tabix 2 with field value R.
      it deletes the first row and exits , it should not delete the first row also.

  • How to delete the committed row from a table from its VOImpl class ??

    I am new to ADF and I have problem to solve. To perform roll back I am using fetching key before roll back and setting it after undo operation, so that I can stay back in the currently selected row. But in my case I am using application model commit for one LOV attribute selection in the row. So when ever I am performing roll back operation after inserting a row, the values other than this committed LOV attribute gets roll backed, but I need remove the entire row from table. Does there any option to remove a row based on the attribute values of a row from VO's row implementation or from bean class in a performance optimized way ?
    Thanks in advance..........

    http://java.sun.com/javase/6/docs/api/javax/swing/table/DefaultTableModel.html#removeRow(int)
    Why did you mark it answered but gave no dukes to finalight? That's not how it works.
    You should mark his answer as correct and give him at least one duke, for the effort!

Maybe you are looking for

  • Can MULTIPLE birthdays on Address Book card show up in iCal?

    iCal 2.0.3 - I have a number of cards in my Address Book that list primary party, spouse and several children. I have created in Address Book on a single card a birthday field for EACH of the parties on an Address Book card. However, only the primary

  • Autopatch - Error running adutlrcmp.pls in adprdcAdUtilrcmp()

    Hi, We have recently migrated our EBS 10g database from 32 bit RHEL4 server to 64 bit OEL5 server. All the apps servers are runing on 32 bit RHEL 4 server. After migrating all apps services are working fine. Now i am trying to upgrade the database to

  • Data fetch from live cache

    How can I retrieve data from live cache?This is in Demand Planning : SCM APO. Please suggest ways. Thanks & Regards, Savitha

  • Getting info of detail level  of a dimension

    I have Oracle EE 10g with appr patch for OLAP option and AWM(10.2.0.3A). With the help of awxml.jar I am able to get dimensions,levels,hierarchy,attributes and cubes. But could you please suggest me what should I do to get the detail level of a dimen

  • Firefox won't download files

    Long story, short version: Problem is a progression from bad to worse. Firefox 33.3 won't download or save files (images, web pages, etc.). File picker doesn't open/ can't browse folders, etc. Tried troubleshooting including: reset firefox, safe mode