Macro/VBA script to merge rows with same values in another column

Hi.
I'm developing a dance competition application, using Excel 2010, and have so far managed to put judges' marked scores into a worksheet through a userform.
Now I would like to make the worksheet more presentable as a scoreboard, as you would manually, but via VBA scripts.
Exhibit Numbers (Column G) are unique identifiers (per competition) for contestants and each contestant is typically judged by three judges.  The scores in three separate categories from one judge would spread in one row so each contestant would have three
rows.
I would like to merge rows of columns where the totals from the judges go (Columns P to U) for each contestant.
I've considered using some kind of loop but I don't have enough experience in vba scripting, it gets overcomplicated. Could someone please help?
Many thanks.
Maki Koyama (Canberra, AUS)

Hi,
You cannot add a static "Y" inside a when looping over "i". You need to ensure that "Y" changes along with X. Try the modified code below.
List elements = new ArrayList();
for (int i=0; i<XXX; i++) {
IZZZ.IVisibilityElement el = wdContext.createVisibilityElement();
el.setVisAttr(i); // Change Y to i
elements.add(el);
wdContext.nodeVisibility().bind(elements);
That should give you an idea of what is erroneous in the code.
Thanks.
HTH.
p256960

Similar Messages

  • How to merge rows with similar values in alv grid display in webdynpro

    Hi experts,
                   i want to know about how to merge rows with similar values in alv grid display of webdynpro.grouping rows is possible in table display in webdynpro but i am not able to do row grouping in the alv grid display in webdynpro.
    kindly suggest.
    thanks ,
    Anita.

    Hi Anita,
    did you find a solution for this? I have opened a Thread, if you know the answer maybe you could help me out:
    Is there an ALV function similar to the TABLE Row grouping?
    Thanx in advanced!!!
    Kind Regards,
    Gerardo J

  • Grouping consecutive rows with same value?

    Hi
    I have a table in which three columns are:
    ROWID  SHOPNAME
    1      SHOP_C     
    2      SHOP_A     
    3      SHOP_C     
    4      SHOP_C     
    5      SHOP_A     
    6      SHOP_A     
    7      SHOP_C     
    8      SHOP_B     
    9      SHOP_B     
    10     SHOP_E    
    11     SHOP_A     
    12     SHOP_D     
    13     SHOP_D     
    14     SHOP_F     
    15     SHOP_G     
    16     SHOP_F     
    17     SHOP_C     
    18     SHOP_C     
    19     SHOP_C     
    20     SHOP_C      Rowid is a primary key column with unique ids
    Shopname is varchar2 column
    I want to make groupings of every "shopname" value "order by ROWID" such that when there are consecutive rows of same shopname the group remains same and as soon as there is different value in shopname column for the next row the "group" changes.
    below is my desired output is with 3rd column of groupings as follows:
    ROWID  SHOPNAME    Groups
    1      SHOP_C      1
    2      SHOP_A      2
    3      SHOP_C      3 ------> same grouping because Shop name is same
    4      SHOP_C      3 ------> same grouping because shop name is same
    5      SHOP_A      4 ----> different shopname so group changed.
    6      SHOP_A      4 ----> same group as above because shopname is same
    7      SHOP_C      5
    8      SHOP_B      6
    9      SHOP_B      6
    10     SHOP_E      7
    11     SHOP_A      8
    12     SHOP_D      9
    13     SHOP_D      9
    14     SHOP_F      10
    15     SHOP_G      11
    16     SHOP_F      12
    17     SHOP_C      13
    18     SHOP_C      13
    19     SHOP_C      13
    20     SHOP_C      13I want that to be done via analytics, so that I can partition by clause for different shops over different cities
    regards
    Ramis.

    with data(row_id, shop) as
    select 1,      'SHOP_C' from dual union all
    select 2,      'SHOP_A' from dual union all     
    select 3,      'SHOP_C' from dual union all
    select 4,      'SHOP_C' from dual union all    
    select 5,      'SHOP_A' from dual union all     
    select 6,      'SHOP_A' from dual union all
    select 7,      'SHOP_C' from dual union all
    select 8,      'SHOP_B' from dual union all
    select 9,      'SHOP_B' from dual union all
    select 10,     'SHOP_E' from dual union all
    select 11,     'SHOP_A' from dual union all
    select 12,     'SHOP_D' from dual union all
    select 13,     'SHOP_D' from dual union all
    select 14,     'SHOP_F' from dual union all
    select 15,     'SHOP_G' from dual union all
    select 16,     'SHOP_F' from dual union all
    select 17,     'SHOP_C' from dual union all
    select 18,     'SHOP_C' from dual union all
    select 19,     'SHOP_C' from dual union all
    select 20,     'SHOP_C' from dual
    get_data as
      select row_id, shop,
             lag(shop) over (order by row_id) prev_shop
        from data
    select row_id, shop,
           sum(case when shop = prev_shop
                      then  0
                      else 1
                      end
                ) over (order by row_id) grps
      from get_data;
    ROW_ID SHOP   GRPS
         1 SHOP_C    1
         2 SHOP_A    2
         3 SHOP_C    3
         4 SHOP_C    3
         5 SHOP_A    4
         6 SHOP_A    4
         7 SHOP_C    5
         8 SHOP_B    6
         9 SHOP_B    6
        10 SHOP_E    7
        11 SHOP_A    8
        12 SHOP_D    9
        13 SHOP_D    9
        14 SHOP_F   10
        15 SHOP_G   11
        16 SHOP_F   12
        17 SHOP_C   13
        18 SHOP_C   13
        19 SHOP_C   13
        20 SHOP_C   13
    20 rows selected

  • Group Record Number for consecutive Rows with same value.

    I have following Data in TEST table
    END_DATE      HOURS
    ====================
    8/30/2012     20
    7/30/2012     30
    7/1/2012 30     
    6/30/2012     20
    5/30/2012     20
    5/1/2012     20
    I would like to get the following result (GRP_REC_NUM column)
    END_DATE      HOURS GRP_REC_NUM
    ============================
    8/30/2012     20 1
    7/30/2012     30 1
    7/1/2012 30     2
    6/30/2012     20 1 *<<----- This should reset back to 1*
    5/30/2012     20 2
    5/1/2012     20 3
    Thanks
    slokam

    slokam wrote:
    I would like to get the following result (GRP_REC_NUM column)
    END_DATE      HOURS GRP_REC_NUM
    ============================
    8/30/2012     20 1
    7/30/2012     30 1
    7/1/2012 30     2
    6/30/2012     20 1 *<<----- This should reset back to 1*
    5/30/2012     20 2
    5/1/2012     20 3
    I could not understand why 5/30/2012 has the Rec_num column as 2. According to my understanding, you are trying to assign Ranks to each of the Dates. And if it is so, then 7/1/2012 should have GROUP_REC_NUM as 1 and 7/30/2012 as 2.
    Since, it is not clear about the logic to assign ranks, it will be helpful (for you as well as us) if you can elaborate the logic.
    Below is probably what you need.
    with data as
    select to_date('08/30/2012', 'MM/DD/YYYY') dt, 20 hrs from dual union all
    select to_date('07/30/2012', 'MM/DD/YYYY') dt, 30 hrs from dual union all
    select to_date('07/1/2012', 'MM/DD/YYYY') dt, 30 hrs from dual union all
    select to_date('06/30/2012', 'MM/DD/YYYY') dt, 20 hrs from dual union all
    select to_date('05/30/2012', 'MM/DD/YYYY') dt, 20 hrs from dual union all
    select to_date('05/1/2012', 'MM/DD/YYYY') dt, 20 hrs from dual
    select dt, hrs,
           dense_rank() over (partition by to_char(dt, 'MM') order by dt) rn
      from data
    order by dt;
    DT                        HRS                    RN                    
    01-MAY-12                 20                     1                     
    30-MAY-12                 20                     2                     
    30-JUN-12                 20                     1                     
    01-JUL-12                 30                     1                     
    30-JUL-12                 30                     2                     
    30-AUG-12                 20                     1

  • Counting one of multiple rows with same value for same ID

    Hello,
    I have this query:
    SELECT
    count( case when EXISTS (
                SELECT *
                FROM  business_log bl, subject su
                WHERE  su.ID_SUBJECT = s.ID_SUBJECT
                and bl.id_subject = su.id_subject
                AND    bl.value = 'Solved'
    then 1 else null end) num_solved
    FROM subject s
    It is posible that one subject is more than once 'Solved' in table BUSINESS_LOG
    I want to count only one row solved for one subject.
    I must to use only SUBJECT table in the main query because of other counts.
    Thank You very much.
    Regards
    Milos
    Message was edited by: 2796614

    so in case you have no solved entry...you get NULL back instead of 0.....
    and....there is no need for the group by ....as you are only looking for one subject
    SELECT COALESCE((SELECT max(1)
                      FROM  business_log bl
                     WHERE bl.id_subject = s.id_subject
                       AND bl.value = 'Solved'),0) num_solved
      FROM subject s
    but....I would like to have a proof, that this one is faster than the outer-join solution.
    So...perhaps we'll see an execution plan for both of them.
    corrected....missing bracket

  • Pro*C & SQLDA with NULL value for predicate column

    Hi: I am using a C program to update a table via a dynamic sql (method 4) and SQLDA. In the update statement predicate, I have place holders (as in TBLCOL=:C000). One of the columns in the predicate contains null values, so I set L[n] = 0, V[n] = pData (which pData[0] = '\0'), *(I[n]) = -1, and T[n] = 5 (for text). I cannot find the row that I know is there.
    I cannot change my statement to contain TBLCOL IS NULL, since I don't know ahead of time if I'm looking for rows with null values for this column. The Pro*C manual says that by setting the appropriate *(I[n]) = -1, it indicates to Oracle to simulate the "IS NULL" clause, and update the appropriate rows. In my case, I receive 1403 as SQLCODE when I use TBLCOL=:C000 vs TBLCOL IS NULL. What am I doing wrong? Thank you for your help.

    You should include these columns as well;
    ChangeType (see mxi_changetype)
    ValOwner (repository)
    UserID ("jobid=<>", usermskey, GUI (mmc), DG (dyngrp), reconcile)
    IdAudit  (This is the event task (add and del member for assignments)
    ParentAuditId (AuditID of parent which last updated the attribute, not consistent)
    ChangedBy (Holds the MSKEY of the user which last changed the attribute)
    ExpiryTime
    to make sure you get a fuller picture of the audit record.
    Your selection does not cover all events and descriptions
    br,
    Chris

  • Script to find files with same names with in a folder and it sub folders.

    Looking for script to find files with same names with in a folder and it sub folders.

    Are you just looking to find if any two files underneath a folder have the same name?
    If you just want to know that a file named "whatever" exists in two folders, that's not too difficult, but you probably want to know the full path names.
    Here's one attempt:
    $ perl -MFile::Find -le 'find(\&w, "."); while (($n,$p)=each %file) {if(@{$p}>1){print join(" ",@{$p})}} sub w{push @{$file{$_}},$File::Find::name;}'That will print the pathnames on the same line of any files with the same name that appear anywhere underneath your current directory.
    It's a bit long for a "one-liner", but functional.
    Darren

  • Seperate Document Row with same account  when post GL

    Hello everyone
    How I can seperate Document Row with same account  when post GL
    because If I post dcoument that  have many rows but same account and difference detail. It will sum amount for same account in JE
    and I found that will seperate if it has diference project code but it's not enough for me.
    How I can config SAP B1 to seperate Doc row when post to JE if it has difference detail (as userfield or standard filed)
    Sorry for my poor english
    Thank,Seang

    Hello Suthee,
    Sorry to tell you, it is not possible to do so in current B1 without addon development.
    There are 2 alternative.
    1.Consulting Workaround:
    Seperate the Item into 2 items, the account into 2 sub accounts.e.g.
    Item A => Item A01 and A02
    G/L Account 1001 => Sub Account 100101 and 100102
    2.AddOn development to seperate the JE just after it is created document
    You can update to JE to seperate just after JE are created by docuemnts.
    Just Listen FormDataAdd Event.
    Sample Code:
    Private Sub FormDataEventHandler( _
        ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, _
        ByRef BubbleEvent As Boolean) Handles oApp.FormDataEvent
            'I just listen 133 - AR invoice here,
            'You may add the target documents
            'Before action = true, start the transation
            If BusinessObjectInfo.FormTypeEx = "133" _
                    And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD _
                    Or BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE) _
                    And BusinessObjectInfo.BeforeAction = True Then
                oCompany.StartTransaction()
            End If
            'Before Action = false,
            'Update the JE in document
            'Succeed, commit, otherwise rollback
            If BusinessObjectInfo.FormTypeEx = "133" _
            And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD _
            Or BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_UPDATE) Then
                If BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess Then
                    Dim xmlDoc As System.Xml.XmlDocument = New System.Xml.XmlDocument
                    xmlDoc.LoadXml(BusinessObjectInfo.ObjectKey)
                    Dim objectKey As String
                    objectKey = xmlDoc.SelectSingleNode("//DocEntry").InnerText
                    Dim oDocument As SAPbobsCOM.Documents = Nothing
                    oDocument = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
                    If oDocument.GetByKey(CInt(objectKey)) Then
                        Dim oJE As SAPbobsCOM.JournalEntries
                        oJE = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
                        If oJE.GetByKey(oDocument.TransNum) Then
                            '*Add you code to Update oJE lines here*
                            lRetCode = oJE.Update
                            If 0 <> lRetCode Then
                                oApp.MessageBox("Failed to update JE")
                                'roll back the whole transaction, including the document
                                oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_RollBack)
                                Exit Sub
                            Else
                                'Commit the transaction
                                oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit)
                            End If
                        End If
                    End If
                End If
            End If
        End Sub
    Hope it helps. Thanks.
    Kind Regards
    -Yatsea

  • Show rows with empty values

    Hello,
    We are creating a cross tab report, with products as the columns, and relationship managers with direct and shared revenue displayed across the rows.
    For Eg
    Relationship Manager    Coverage         Product1   Product2   Product3   Product4
    Bob                                Direct                 100,           0,               35,            50
                                          Shared                0,              0,               15,            0
    Alex                               Direct                  15,            25,             40,            10
                                          Shared                5,              0,               5,               0
    George                          Direct                  0,               0,              0,               30
                                          Shared                0,               0,              0,               5
    The problem lies when either one of the products has no values, or one of the relationship managers has no direct or shared revenues. If one of the products has no revenues, it disappears, and also when one of the RMs has no direct or shared revenues, the Direct or Shared row disappears.
    I have tried to create a second query just included the Coverage variable, and using this variable in Query 2 with the RM variable from query 1, along with checking the "Show Rows with Empty Measure values", "Show Rows with Empty Dimension Values" and "Show when empty", but it still does not appear to work.
    It only shows rows with values in them, and shows the rows with empty values at the end with no RM.
    I have not tried to solve for empty columns yet.
    Help with this would be much appreciated!!!!!!!!
    Thank you

    Hi ,
    I think you can resolve this issue following ways ,
    you need create another query  ( Ex :Qauery2 ) add Product object and RM (Direct,shared) object only without  conation. So now query2 result wil have all product and RM(Direct,shared).
    Merge the Product object and RM  between query1 and query2
    Now create table using Product and RM from query2 and measure value from query1.  Now you will get row even there is no data.
    If you want try this sample report using efasion unvierse.
    1) Add year ,state and Discount objects  and apply condition Year Not in list "2004"  and state Not in list "California "
    2) run this query and create the cross tab table . Now you will not get 2004 column  and California row in table.
    3) Create query2 add Year and State only without any condition , run the query. Now query 2 will display all state and year .
    4) Merge the column Year and State between query1 and query2
    4) Create the cross table ussing Year and state from query2 and Discount from Query1
    Now cross table will show 2004 and California ,even there is not in query 1.
    I hope this will help you.
    Ponnarasu
    Edited by: ponnarasuk on Dec 7, 2011 12:48 PM

  • Updating PK with same value - effect on CASCADE UPDATE

    Hello,
    I would like to understand how sql server 2008 deals with cascade updates
    For example I have
    Parent table: Employee with column Id as varchar(20) primary key
    Child table with IdEmployee as varchar(20) foreign key
    I set up Cascade Update for those two tables, meaning any change to primary key in Employee table will cause update in child table rows that match affecting Id
    Scenario 1:
    Update Employee
    set Id = 'ABC',
    Name = 'something new'
    where Id = 'CCC'
    Result of child table: all rows with foreign key IdEmployee and value of 'CCC' are updated. Expected behavior.
    Scenario 2:
    Update Employee
    set Id = 'ABC',
    Name = 'something new 2'
    where Id = 'ABC'
    This time, i am doing something different. I am beside update of column Name with new value, also update primary key but
    with SAME value
    Question is: what is going to happen to child rows? Are they ALL going to UPDATE due to CASCADE UPDATE
    So far, what i did in order to find solution is:
    1. I put an timestamp column in child table that should update each time row gets updated
    2. I put a trigger for update event on child table that will write something to some log table
    *After I set up those two I ran example like above just to be sure timestamp gets changed as well trigger is being fired
    Results of updating PK with same value:
    1. Timestamp didnt change
    2. Trigger didnt fire
    Is this enough to make conclusion that updating primary key with same value ALONG with updating some other columns won't
    affect child tables with UPDATE CASCADE ON
    Update:
    Database is CI AS collation
    If i do following
    Update Employee
    set Id = 'abc',
    Name = 'something new'
    where Id = 'ABC'
    1. Timestamp will change
    2. Trigger will fire
    Conclusion: Case sensitive is important here!
    Thank you very much in advance
    Milos

    >>  would like to understand how sql server 2008 deals with cascade updates <<
    Your posting has a number of conceptual errors. 
    1. The terms “parent” and “child” are not RDBMS; they are used in network databases. We have “referenced” and “referencing” tables; they can be the same table.
    2. A table models a SET of things, so there is no “Employee” table unless you truly have a one-man company. We want a collective or plural name for the SET/table. A better name is “Personnel” for this table. 
    3. Her is no such thing as a generic “id” in RDBMS; it has to be “<something in particular>_id” to be valid. Identifiers are usually fixed length 
    4. It is very, very rude not to post DDL on a forum. You also do not know the ISO-11179 Rules for data element names. They do not change names from table to table! Does your name change whenever you use it in a new place?? NO! Same principle with data. 
    5. The ISO standard uses “<property>_<attribute property>” syntax, no the old PascalCase.
    6. Why did you post a useless narrative? How do we compile “I SET up Cascade UPDATE for those two tables,..” to test it?? 
    CREATE TABLE Personnel
    (emp_id CHAR(20) NOT NULL PRIMARY KEY,
     emp_name VARCHAR(25) NOT NULL,
    CREATE TABLE Health_Plan
    (health_plan_acct CHAR(20) NOT NULL PRIMARY KEY,
     emp_id CHAR(20) NOT NULL 
     REFERENCES Personnel(emp_id)
     ON UPDATE CASCADE
     ON DELETE CASCADE,
    Scenario 1:
    UPDATE Personnel
       SET emp_id = 'ABC',
           emp_name = 'something new'
     WHERE emp_id = 'CCC';
    Result of child table: all rows with foreign key emp_id and value of 'CCC' are updated. Expected behavior.
    Scenario 2:
    UPDATE Personnel
       SET emp_id = 'ABC',
           emp_name = 'something new 2'
     WHERE emp_id = 'ABC';
    This time, I am doing something different. I am beside UPDATE of column emp_name with new value, also UPDATE PRIMARY KEY but
    with SAME value.
    >> Question is: what is going to happen to child [sic: referencing]  rows? Are they ALL going to UPDATE due to CASCADE UPDATE. <<
    SQL uses a set-oriented model, so the whole table is updated as a unit of work in theory. 
    So far, what I did in order to find solution is:
    >> I put an timestamp column in child [sic: referencing] table that should UPDATE each time row gets updated <<
    Why? It is not in the SET clause list; it cannot change. As an aside,  The T-SQL TIMESTAMP is not the ANSI/ISO TIMESTAMP; it is DATETIME2(n) in T-SQL. The old TIMESTAMP is being deprecated because it stinks both in concept and implementation. 
    >> I put a trigger for UPDATE event on child [sic: referencing] table that will write something to some log table.<<
    TRIGGERs are fired by what is called a “database event” shown in the ON [DELETE | UPDATE] clause. T-SQL adds INSERT as an event. An update to any value or to no value at all is still an update. Depending on the collation, case may or may not matter in the final
    outcome. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Not able to color different rows with different colors in a column of table

    Hi,
    I am trying to to display different rows with different colors in a column of the table based on some decode condition.
    I have gone through the following threads :
    Can we colour the rows in the column of a table
    Changing Color of a value in a column
    This is what i have done :
    1.Added the following code to custom.xss(changed the name to Custom.xss as suggested in one of the above threads) --- in path ---- jdev\myhtml\OA_HTML\cabo\styles
    <style selector=".1">
    <includeStyle name="DefaultFontFamily"/>
    <property name="font-size">11pt</property>
    <property name="font-weight">Bolder</property>
    <property name="color">#008000</property>
    <property name="text-indent">3px</property>
    </style>
    <style selector=".2">
    <includeStyle name="DefaultFontFamily"/>
    <property name="font-size">11pt</property>
    <property name="font-weight">Bolder</property>
    <property name="color">#FFFF00</property>
    <property name="text-indent">3px</property>
    </style>
    2. Sql query of the VO is :
    select comments,role ,decode(role,'REQUESTER','1','2') Colorattr from xxat_sars_action_history where request_id = :1 and event_name = :2 and action_code <> 'PENDING'
    order by sequence_num desc
    3. Coded the following in the process request of the controller:
    OATableBean table = (OATableBean)webBean.findIndexedChildRecursive("CommentsTB");
    OAMessageStyledTextBean roleBN = (OAMessageStyledTextBean)webBean.findIndexedChildRecursive("role");
    OADataBoundValueViewObject cssjob = new OADataBoundValueViewObject(roleBN,"Colorattr");
    roleBN.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, cssjob);
    where 1 and 2 form the colors ( i have even tried with 'Red' and 'Yellow'...as it was not working replaced with 1 and 2)
    4.The query returns data fine with corresponding 1 and 2 values.
    But different colors are not getting reflecting on to the UI.
    I am testing this on my local jdev.
    Please do let me know if i am missing something.
    Thanks ,
    Sushma.

    Any Clues please.....
    Thanks,
    Sushma.

  • Deleting  rows with missing values in field in start routine of update rule

    Hello experts,
    how can I delet rows with missing values in a specific field in the start routine of update rules?
    I think ABAP code should look something like this:
    delete ...  from DATA_PACKAGE where Z_NO = ''.
    thanks in advance for any suggestions!
    hiza

    Write:
    delete data_package where field = value.
    Hope it helps.
    Regards

  • Clearing WHT on advance & Invoice with same value

    Hi SAP Gurus
    Could anybody suggest me what transaction code to be used or need any configuration change for clearing both the doc i.e. WHT deduct on advance payment with WHT deducted on Invoice with same value.
    In this scenario no further payment should be made.
    I have linked both the doc through TCode F-54 and try to clear both the doc with TCode F-44 but in this transaction no tds has been reveresed by the system and showing difference.
    In Partial advance payment the system has automatically reversed the TDS. No problem occured in this scenario.
    Regards
    Aman
    Edited by: Amandeep Garg on Mar 17, 2008 10:43 AM

    Hi Ahmed
    Thanx for your response...............
    But I have already used the same. Is there not any transaction other than F-53 in which bank is not  invovled.
    Regards
    Aman

  • Updating multiple rows with different values

    Hi!
    I have a problem. I need to update more then 1000 rows with different values. How can I do it?
    For exsample i have table:
    id; color, date,
    1 red
    2 green
    3 white
    I need to update date field.
    Update table
    set date='01.02.03'
    where id=1
    Update table
    set date='01.03.03'
    where id=2
    Maybe there is way how to update multiple rows at one query?
    Sorry for my bad english.
    Thanks!

    Hi,
    You can try this
    UPDATE TABLE SET DATE = CASE
                        WHEN ID = 1 THEN TO_DATE('01-02-03','DD-MM-RR')
                        WHEN ID = 2 THEN TO_DATE('01-03-03','DD-MM-RR')
                        ENDcheers
    VT

  • Returning 250 rows with 1000 Values in "IN" Clause Oracle 10g On IBM AIX !!

    Hi,
    Recently we have done the OS migration of Oracle 10g Server from Windows Server to IBM AIX. Everything is fine, But today we came across one crucial bug in the code, i.e In the Select Query, though we're expecting 1000 rows with 1000 values in "IN" Clause , It's returning Only 250 rows. Where as it's returning 1000 rows in Windows Environment with 1000 values in "IN" Clause. I have browsed throgh Google for the resolution but failed to get that.
    This is something like,
    In Oracle 10g On windows :-
    select * from emp
    where dept_id in (1,2,3,...................1000);
    Assuming there  are the dept_id values in Emp table from 1 ... 1000, It's returning 1000 rows.
    In Oracle 10g On IBM AIX ,
    select * from emp
    where dept_id in (1,2,3,...................1000);
    Assuming there  are the dept_id values in Emp table from 1 ... 1000, It's returning 250 rows. Pls help me, what could be the reason for this. and what needs to be checked to fix this.
    Pls suggest !!!
    Raja

    mmmh. Did you compared the select count(*) from your_table; in the two cases.
    If the result is not good and nobody has deleted rows between migration and your test, you migration need to be replayed.
    Which migration did you select, Transportable database or exp/imp...?
    Edited by: Dba Z on 16 août 2009 08:56

Maybe you are looking for

  • How to transfer songs from one iPod to another?

    I have three ipods - iPod #1 has only been synced to iTunes. I want to transfer songs from iPod #2 to iPod #3 without having all of the existing iTunes from iPod #1 getting synced to iPod #3. How do I upload iPod #2 to iTunes and keep it isolated, an

  • Best way to apply patches to alsa-driver?

    Hi! There's been some patches for the E-MU 0404 USB and similar sound cards posted here at the Ubuntu forums. I've tried them before by simply downloading alsa-lib and alsa-driver sources, applying the patches and compiling, and they seem to solve my

  • ABOUT THE TWO COUNTERS OF THE AT-MIO-16-​E

    This is my question.I've an AT-MIO-16-E and I need the two counters to work simultaneously to acqquire two frequencies countinously.I can't find a way to let them work countinously:they always stop after an acquisition.I've tried to use a while loop

  • In design CS5 version d'essai impossible à télécharger!!!!!!

    Bonjour, j ai l'habitude de travailler avec la version d'essai d'in Design ( travail ponctuel et impossible d'acheter la version definitive -à mes frais- pour le moment vu que je n ai pas encore mon contrat definitif), et jusqu a present, je n avais

  • Problem adding images to html text box.

    This one, like a steering wheel down the trousers, is driving me nuts.... Source can be downloaded where is says 'herehere' below (not used to this forum, seems a bit weird.) I have 2 text boxes on the stage, both are set to 'multiline' and set to re