Update group of rows with sequence

Hi guys,
I have no idea how to do an update of a table with a sequence value... but i don't want to increment the sequence for each row.
create sequence seq_num;
create table upd_group(
id number,
group_code varchar2(5),
seq_num number
insert into upd_group values(1,'a',null);
insert into upd_group values(2,'c',null);
insert into upd_group values(3,'a',null);
insert into upd_group values(4,'b',null);
insert into upd_group values(5,'a',null);
insert into upd_group values(6,'b',null);
commit;
select * from upd_group;
--doesn't work
update upd_group set seq_num = seq_num.nextval
where group_code in (select distinct group_code from upd_group)the expected result would be
all rows with group_code = 'a' would have N
all rows with group_code = 'b' would have N+1
all rows with group_code = 'c' would have N+2
and so on....
any idea how to do this?

Thanks for posting sample data!
If this is a one time shot, then analytics and MERGE might come to the rescue:
SQL> select * from upd_group order by group_code;
        ID GROUP    SEQ_NUM
         1 a
         3 a
         5 a
         4 b
         6 b
         2 c
6 rows selected.
SQL> --
SQL> --doesn't work
SQL> --update upd_group set seq_num = seq_num.nextval
SQL> --where group_code in (select distinct group_code from upd_group);
SQL> --
SQL> merge into upd_group a
  2  using ( select id
  3          ,      dense_rank() over (order by group_code) new_seq_num
  4          from   upd_group
  5         ) b
  6  on  (a.id = b.id)
  7  when matched then update set a.seq_num = b.new_seq_num;       
6 rows merged.
SQL> --
SQL> select * from upd_group order by group_code;
        ID GROUP    SEQ_NUM
         1 a              1
         3 a              1
         5 a              1
         4 b              2
         6 b              2
         2 c              3
6 rows selected.How a sequence could be able to take care of this in a query....that's interesting.
Depending on your database version you might opt for a virtual column....(11g stuff)

Similar Messages

  • Load distinct rows with sequence

    Hi All
    I have requirement at my client where we need to load distinct rows from the source TABLEA into TABLEB and add sequence in target TABLEB.
    As we know in Oracle we cant use sequence with distinct keyword, one of the solution is to use the sequence in target so ODI will capture
    distinct rows from source and use the sequence only in target table but if the source and target are on same schema then ODI doesn't create
    C$ table but it load data directly into target table and we get the error of invalid use of sequence.It wors fine if source and target table on different
    schema. I like to know if there is any way force ODI to create C$ table with distinct rows and load the sequence in target table only even source and
    target are on same schema. Otherwise I have create two interface to capture the distinct rows firct and then update the same table with sequence
    in second step. I really wanna avoid creating 2 interface for this simple job.Let me know if you have better solution.
    Thanks
    Kashif

    user634784 wrote:
    But is there any way to get the same outcome without using the subquery.In reality... No.
    You can hide the fact that you have to generate a row_number for the records by using a view... ;)
    SQL> ed
    Wrote file afiedt.buf
      1  create table t as select 1 as Empid, to_date('01-jan-2008','DD-MON-YYYY') as startdate, null as enddate, 'O1' as organisation from dual union all
      2                    select 2, to_date('2-jan-2008','DD-MON-YYYY'), to_date('31-jul-08','DD-MON-YYYY'), 'O1' from dual union all
      3                    select 3, to_date('2-jan-2008','DD-MON-YYYY'), to_date('31-jul-08','DD-MON-YYYY'), 'O1' from dual union all
      4                    select 4, to_date('5-jan-2008','DD-MON-YYYY'), to_date('31-jul-08','DD-MON-YYYY'), 'O2' from dual union all
      5                    select 5, to_date('2-jan-2008','DD-MON-YYYY'), to_date('31-jul-08','DD-MON-YYYY'), 'O2' from dual union all
      6                    select 6, to_date('2-jan-2008','DD-MON-YYYY'), to_date('31-jul-08','DD-MON-YYYY'), 'O2' from dual union all
      7                    select 7, to_date('2-jan-2008','DD-MON-YYYY'), to_date('31-jul-08','DD-MON-YYYY'), 'O3' from dual union all
      8*                   select 8, to_date('2-jan-2008','DD-MON-YYYY'), to_date('31-jul-08','DD-MON-YYYY'), 'O3' from dual
      9  /
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1  create view vw_x as
      2* select empid, startdate, enddate, organisation, row_number() over (partition by organisation order by empid) rn from t
    SQL> /
    View created.
    SQL> select * from vw_x where rn = 1;
         EMPID STARTDATE ENDDATE   OR         RN
             1 01-JAN-08           O1          1
             4 05-JAN-08 31-JUL-08 O2          1
             7 02-JAN-08 31-JUL-08 O3          1
    SQL>

  • SCCM 2012 Update Group inconsistency Problem with Red marked Updates

    Hi everybody,
    we have a big Problem with our SCCM 2012 R2 CU3 Enviroment, regarding of Update Groups which got out of sync.
    we have a SCCM Site Infastructure with one CAS and 4 Primary Sites and on every Site is the SUP Role installed.
    I don't know when this failure occours but i think it was after the CU3 Installation. The Installation itself went smooth without any Errors or Warnings.
    The Problem is as following. We have some updates in Update Groups (all of them are Core XML Updates) which are out of sync and marked red as an invalid Update on 2 Primary Sites. On the CAS Site and the 2 other Primary SItes they are marked as green (downloaded
    yes and deployed yes)
    We have no Replication issues regarding the Replication Status (everything is synchronized to 100%) and the Replication Link Analyzer does also show no Problems at all.
    I now deleted the Deployments and the SW Update Group waited until the replication was fine and created a new one and downloaded these patches on one of the Primary Sites which had shown this Failure.
    The Result was not good. It looks like before. On the CAS and 2 Primary Sites the Deplyment is shown as downloaded but on the other 2 Sites the Status is again Downloaded=no.
    Does anybody have any idea what to do now ? I checked objmgr.log and rcmctr. log but found nothing what shows me the way in the right direction.
    Thx for your time, and it would be fine if anybody can share knowledge about this failure and how to fix it.
    All other Ideas are also welcome.
    Thx a lot in advance and have a nice bug free day :-)
    Bastian

    Hi,
    Please try to manually synchronize software updates from the CAS and monitor the WSUSCtrl.log, WCM.log and wsyncmgr.log on the CAS and Primary sites.
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Did bc4j create row with sequence change from integer to long

    When creating a new row through bc4j with database sequence for primary key, I followed the online examples and even checked the samples distributed with jdev production 9.0.2. They all show that the sequence is returned as Integer. I finally changed it to Long and got it to work. Has there been a change, or have I got something else fouled up?
    This is the code that worked...
    protected void create(AttributeList attributeList)
    super.create(attributeList);
    // get the next template ID from database sequence
    SequenceImpl s = new SequenceImpl("XXPRC_TEMPLATE_ID_S", getDBTransaction() );
    java.lang.Long next = (java.lang.Long) s.getData();
    setTemplateId( new Number(next) );
    }

    When creating a new row through bc4j with database sequence for primary key, I followed the online examples and even checked the samples distributed with jdev production 9.0.2. They all show that the sequence is returned as Integer. I finally changed it to Long and got it to work. Has there been a change, or have I got something else fouled up?
    This is the code that worked...
    protected void create(AttributeList attributeList)
    super.create(attributeList);
    // get the next template ID from database sequence
    SequenceImpl s = new SequenceImpl("XXPRC_TEMPLATE_ID_S", getDBTransaction() );
    java.lang.Long next = (java.lang.Long) s.getData();
    setTemplateId( new Number(next) );
    } Yes some javadoc was corrected to reflect this change in 9.0.2. Could you post the "context" for the javadoc where you're seeing this example so we can verify if that's corrected too.
    To get the correct Sequence value, you need to call getSequenceNumber() method and not getData which should have been (and is in 902) marked internal.

  • 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

  • Trying to get ending effective date for groups of rows

    Hi Everyone,
    I've searched the forums, but I can't find a post that presents a problem quite like this.
    I have some data that looks like this:
            ID_NUM     EFFECTIVE ALLOC_PERCENT   ACCT
           101 01-JUL-11            21   A1
           101 01-JUL-11            72   A2
           101 01-JUL-11             7   A3
           101 01-JUL-12            20   B1
           101 01-JUL-12            80   B2
           101 01-JAN-13            20   A1
           101 01-JAN-13            20   A2
           101 01-JAN-13            50   A3
           101 01-JAN-13            10   B1
           101 01-JUN-13            50   A1
           101 01-JUN-13            50   A2(note - I manually inserted blank lines for clarity)
    Here's the logic: The rows represent a percentage allocation to the account number for the specified id number, for that effective date. A newer effective date supercedes previous ones, and if any row in the conceptual group is superceded, then they all are.
    I'm trying to find out the date when each group's effective period ended, and include that in the result set so that I can subsequently calculate the number of days a given row was effective; something like this;
      ID_NUM     EFFECTIVE END_DATE   ALLOC_PERCENT ACCT
           101 01-JUL-11 01-JUL-12             21 A1
           101 01-JUL-11 01-JUL-12             72 A2
           101 01-JUL-11 01-JUL-12              7 A3
           101 01-JUL-12 01-JAN-13             20 B1
           101 01-JUL-12 01-JAN-13             80 B2
           101 01-JAN-13 01-JUN-13             20 A1
           101 01-JAN-13 01-JUN-13             20 A2
           101 01-JAN-13 01-JUN-13             50 A3
           101 01-JAN-13 01-JUN-13             10 B1
           101 01-JUN-13 <null>                50 A1
           101 01-JUN-13 <null>                50 A2The END_DATE of the group is the EFFECTIVE_DATE of the following group (ordered by ID_NUM, EFFECTIVE_DATE).
    The last two rows' END_DATE is null because there is no group of rows with a later effective date - in my process, I'll NVL that to sysdate so that my days calculations will be valid.
    I tried some analytic queries with LEAD, but I couldn't figure out how to make it get the next group's effective date. I could get the next row's effective date, but not the next group's. I couldn't specify how many lead rows to look ahead, because there is not a consistent number of rows in each group.
    How do I populate the END_Date column?
    Here's the code to create the above.
    create table t
    (id_num number,
    effective_date date,
    alloc_percent number,
    acct_code varchar2(4)
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2011',21.0,'A1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2011',72.0,'A2');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2011',7.0,'A3');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2012',20.0,'B1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2012',80.0,'B2');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',20.0,'A1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',20.0,'A2');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',50.0,'A3');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',10.0,'B1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jun-2013',50.0,'A1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jun-2013',50.0,'A2');
    commit;
    select * from t;Oracle version information:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE     11.2.0.3.0     Production"
    TNS for Solaris: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    Thank you very much

    select  id_num,
            effective_date,
            first_value(effective_date)
              over(
                   partition by id_num
                   order by effective_date
                   range between 1 following and unbounded following
                  ) end_date,
            alloc_percent,
            acct_code
      from  t
      order by id_num,
               effective_date
        ID_NUM EFFECTIVE END_DATE  ALLOC_PERCENT ACCT
           101 01-JUL-11 01-JUL-12            21 A1
           101 01-JUL-11 01-JUL-12            72 A2
           101 01-JUL-11 01-JUL-12             7 A3
           101 01-JUL-12 01-JAN-13            20 B1
           101 01-JUL-12 01-JAN-13            80 B2
           101 01-JAN-13 01-JUN-13            20 A1
           101 01-JAN-13 01-JUN-13            10 B1
           101 01-JAN-13 01-JUN-13            20 A2
           101 01-JAN-13 01-JUN-13            50 A3
           101 01-JUN-13                      50 A1
           101 01-JUN-13                      50 A2
    11 rows selected.
    SQL> SY.

  • All Software update groups expired

     Hi,
    Please see http://social.technet.microsoft.com/Forums/en-US/39b60e34-f30a-4963-a08b-6a8e13e44b91/software-update-groups-grey-icon-with-x-?forum=configmanagersecurity
    for reference.
    We created update lists for Windows 7 with Office, automatic updates for SCEP, they all are expired (Expired icon of “http://technet.microsoft.com/en-us/library/hh848254.aspx). I don’t want them to expire. I want to make sure every new
    OS will get the latest updates + antivirus updates.
    Not sure if this is by design, an error on SCCM (http://social.technet.microsoft.com/Forums/en-US/0c13c27d-55a9-4f56-8ac0-f9053301ab0c/all-updates-in-sccm-software-updates-are-set-to-expire?forum=configmgrsum=>
    my SCUP is there) or there is some misconfiguration.
    Please advise. J.
    Jan Hoedt

    Jan,
    > *Can you help me with this mechanism, I'm not familiar with it?
    While viewing the updates that are a member of the software updates group, either sort by the "Expired" column or filter by Expired = Yex.  Select all expired updates, right click, and select 'Edit Membership".  Uncheck the checkbox for the software
    update groups you are trying to remove them from.
    > *I seem to remember there was somewhere an option that mentioned expired
    This option has to do with how long 'superseded' updates will remain available for deployment.  You can set under Administration > Site Configuration > Sites.  Right click on your site and select Configure Site Components > Software Update
    Point.  The setting is on the "Supersedence Rules" tab.
    However, Microsoft will also directly expire updates from time to time as well.  In general, this is normal and something you shouldn't worry about managing.  When the update has been expired by Microsoft, it is something you couldn't install even
    by going to Windows Update, so you shouldn't worry trying to deploy them.  Instead, deploy the current updates instead of superseded ones.
    >How can I automate this (not automatically apply but using manually which updates to use and deploy at times I choose)?
    For organizations with very simple Software Update processes, you could use an Automatic Deployment Rule to select updates based on a criteria, download the content to a deployment package, add the updates to a software update group, and create a deployment
    to a collection.  That deployment can be 'available' and not required if you plan to hand install them later.
    This documentation gives you an overview of how all the Software Update Management features work:
    http://technet.microsoft.com/en-us/library/gg682168.aspx#BKMK_DeploymentWorkflows
    And this blog post gives an example of using an ADR:
    http://blogs.technet.com/b/configmgrdogs/archive/2012/05/08/configmgr-2012-automatic-deployment-rules.aspx
    I hope that helps,
    Nash
    Nash Pherson, Senior Systems Consultant
    Now Micro -
    My Blog Posts
    If you've found a bug or want the product worked differently,
    share your feedback.
    <-- If this post was helpful, please click "Vote as Helpful".

  • Update rows with a sequence which fall under same group.

    Hi Friends,
    I have sample table with following data :
    ID     DIV     NEW_ID
    1     A     
    2     A     
    3     B     
    4     B     I want to update the column NEW_ID with a sequence value for the rows with same DIV value.
    My result should look like below :
    ID     DIV     NEW_ID
    1     A         1001     
    2     A       1001
    3     B       1002
    4     B       1002How can I accomplish with a single update ?
    Thanks
    Raj.

    This isn't pretty, but it should work ....
    ME_XE?create table table1 (col1 number, col2 varchar2(1), col3 number);
    Table created.
    Elapsed: 00:00:00.04
    ME_XE?insert into table1 values (1, 'A', NULL);
    1 row created.
    Elapsed: 00:00:00.06
    ME_XE?insert into table1 values (2, 'A', NULL);
    1 row created.
    Elapsed: 00:00:00.01
    ME_XE?insert into table1 values (3, 'B', NULL);
    1 row created.
    Elapsed: 00:00:00.00
    ME_XE?insert into table1 values (4, 'B', NULL);
    1 row created.
    Elapsed: 00:00:00.00
    ME_XE?
    ME_XE?
    ME_XE?create sequence s start with 1001 increment by 1;
    Sequence created.
    Elapsed: 00:00:00.00
    ME_XE?create or replace function get_s_nextval
      2  return number
      3  as
      4     o_val number;
      5  begin
      6     select s.nextval into o_val from dual;
      7     return o_val;
      8  end;
      9  /
    Function created.
    Elapsed: 00:00:00.54
    ME_XE?
    ME_XE?
    ME_XE?merge into table1 t using
      2  (
      3     with data
      4     as
      5     (
      6        select --+ MATERIALIZE
      7           col2, get_s_nextval as next_value
      8        from
      9        (
    10           select distinct col2
    11           from table1
    12           where col3 is null
    13        )
    14     )
    15     select * from data
    16  ) s
    17  on (s.col2 = t.col2)
    18  when matched then update set t.col3 = s.next_value;
    4 rows merged.
    Elapsed: 00:00:00.20
    ME_XE?
    ME_XE?
    ME_XE?select * from table1;
                  COL1 COL               COL3
                     1 A                 1001
                     2 A                 1001
                     3 B                 1002
                     4 B                 1002
    4 rows selected.
    Elapsed: 00:00:00.03
    ME_XE?

  • Problem with checkbox group in row popin of table.

    In table row popin I have kept Check Box Group.I have mapped  the texts property of checkbox group to the attribute which is under the subnode of the table.the subnode properties singleton=false,selectioncardinality=0-n,and cardinality=0-n.
    if there are 'n' number of records in the table.each record will have its own row popin and in the row popin there is check box group.
    the check box group in the row popin  belongs to that perticular row.
    but the checkboxegroup values in row popins of all the  rows are getting changed to the row which is lead selected.
    The same scenario  (table in the row popin is showing the values corresponding to its perticular row and all the table values in popin are not getting changed to the one lead selected in the main table)is working fine with the table in place of  checkbox group in row popin with datasource property of table  binded to the subnode
    I cant trace out the problem with checkbox group in place of table.
    Please help me in this regard.I have to place check box group in place of table in row popin.
    Thanks and Regards
        Kiran Kumar K

    I have done the same thing successfully with normal check box ui element. Try using check box in your tabel cell editor instead of check box group.

  • 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

  • Return to selected row with refresh after update in edit  form

    Hi,
    I created a database view.When selected a single row and click on button i can edit the row in a form for update.What i want, when doing some update and click on the commit button i return back on the initial row with a refresh to see the update done on this row.I succeeded to modify the form and commit.But when i return on the selected row my update is not visible.How can i return to the same selected row with a refresh.In oracle form i can do a go record with execute_query, but how to do this in ADF.Please someone can help so that i do not spend many days on it.
    Thanks
    Soodesh

    [click for the tutorial|http://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=6&ved=0CFQQFjAF&url=http%3A%2F%2Fandrejusb.blogspot.com%2F2013%2F03%2Fadf-rollback-and-keep-current-row.html&ei=Tnl3Ucn3BoXIrQeemICQAw&usg=AFQjCNHdYcJL8kJKymqbWBT9XDGTWmeUvQ&bvm=bv.45580626,d.bmk&cad=rja]
    here you go :)

  • I can not update a Windows Server 2008 R2 with Software Update Group in SCCM2012

    Hi all,
    I got some problems with update deployments these days.
    I try to configure SCCM2012 to update 1 Windows Server 2008 R2 (with Hyper-V / This server is in a cluster)
    Actually i've 4 other Hyper-V servers and i would like to add one more in the cluster called Hyper-V5. To do that i need that all Hyper-V servers use the same Windows Updates.
    I created a collection for my Hyper-V servers and then a Software Update Group with all needed updates (checked the list of another HV-Server).
    I did a deployment on this collection using this new Software Update Group.
    I checked the Sofwtare Center's logs on the Hyper-V5 server and i saw that synchronization has a successfull state.
    But there is no updates installed or displayed in Sofwtare Center.
    Here is some screenshots : Oh no i can't post image because ... "Body text cannot contain images or links until we are able to verify your account." waiting to be verified since months.
    Thanks for your help.

    Hi,
    Have you try to run Software Updates Scan Cycle and Software Updates Deployment Evaluation Cycle Actions on the client? Please check ScanAgent.log and PolicyAgent.log to see whether the client received the updates deployment policy.
    Best Regards,
    Joyce Li
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Update Rows with info from other Rows in Same Table.

    I'm trying to update rows with information from the same table. The table gets loaded with info from a report that runs and it has to be a new entry every month but I would like to carry over some of the info from last month. This statement below runs but updates all rows in the new table load and in my test cases I only made a few match so only like 5 records should get updated. This is an example of what I'm trying to do. If I add this(C2.COL_INVC_ID = C1.COL_INVC_ID) to the last "*Where*" statement I get an invalid identifier for "C2.COL_INVC_ID". So what am I doing wrong here??? How can I update only the rows that where also in last months run???
    Thanks in advance for any help!
    Update OpenIssues OI1
    Set(OI1.Num, OI1.Status, OI1.Code, OI1.LastModifiedDate) =
    (Select OI2.Num, OI2.Status, OI2.Code, OI2.LastModifiedDate
    From OpenIssues OI2
    Where OI2.num = OI1.num and OI2.TableLoadDate = TO_DATE('01/31/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    Where and OI1.TableLoadDate = TO_DATE('02/29/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    SQLMe

    Hi,
    Welcome to the forum!
    SQLMe wrote:
    I'm trying to update rows with information from the same table. The table gets loaded with info from a report that runs and it has to be a new entry every month but I would like to carry over some of the info from last month. This statement below runs but updates all rows in the new table load and in my test cases I only made a few match so only like 5 records should get updated. This is an example of what I'm trying to do. If I add this(C2.COL_INVC_ID = C1.COL_INVC_ID) to the last "*Where*" statement I get an invalid identifier for "C2.COL_INVC_ID". If the aliases c1 and c2 aren't defined anywhere, then you can't use them anywhere.
    The WHERE clause of the UPDATE statement can only reference the table being updated, ot1 in this case.
    So what am I doing wrong here??? How can I update only the rows that where also in last months run???
    Thanks in advance for any help!
    Update OpenIssues OI1
    Set(OI1.Num, OI1.Status, OI1.Code, OI1.LastModifiedDate) =
    (Select OI2.Num, OI2.Status, OI2.Code, OI2.LastModifiedDate
    From OpenIssues OI2
    Where OI2.num = OI1.num and OI2.TableLoadDate = TO_DATE('01/31/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    Where and OI1.TableLoadDate = TO_DATE('02/29/2012 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
    ------------There's a syntax error in the last line. Either something got lost when you posted the code, or you just don't want the keyword AND. You certainly don't want AND immediately after WHERE.
    In general, if it's not obvious how to do an UPDATE, then UPDATE is the wrong tool: you want MERGE instead.
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Simplify the problem as much as possible. Remove all tables and columns that play no role in this problem.
    If you're asking about a DML statement, such as UPDATE, the CREATE TABLE and INSERT statements should re-create the tables as they are before the DML, and the results will be the contents of the changed table(s) when everything is finished.
    Always say which version of Oracle you're using.
    See the forum FAQ {message:id=9360002}

  • Update several rows with single query (easy question, I guess)

    Hi all!
    I have table with two columns - name and value.
    I populate it with several sql queries:
    insert into settings (name, value) values ('company_name', 'My Company');
    insert into settings (name, value) values ('company_address', 'Company Address 12');
    insert into settings (name, value) values ('company_city', 'South Park');
    How can update rows with company_name and company_city in single query?
    Thank you in advance!

    How can update rows with company_name and company_city in single query?I guess something like this was meant:
    update settings set value = ??? where name in ('company_name ', 'company_city');But it's still unclear to me what should be used instead of question marks... :)
    Regards.

  • 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

Maybe you are looking for

  • Query like Calendar

    Hi, Expert Can i used only select statement to find query .... ( If sysdate is '03-Jul-07' ) like calendar ... Date_No Date_Name 01 SUN 02 MON 03 TUE 14 SAT 15 SUN 16 MON 30 MON 31 TUE Select ... from dual; Best Regard First_Step

  • Custom Metadata and LR in Workflow?

    Does anyone out there have a work flow that involves adding custom metadata? How do you do it?

  • Need help wireless not working

    Hello all, I'm running a Lenovo 3000 v100 laptop and I've encounter this problem recently.  My laptop won't let me connect to the internet wirelessly.  The wireless card does sense nearby connection and was able to connect to it.  The icon tells me I

  • Sales Analysis by Customer Total Open IN

    Hi all Any idea why this Sales Analysis by Customer Total Open IN does not equal to total Sales Amount less Applied Amount when double click to read the details? Kedalene Chong

  • Any chance a lost phone could be located?

    Is there any way to track a lost phone?