Groups with overlapping intervals

Hello

I need help on a problem of mind-boggling overlap, or perhaps overlap problem.

The data in the example below, I need to set up different subcodes in groups with overlapping
[MIN_VAL intervals; [MAX_VAL


I have this table:
SQL>create table t (product   varchar2(1) not null
  2                 ,subcode   number(1)   not null, constraint subcode_chk check (subcode >= 0)
  3                 ,min_val   number(2)   not null, constraint min_val_chk check (min_val >= 0)
  4                 ,max_val   number(2)   not null, constraint max_val_chk check (max_val >= 0)
  5                 ,constraint t_pk primary key (product, subcode)
  6                 ,constraint t_val_chk check (min_val < max_val));

Table created.

SQL>
SQL>insert into t (product, subcode, min_val, max_val) values ('A', 0, 0, 99);

1 row created.

SQL>insert into t (product, subcode, min_val, max_val) values ('A', 1, 0, 99);

1 row created.

SQL>insert into t (product, subcode, min_val, max_val) values ('A', 2, 18, 67);

1 row created.

SQL>insert into t (product, subcode, min_val, max_val) values ('A', 3, 20, 65);

1 row created.

SQL>insert into t (product, subcode, min_val, max_val) values ('A', 4, 0, 99);

1 row created.

SQL>insert into t (product, subcode, min_val, max_val) values ('A', 5, 45, 60);

1 row created.

SQL>insert into t (product, subcode, min_val, max_val) values ('A', 6, 20, 40);

1 row created.

SQL>insert into t (product, subcode, min_val, max_val) values ('A', 7, 0, 99);

1 row created.

SQL>insert into t (product, subcode, min_val, max_val) values ('A', 8, 60, 65);

1 row created.

SQL>insert into t (product, subcode, min_val, max_val) values ('A', 9, 0, 99);

1 row created.

SQL>commit
  2  /

Commit complete.

SQL>
SQL>  select product, subcode, min_val, max_val
  2      from t
  3     where product = 'A'
  4  order by product, subcode;

PRODUCT    SUBCODE    MIN_VAL    MAX_VAL
------- ---------- ---------- ----------
A                0          0         99
A                1          0         99
A                2         18         67
A                3         20         65
A                4          0         99
A                5         45         60
A                6         20         40
A                7          0         99
A                8         60         65
A                9          0         99

10 rows selected.

SQL>
Records of interest are the subcodes 5,6,8 since they in some cases can be considered as a subcode.

It's OK, that a record MAX_VAL = MIN_VAL from any other folder. The main thing is that the sous-codes
within a group are reciprocal to disclose on MIN_VAL, MAX_VAL.
SQL>  select product, subcode, min_val, max_val
  2      from t
  3     where product = 'A'
  4       and subcode in (5,6,8)
  5  order by min_val;

PRODUCT    SUBCODE    MIN_VAL    MAX_VAL
------- ---------- ---------- ----------
A                6         20         40
A                5         45         60
A                8         60         65

SQL>
I started trying to solve using functions lag/lead Analytics, but without success.

Then I came up with this hierarchical query, but I don't understand it myself and bothers me!

SQL>    select distinct -- This, distinct, bothers me!
  2                      product
  3                     ,subcode
  4                     ,min_val
  5                     ,max_val
  6  --                   ,connect_by_isleaf
  7  --                   ,connect_by_root subcode
  8        from t
  9       where connect_by_isleaf = 1 -- Why does this help me?
 10  start with -- This, start with, seems "clumpsy"
 11            min_val in (  select min_val
 12                            from t
 13                        group by product, subcode, min_val)
 14  connect by nocycle -- This, nocycle, really bothers me!
 15                     min_val > prior min_val
 16                 and max_val <= prior max_val
 17                 and product = prior product
 18                 and subcode <> prior subcode
 19    order by product
 20            ,subcode
 21            ,min_val
 22            ,max_val;

PRODUCT    SUBCODE    MIN_VAL    MAX_VAL
------- ---------- ---------- ----------
A                5         45         60
A                6         20         40
A                8         60         65

SQL>
Currently, I am struggling with only identify the three subcodes. In the perfect world that would be better

PRODUCT    SUBCODE    MIN_VAL    MAX_VAL   GROUP_FLAG
------- ---------- ---------- ----------   ----------
A                0          0         99
A                1          0         99
A                2         18         67
A                3         20         65
A                4          0         99
A                5         45         60            1
A                6         20         40            1
A                7          0         99
A                8         60         65            1
A                9          0         99
Or better yet, if you use the herarchial query:
PRODUCT    SUBCODE    MIN_VAL    MAX_VAL   ROOT_SUBCODE
------- ---------- ---------- ----------   ------------
A                0          0         99              0
A                1          0         99              1
A                2         18         67              2
A                3         20         65              3
A                4          0         99              4
A                5         45         60              6
A                6         20         40              6
A                7          0         99              7
A                8         60         65              6
A                9          0         99              9
Any help and inspiration would be much appreciated. But please do not get offended if I'm not up to the next 12-14 hrs.

Concerning
Peter
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
Published by: Peter on May 19, 2009 12:52
-Change line 15 of hierarchical query

Hi, Peter,.

I'm not sure that understand what you're trying to do.
It may be useful to know
(1) what is your concept of 'group' to this problem? In what sense subcodes 5, 6 and 8 form a group? This is what they have in common the quality of not overlapping with a few rows with the same product? In other words, there will be no more than two groups by product: the lines that overlap with all other ranks and the lines which are not?
(2) what you mean by "disclosing each other?" Is that what the max_val min_val beaches do not overlap?

If you want to identify the subcodes for which there is an another product with the same subcode but non-overlapping min_val and max_val, then:

SELECT     *
FROM     t     m
WHERE     EXISTS (
                 SELECT  NULL
             FROM        t
             WHERE   product =  m.product
             AND        (        min_val > m.max_val
                     OR        max_val < m.min_val
                  )
            );

This requires that min_val<= max_val="" on="" each="">

The rest of this message is the request CONNECT BY you posted, in case you want to understand it better.

When I run the CONNECT BY query you posted, I get these results:

P    SUBCODE    MIN_VAL    MAX_VAL
- ---------- ---------- ----------
A          0          0         99
A          1          0         99
A          4          0         99
A          5         45         60
A          6         20         40
A          7          0         99
A          8         60         65
A          9          0         99

The START WITH clause includes all lines: you might as well not have a START WITH clause:

 10  start with -- This, start with, seems "clumpsy"
 11            min_val in (  select min_val
 12                            from t
 13                        group by product, subcode, min_val)

Since you are grouping OF min_val, the subquery produces a list of all the min_vals of the table.

The clause CONNECT BY esteem line x to be the parent of line y if y min_val max_val beach is a subset of x:

 14  connect by nocycle -- This, nocycle, really bothers me!
 15                     min_val >= prior min_val
 16                 and max_val <= prior max_val
 17                 and product = prior product
 18                 and subcode <> prior subcode

It's a kind of overlap, but much more strict.

Is there a particular reason why NOCYCLE you mind here? As SEPARATE, NOCYCLE is often a sign of something that is awkward, but not an indicator course. Somehow, they are like tape canvas: most of the time when you see led piece of tape is used inappropriately, but that does not mean the appropriate uses do not exist.

Because I'm not sure what you're trying to do, I'm not sure whether or not the WHERE clause allows:

  9       where connect_by_isleaf = 1 -- Why does this help me?

It is certainly important. Without the WHERE clause, the output includes all lines. With the WHERE clause, the lines with the sous-codes 2 and 3 are excluded. Why? Because they always have children. Sub 2 (67-18) is the parent of 3 (20-65), and 3 is the parent of 5 (45-60), 6 (20-40) and 8 (60-65). (2 is also the parent of 5, 6 and 8, as well as their grandparents.)
You can ask: what about the subcodes 0, 1 and 7: they still do not have children? Why they spend the WHERE clause? 0, 1 and 7 (ranging from 0 to 99) are the parents of all the other lines, including one from the other. Therefore, they will all be invloved in cycles and whenever CONNECT_BY_ISCYCLE = 1, CONNECT_BY_ISLEAF will also be 1, while 0, 1 and 7 have children, they do not always have children.

Published by: Frank Kulash, May 19, 2009 13:07

Tags: Database

Similar Questions

  • Photo constantly order of photos in a slideshow changes no matter how many times the movements of the user the photo back to the good look at an order. Example: Bathroom Plans eventually grouped with pictures of kitchen! I have found no way to stop this o

    Apple Photo 1.3 serious problems - how can I SOLVE all these problems?

    (1) breaks down without rhyme or reason no matter where I am in the workflow.

    (2) pictures will not be Shut Down Every Time, even after several days of waiting.

    (3) aPhoto frequently badly chooses picture in the EDIT picture option, I get a picture different than the one I clicked on which is on a 100 pictures in a row.

    (4) picture constantly order of photos in a slideshow changes no matter how many times the movements of the end user the photo back to the good look at an order. Example: Bathroom Plans eventually grouped with pictures of kitchen! I have found no way to stop this weird behavior! Is there a way to stop this? If I drag the photo again some 7 additional photos in the slide show, after a minute or less, he appears again to where it was it not. !@#$%$#

    (5) If you make any CHANGES to a photo, it often changes the appearance of your complete slideshow of this picture with impatience. So you lose all this not work fix your configuration of the slide show. Even changing the order of photos once more that I had put back where they should be. !@#$$#@

    (6) photo identifies often shades of lamps and long door handles as the faces of the people.

    (7) photo made bad decisions when it comes to brightness, contrast and colors effortlessly around other than to use other software, where as with iPhoto there was a lot of workarounds. I could continue, but will save one who might be reading of this.

    I am up to date on all updates for my Mac. If anyone have REAL answers so please spilling the beans, but according to me, it's the only truth is that Apple has rolled out a product inferrer to replace an exceptional product, called iPhoto, which does not work on my new iMac computer 5K of 27 ".   If I knew what I would have chosen another computer that I use iPhoto to prepare more of fifty to sixty thousand photos in a given year and I use iPhoto to make hundreds of slideshows from it.  Are there plugins for Photo 1.3? I ask because I see where there could be Add-ons, but I can't find.

    Apple has taken a serious decision by turning his back to iPhoto and tens of millions of loyal users.

    Thanks in advance to anyone brave enough to tackle this job.

    James

    First, back up your library of Photos and hold down the command and option keys while launching Photos - repair your database - you have a corrupted database

    LN

  • Cannot create a smart group with three conditions

    When I create or edit a smart group, I can specify one or two conditions. But if I try to add a third condition, no third line is displayed, even if the OK button goes grey as if a third line were appeared containing a partially specified condition.

    Does anyone of you can create a smart group with three or more diseases? I can't.

    You need to scroll to the bottom of the list of criteria to see one after another. The window is not resized.

  • Creating security group with grants decided in active directory - Server 2003

    Hello

    I need to create several different security groups for about 7 users with grant different access rights, but all users will access the same folder main and some of the same void records. I created a group with some of the users but appear to have access to all the folders there particular subfolder but I only want to have access to some of the folders in the selected subfolder.

    I guess what I'm asking is how do I create groups of different security with grants decided for each groups and ensuring that users in these groups only have access and subsidies to certain folders.

    I don't know if I explained myself properly but I certainly confused myself, I hope someone can point me in the right direction to solve this problem.

    Thanks in advance

    Jah

    Jah,

    For assistance, please ask for help in the appropriate Microsoft TechNet Windows Server Forum.

    Thank you.

  • I can't send an e-mail as a group, with or without an attachment, I always get error 0x800CCC0B the message, I have outlook express.

    cannot send error 0x800CCC0B group

    I can't send an e-mail as a group, with or without an attachment, I always get error 0x800CCC0B the message, I have outlook express (not sure which version) under XP, I used to be able to send a group with 500 more emails in it, I tried to narrow the group to 200, but it makes no difference can anyone help?
    Check out this link. Apparently there is a max of 100 recipients simultaneously and they also will disable your account temporarily if you try many times.
     
     
  • VPN router to router with overlapping of internal networks

    Hello Experts,

    A small question. How to configure a VPN router to router with overlap in internal networks?

    Two of my internal networks have ip address 192.168.10.0 and 192.168.10.0

    No link or config will be appreciated. I searched but no luck.

    Thank you

    Randall

    Randall,

    Please see the below URL for the configuration details:

    Configure an IPSec Tunnel between routers with duplicate LAN subnets

    http://www.Cisco.com/en/us/Tech/tk583/TK372/technologies_configuration_example09186a00800b07ed.shtml

    Let me know if it helps.

    Kind regards

    Arul

    * Please note all useful messages *.

  • ERROR - 1051414 - cannot set the role of group with shared services [30:1101:JNDI error] error.

    Hi all

    I tried provide access to filter the group in both SSP and thru Maxl command but still get the error below. Any experience of this problem? If Yes, please let me know how you solved this problem.


    ERROR - 1051414 - cannot set the role of group with shared services [30:1101:JNDI error] error.


    Thanks in advance!

    Krishna

    Read the support document that I posted the link, prior to changes for openldap ensure you that it is saved.

  • Model with overlapping of images to print custom

    I am trying to create a model of impression for (2) 5 x 7 postcards (with logo/contact info at the bottom) a 8.5 x 11 pages. I imported a white background Photoshop image of 5 x 7 with the contact information on the bottom. Now, I want to add 2 boxes of image on top of the work of 5 x 7. The areas of the image must be modifiable so that different images can be presented for different shipments. I would also like to be able to do all this in Lightroom. Can anyone offer advice on whether this is possible and if so, how?

    Everything in the Lightroom print module-

    Try starting with a model of Lightroom [Custom square + 2] or design your own in the Panel layout Style [Custom Package].

    Cells can be resized, repositioned, with overlap, moved behind / in front, striped and with an identity edited graphic plate border.

    Once you have your design as you want TI - save it as a print template, then you can drag and drop images in the cells at any time in the future - just select your images on the film, select your registered design and images in the cells, print (or save it as jpg for printing outside!)

    My impression model with 3 images & identity plate

  • Scrolling group problem: not all the group with scrolling content?

    Helloooow peoplez script wise.

    I was biting my nails on this problem, the last two days and still have not found a solution. Go here:

    I tried to make a window (or Panel actually, because ultimately it must be run from the EI > window > scriptname.jsx), with a scroll bar, which can scroll content in a group beside him. I can get the scroll and all group, but is the problem, just now, that the elements of x in the group, the last get cut. Like this (it is supposed to be 500 buttons):

    Screen Shot 2015-10-13 at 21.40.05.png

    The only way that I was able to get the 'internal' group grow is by not using do not align properties and manually set the .size. I know that the content is here because the last element arises, when I move the last location of points [1] upwards until he reached the top of the group. I tried to refresh the page layout (layout.layout (true); layout.resize (()) to each call of the function onChanging() of the cursor, but without success. Read a lot of forum posts beautiful and discussion by @Marc Autret and other users of scriptUI/extendscript long has this far been without success.

    TL; DR: I'm doing a group with a lot of content that I can scroll with a scroll bar.

    Here is the code snippet, I hope fairly well commented:

    {
    //scroller test
    // uncomment the temp path (replace with some image file path) and the lines inside the populateGrid() function to reproduce my problem better
    // I'm ussing an image 512x288 pixels
    
    
    //var tempPath = "/Volumes/Verbinski/02_SCRIPTING/After_Effects/stockholm/ROOT/EXPLOSIONS/Fireball_side_01/Thumbs/Fireball_Side_01_024.jpg";
    
    
    // create window
    var mWin = new Window('palette');
      mWin.size = [500,500];
      mWin.orientation = 'row';
    
    
    // If you like it, then you better put a scroller on it.
    var scroller = mWin.add('ScrollBar');
      scroller.size = [20,mWin.size[1]-40]
      scroller.minvalue = -5;
      scroller.value = scroller.minvalue;
      scroller.maxvalue = 10000; // tried changing this to all sorts of interesting numbers.
    
    
    //This should move the group, created further down.
    scroller.onChanging = function(){
      grid.location = [grid.location[0],-scroller.value];
    }
    
    
    // "Boundary" for grid (see below)
    var gridArea = mWin.add('panel',undefined,'gridArea');
      gridArea.size = [mWin.size[0]-40,mWin.size[1]-40];
    
    
    // The grid... a digital fronteer... and also container of stuff
    var grid = gridArea.add('panel',undefined,'grid');
      grid.size = [gridArea.size[0]-20,9000000000] // no matter how high I put this, it doesn't change a thing
    
    
    // Just an array for all the images to go
    var clips = [];
    // Total height gets calculated in the populateGrid function.
    var totalHeight = 0;
    
    
    function populateGrid(rows){
      var img;
      for(i=0;i<rows;i++){
      // img = grid.add('image',undefined,tempPath);
      // clips.push(img);
      grid.add('button',undefined,i);
      }
      for(i in clips){
      clips[i].location = [0,(clips[i].image.size[1]*i)]
      }
      // totalHeight = (img.image.size[1]+grid.spacing)*rows;
      // grid.size = [grid.size[0],totalHeight]
      // scroller.maxvalue = totalHeight/2;
    
    
    }
    
    
    // put x number of buttons/images into the grid
    populateGrid(500);
    
    
    // shwo to window
    mWin.show();
    mWin.center();
    }
    

    Reaally hope someone here sees this and can help out me.

    Cheers, Fynn.

    My Control Panel:

    retina 5K, 4 GHz Intel Core i7 iMac

    32 GB of RAM, 512 GB SSD HARD drive

    OSX Yosemite: 10.10.4

    AE: CS6 |  CC 2014: 13.1.1.3

    Aaalrighty, guys. It seems to me have cracked... Sort of...

    David, your version worked quite well, I just modified a bit to get the right calculation.

    The wheel now works as expected and the scroller.maxvalue is calculated as ((number of items) * height of the first item).

    Everything works fine until I have started using the automatic layout manager. The option 'fill' at least makes it really hard to understand the final height of the internal objects. So they must be defined accordingly.

    Indeed, here is my modified code (sorry, @David for resources according to the version string, you may simply copy the scroller.onChanging () and populateGrid() x parts))

    {
    //scroller test
    // I'm using an image of around 512x288 pixels
    
    var tempPath = "YOUR IMAGE HERE";
    
    // create window
    var mWin = new Window('palette');
      mWin.size = [500,500];
      mWin.orientation = 'row';
    
    // If you like it, then you better put a scroller on it.
    var scroller = mWin.add('ScrollBar');
      scroller.size = [20,mWin.size[1]-40]
      scroller.minvalue = 0;
      scroller.value = scroller.minvalue;
      scroller.maxvalue = 3000; // tried changing this to all sorts of interesting numbers.
    
    //This should move the group, created further down.
    var scrollDiary = 0;
    scroller.onChanging = function(){
      var scrollVal = Math.abs(scroller.value)-scrollDiary;
      for(i=0;i		   
  • replace groups with symbols

    I have a customer file used groups duplicated instead of symbols. Is there a script that will replace all the "groups" with a symbol given? I'm sure this has been asked before, but can't seem to find the thread.

    Thank you.

    IIRC, one of the scripts on kelsocartography.com should do exactly that.

    But you would need to place a symbol instance and run the script.

  • Some build-in panels are grouped with my plugin Panel in InDesign CC

    My settings for panelist look like this:

    resources LocaleIndex (kSDKDefPanelResourceID)

    {kViewRsrcType,

    {kWildFS, k_Wild, kSDKDefPanelResourceID + index_enUS}

    };

    / * Definition of panelist.

    */

    resources involved (kSDKDefPanelResourceID)

    {

    {

    1 group in the list

    kSDKDefPanelResourceID, / / resource ID for this Panel (use SDK by default ID rsrc)

    kMyPluginID, / / ID of the plugin which holds this Panel

    kIsResizable,

    kMTPanelWidgetActionID, / / Action ID to show/hide Panel

    "MyPlugin:Test", / / appears in the list window.

    "", / / Substitute the form menu path ' hand: Foo "If you want your palette in the second menu item to place

    0.0, / / menu replacing the position of the alternative Menu to determine the order of the menu

    kMyImageRsrcID, kMyPluginID, / / Rsrc ID, ID Plugin for a PNG icon resource to use for this palette (when it is not active)

    c_Panel

    }

    };

    resources MTPanelWidget (kSDKDefPanelResourceID + index_enUS)

    {

    __FILE__, __LINE__, / / macro location

    kMTPanelWidgetID, / / WidgetID

    kPMRsrcID_None, / / RsrcID

    kBindAll, / / Binding (0 = none)

    0, 0, 320, 386, / / framework: left, top, right, bottom.

    kTrue, kTrue, / / Visible, Enabled

    kTrue, / / clear the background

    kInterfacePaletteFill, / / Color Erase

    kMTPanelTitleKey, / / name of Panel

    {

    }

    "MyPlugin" / / name of contextual menu (internal)

    };

    The problem is that when I click on the window-> MyPlugin-> Test liquid integrated panels layout of the article and references are also open and grouped with my Panel. I don't understand what I'm doing wrong. The situation is the same with all the examples in the sdk that have signs. Help, please. 10 x in advance.

    My previous post was that this panelMgr-> GetPanelFromWidgetID (kMyPanelWidgetID) does not find the Panel when it is called in the initializer.

    I'm now deep - search the trees from the GetRootPaletteNode paletteRef, using PaletteRefUtils methods. For kTabPanelContainerType, I used panelMgr-> GetPanelFromPaletteContainer() to check the ID of widget, fortunately callers already works. For other types, I just go down the children.

    Three steps more to move the paletteRef found in a new floating window:

    columnRef = PaletteRefUtils::NewFloatingTabGroupContainerPalette(); kTabPaneType

    groupRef = PaletteRefUtils::NewTabGroupPalette (column); kTabGroupType

    PaletteRefUtils::ReparentPalette(myPanelRef,groupRef,PaletteRef());

    If you have several panels, Iterate step 2 + 3 to create groups (lines) per Panel, or just step 3 if they all end up stacked.

    Edit: I can find why GetPanelFromWidgetID did not work: apparently initializer priority is considered by plugin, so one of my signs in a plugin different just was not yet registered. Forget all that deep-search tips.

  • Move groups with paddings in gradient along the paths

    Hi guys,.

    I would like to divide the green leaves on the image below on the green on the right object so that the leaves create the shape of the lines. They fill the space of the Green object to the similar form at the moment. Do you understand what I mean?

    Schermafbeelding 2013-12-30 om 15.00.38.png

    I tried to mix but since leaves are objects grouped with gradient fills, but then this is the result:

    Schermafbeelding 2013-12-30 om 15.00.32.png

    So my question: I need to divide the leaves along the Green shape so that they follow the form. How can I get this done?

    Best regards

    Bob

    You have 4 gradients (extended to mixtures of clipping masks) that you have to cut. After I found 3 of them, there was one more in the stem.

    You also need to repapply your mix modes after cutting, so take your selection ntoe.

  • [8i] grouping with delicate conditions (follow-up)

    I am posting this as a follow-up question to:
    [8i] grouping with tricky conditions

    This is a repeat of my version information:
    Still stuck on an old database a little longer, and I'm trying out some information...

    BANNER

    --------------------------------------------------------------------------------
    Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
    PL/SQL Release 8.1.7.2.0 - Production
    CORE 8.1.7.0.0-Production
    AMT for HP - UX: 8.1.7.2.0 - Production Version
    NLSRTL Version 3.4.1.0.0 - Production

    Now for the sample data. I took an order of my real data set and cut a few columns to illustrate how the previous solution didn't find work. My real DataSet still has thousands of orders, similar to this one.
    CREATE TABLE     test_data
    (     item_id     CHAR(25)
    ,     ord_id     CHAR(10)
    ,     step_id     CHAR(4)
    ,     station     CHAR(5)
    ,     act_hrs     NUMBER(11,8)
    ,     q_comp     NUMBER(13,4)
    ,     q_scrap     NUMBER(13,4)
    );
    
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0005','S509',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0010','S006',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0020','A501',0.85,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0026','S011',0.58,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0030','S970',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0040','S970',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0050','S003',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0055','S600',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0060','Z108',6.94,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0070','Z108',7,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0080','Z310',4.02,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0085','Z409',2.17,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0090','S500',0.85,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0095','S502',1.63,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0110','S006',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0112','S011',0.15,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0117','S903',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0118','S900',0,9,1);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0119','S950',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0120','S906',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0140','S903',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0145','S950',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0150','S906',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0160','S903',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0170','S900',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0220','S902',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0230','S906',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0240','S903',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0250','S003',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0260','S006',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0270','S012',0.95,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0280','Z417',0.68,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0285','Z417',0.68,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0290','Z426',1.78,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0300','Z426',2.07,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0305','Z426',1.23,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0310','Z402',3.97,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0315','Z308',8.09,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0410','Z409',4.83,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0430','S500',3.6,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0435','S502',0.43,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0450','S002',0.35,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0460','S001',1,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0470','Z000',2.6,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0476','S011',1,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0478','S510',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0480','S903',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0490','S003',1.2,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0500','S500',1.37,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0530','B000',0.28,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0536','S011',0.65,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0538','S510',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0540','S923',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0560','S003',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0565','S001',0.85,0,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0570','S012',2.15,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0575','S509',0,0,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0580','B000',3.78,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0590','S011',0.27,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0001715683','0600','S510',0,9,0);
    Instead of grouping all sequential steps with 'OUTPR' station, I am gathering all the sequential steps with "S9%" station, then here is the solution changed to this:
    SELECT       item_id
    ,        ord_id
    ,       MIN (step_id)          AS step_id
    ,       station
    ,       SUM (act_hrs)          AS act_hrs
    ,       MIN (q_comp)          AS q_comp
    ,       SUM (q_scrap)          AS q_scrap
    FROM       (          -- Begin in-line view to compute grp_id
               SELECT  test_data.*
               ,           ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id
                                                ORDER BY        step_id
                              )
                  - ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id
                                          ,                CASE
                                            WHEN  station LIKE 'S9%'
                                            THEN  NULL
                                            ELSE  step_id
                                           END
                                ORDER BY      step_id
                              )     AS grp_id
               ,           ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id
                                                ORDER BY        step_id
                              )                    AS r_num1
               ,       ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id
                                          ,                CASE
                                            WHEN  station LIKE 'S9%'
                                            THEN  NULL
                                            ELSE  step_id
                                           END
                                ORDER BY      step_id
                              )                    AS r_num2
               FROM    test_data
           )          -- End in-line view to compute grp_id
    GROUP BY  item_id
    ,            ord_id
    ,       station
    ,       grp_id
    ORDER BY  item_id
    ,            step_id
    ;
    If just run the subquery to calculate grp_id, you can see that it sometimes affects the same number of group in two stages that are not side by side. For example, the two step 285 and 480 are they assigned group 32...

    I don't know if it's because my orders have many more steps that the orders of the sample I provided, or what...

    I tried this version too (by replacing all the names of the stations "S9%" by "OUTPR"):
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0005','S509',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0010','S006',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0020','A501',0.85,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0026','S011',0.58,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0030','OUTPR',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0040','OUTPR',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0050','S003',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0055','S600',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0060','Z108',6.94,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0070','Z108',7,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0080','Z310',4.02,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0085','Z409',2.17,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0090','S500',0.85,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0095','S502',1.63,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0110','S006',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0112','S011',0.15,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0117','OUTPR',0,10,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0118','OUTPR',0,9,1);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0119','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0120','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0140','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0145','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0150','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0160','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0170','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0220','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0230','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0240','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0250','S003',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0260','S006',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0270','S012',0.95,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0280','Z417',0.68,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0285','Z417',0.68,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0290','Z426',1.78,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0300','Z426',2.07,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0305','Z426',1.23,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0310','Z402',3.97,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0315','Z308',8.09,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0410','Z409',4.83,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0430','S500',3.6,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0435','S502',0.43,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0450','S002',0.35,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0460','S001',1,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0470','Z000',2.6,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0476','S011',1,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0478','S510',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0480','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0490','S003',1.2,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0500','S500',1.37,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0530','B000',0.28,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0536','S011',0.65,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0538','S510',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0540','OUTPR',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0560','S003',0,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0565','S001',0.85,0,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0570','S012',2.15,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0575','S509',0,0,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0580','B000',3.78,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0590','S011',0.27,9,0);
    INSERT INTO test_data
    VALUES ('abc-123','0009999999','0600','S510',0,9,0);
    
    
    SELECT       item_id
    ,        ord_id
    ,       MIN (step_id)          AS step_id
    ,       station
    ,       SUM (act_hrs)          AS act_hrs
    ,       MIN (q_comp)          AS q_comp
    ,       SUM (q_scrap)          AS q_scrap
    FROM       (          -- Begin in-line view to compute grp_id
               SELECT  test_data.*
               ,           ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id
                                                ORDER BY        step_id
                              )
                  - ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id
                                          ,                CASE
                                            WHEN  station = 'OUTPR'
                                            THEN  NULL
                                            ELSE  step_id
                                           END
                                ORDER BY      step_id
                              )     AS grp_id
               ,           ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id
                                                ORDER BY        step_id
                              )                    AS r_num1
               ,       ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id
                                          ,                CASE
                                            WHEN  station = 'OUTPR'
                                            THEN  NULL
                                            ELSE  step_id
                                           END
                                ORDER BY      step_id
                              )                    AS r_num2
               FROM    test_data
           )          -- End in-line view to compute grp_id
    GROUP BY  item_id
    ,            ord_id
    ,       station
    ,       grp_id
    ORDER BY  item_id
    ,            step_id
    ;
    and it shows the same problem.

    Help?

    Hello

    I'm glad that you understood the problem.

    Here's a little explanation of the approach of the fixed difference. I can refer to this page later, so I will explain some things you obviously already understand, but I jump you will find helpful.
    Your problem has additional feature that, according to the station, some lines can never combine in large groups. For now, we will greatly simplify the problem. In view of the CREATE TABLE statement, you have posted and these data:

    INSERT INTO test_data (item_id, ord_id, step_id, station)  VALUES ('abc-123', '0001715683', '0010', 'Z417');
    INSERT INTO test_data (item_id, ord_id, step_id, station)  VALUES ('abc-123', '0001715683', '0011', 'S906');
    INSERT INTO test_data (item_id, ord_id, step_id, station)  VALUES ('abc-123', '0001715683', '0012', 'S906');
    INSERT INTO test_data (item_id, ord_id, step_id, station)  VALUES ('abc-123', '0001715683', '0140', 'S906');
    INSERT INTO test_data (item_id, ord_id, step_id, station)  VALUES ('abc-123', '0001715683', '0170', 'Z417');
    INSERT INTO test_data (item_id, ord_id, step_id, station)  VALUES ('abc-123', '0001715683', '0175', 'Z417');
    INSERT INTO test_data (item_id, ord_id, step_id, station)  VALUES ('abc-123', '0001715683', '0200', 'S906');
    INSERT INTO test_data (item_id, ord_id, step_id, station)  VALUES ('abc-123', '0001715683', '0205', 'S906');
    

    Let's say that we want this output:

    `                  FIRST LAST
                       _STEP _STEP
    ITEM_ID ORD_ID     _ID   _ID   STATION  CNT
    ------- ---------- ----- ----- ------- ----
    abc-123 0001715683 0010  0010  Z417       1
    abc-123 0001715683 0011  0140  S906       3
    abc-123 0001715683 0170  0175  Z417       2
    abc-123 0001715683 0200  0205  S906       2
    

    Where each line of output represents a contiguous set of rows with the same item_id, ord_id and station. "Contguous" is determined by step_id: lines with "0200" = step_id = step_id "0205' are contiguous in this example of data because there is no step_ids between '0200' and '0205". "
    The expected results include the step_id highest and lowest in the group, and the total number of original lines of the group.

    GROUP BY (usually) collapses the results of a query within lines. A production line can be 1, 2, 3, or any number of lines in the original. This is obviously a problem of GROUP BY: we sometimes want several lines in the original can be combined in a line of output.

    GROUP BY guess, just by looking at a row, you can tell which group it belongs. Looking at all the 2 lines, you can always know whether or not they belong to the same group. This isn't quite the case in this issue. For example, these lines

    INSERT INTO test_data (item_id, ord_id, step_id, station)  VALUES ('abc-123', '0001715683', '0140', 'S906');
    INSERT INTO test_data (item_id, ord_id, step_id, station)  VALUES ('abc-123', '0001715683', '0200', 'S906');
    

    These 2 rows belong to the same group or not? We cannot tell. Looking at just 2 lines, what we can say is that they pourraient belonging to the same group, since they have the same item_id, ord_id and station. It is true that members of same groups will always be the same item_id, the ord_id and train station; If one of these columns differ from one line to the other, we can be sure that they belong to different groups, but if they are identical, we cannot be certain that they are in the same group, because item_id, ord_id and station only tell part of the story. A group is not just a bunch or rows that have the same item_id, ord_id and station: a group is defined as a sequence of adjacent to lines that have these columns in common. Before we can make the GROUP BY, we need to use the analytical functions to see two lines are in the same contiguous streak. Once we know that, we can store this data in a new column (which I called grp_id), and then GROUP BY all 4 columns: item_id, ord_id, station and grp_id.

    First of all, let's recognize a basic difference in 3 columns in the table that will be included in the GROUP BY clause: item_id, ord_id and station.
    Item_id and ord_id always identify separate worlds. There is never any point comparing lines with separate item_ids or ord_ids to the other. Different item_ids never interact; different ord_ids have nothing to do with each other. We'll call item_id and ord_id column 'separate world '. Separate planet do not touch each other.
    The station is different. Sometimes, it makes sense to compare lines with different stations. For example, this problem is based on questions such as "these adjacent lines have the same station or not? We will call a "separate country" column of the station. There is certainly a difference between separate countries, but countries affect each other.

    The most intuitive way to identify groups of contiguous lines with the same station is to use a LAG or LEAD to look at adjacent lines. You can certainly do the job, but it happens to be a better way, using ROW_NUMBER.
    Help the ROW_NUMBER, we can take the irregular you are ordering step_id and turn it into a dial of nice, regular, as shown in the column of r_num1 below:

    `                                 R_             R_ GRP
    ITEM_ID ORD_ID     STEP STATION NUM1 S906 Z417 NUM2 _ID
    ------- ---------- ---- ------- ---- ---- ---- ---- ---
    abc-123 0001715683 0010 Z417       1         1    1   0
    abc-123 0001715683 0011 S906       2    1         1   1
    abc-123 0001715683 0012 S906       3    2         2   1
    abc-123 0001715683 0140 S906       4    3         3   1
    abc-123 0001715683 0170 Z417       5         2    2   3
    abc-123 0001715683 0175 Z417       6         3    3   3
    abc-123 0001715683 0200 S906       7    4         4   3
    abc-123 0001715683 0205 S906       8    5         5   3
    

    We could also assign consecutive integers to the lines in each station, as shown in the two columns, I called S906 and Z417.
    Notice how the r_num1 increases by 1 for each line to another.
    When there is a trail of several rows of S906 consectuive (for example, step_ids ' 0011 'by '0140'), the number of s906 increases by 1 each line to another. Therefore, during the duration of a streak, the difference between r_num1 and s906 will be constant. For 3 lines of the first series, this difference is being 1. Another series of S906s contiguous started step_id = '0200 '. the difference between r_num1 and s906 for this whole series is set to 3. This difference is what I called grp_id.
    There is little meaning for real numbers, and, as you have noticed, streaks for different stations can have as by chance the same grp_id. (it does not happen to be examples of that in this game of small sample data.) However, two rows have the same grp_id and station if and only if they belong to the same streak.

    Here is the query that produced the result immediately before:

    SELECT    item_id
    ,        ord_id
    ,        step_id
    ,       station
    ,       r_num1
    ,       CASE WHEN station = 'S906' THEN r_num2 END     AS s906
    ,       CASE WHEN station = 'Z417' THEN r_num2 END     AS Z417
    ,       r_num2
    ,       grp_id
    FROM       (          -- Begin in-line view to compute grp_id
               SELECT  test_data.*
               ,           ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id
                                                ORDER BY        step_id
                              )
                  - ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id, station
                                ORDER BY      step_id
                              )     AS grp_id
               ,           ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id
                                                ORDER BY        step_id
                              )                    AS r_num1
               ,       ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id, station
                                ORDER BY      step_id
                              )                    AS r_num2
               FROM    test_data
           )          -- End in-line view to compute grp_id
    ORDER BY  item_id
    ,            ord_id
    ,       step_id
    ;
    

    Here are a few things to note:
    All analytical ORDER BY clauses are the same. In most of the problems, there will be only an ording regime that matters.
    Analytical PARTITION BY clauses include the columns of 'distinct from the planet', item_id and ord_id.
    The analytical PARTITION BY clauses also among the column 'split the country', station.

    To get the results we want in the end, we add a GROUP BY clause from the main query. Yet once, this includes the columns of the 'separate world', column 'split the country', and the column 'fixed the difference', grp_id.
    Eliminating columns that have been includied just to make the output easier to understand, we get:

    SELECT    item_id
    ,        ord_id
    ,        MIN (step_id)          AS first_step_id
    ,       MAX (step_id)          AS last_step_id
    ,       station
    ,       COUNT (*)          AS cnt
    FROM       (          -- Begin in-line view to compute grp_id
               SELECT  test_data.*
               ,           ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id
                                                ORDER BY        step_id
                              )
                  - ROW_NUMBER () OVER ( PARTITION BY  item_id, ord_id, station
                                ORDER BY      step_id
                              )     AS grp_id
               FROM    test_data
           )          -- End in-line view to compute grp_id
    GROUP BY  item_id
    ,            ord_id
    ,       station
    ,       grp_id
    ORDER BY  item_id
    ,            ord_id
    ,       first_step_id
    ;
    

    This prioduces the output displayed much earlier in this message.

    This example shows the fixed difference indicated. Specific problem you is complicated a little what you should use an expression BOX based on station rather than the station iteself.

  • Selection of layers in a group with Ctril + click

    Hi all

    I can't just do this thing works, or even know if this feature works in CS5.

    I know for a fact that I'm not the only one in the world that creates groups with layers in them,

    So here's my question.

    Q: when a group has been created that contains layers. How do you choose the layers inside with the Ctrl + click on the layer or a function object.

    It drives me crazy that I have to open the Group and manually pick the layer where the Ctrl + Click works perfectly well when the layers are not grouped.

    So, I know I can't be the only one doing this.

    Thank you.

    You could try to uncheck self-select and the value layer instead of group.

    MTSTUNER

  • Add the group with the ES2 Java API

    Hi all

    There is an example that shows how to create a new group using the ES2 API here:

    http://help.Adobe.com/en_US/LiveCycle/9.0/programLC/help/index.htm

    However, if you run the code to create a group, the code works fine and a new OID is returned. But if you go in the /AdminUI ES2 and the list of all groups, you don't see the 'AdobeGroup' group here! Also if you are looking to the /AdminUI for the group 'AdobeGroup' it is not found.

    If the code does not work or the Admin UI does not show the newly created group.

    What's not here?

    Thank you.
    Paul.

    After the code snippet should work for you

    public String createSampleGroup() throws UMException{        String groupOid = checkGroupExist(groupName);
    
            if(groupOid != null){            return groupOid;        }        String groupCanonicalName = groupName;
    
            GroupImpl group = new GroupImpl();        group.setCanonicalName(groupCanonicalName);        group.setDomainName(domainName);        group.setGroupType(Group.GROUPTYPE_PRINCIPALS);        group.setLocal(true);        group.setPrincipalType(Principal.PRINCIPALTYPE_GROUP);
    
            groupOid = directoryManager.createLocalGroup(group);        log("Sample group created with name %s",groupName);
    
            return groupOid;    }
    
        /**     * Search the groupwith the given name in the sample domain      */    private String checkGroupExist(String groupName) throws UMException{        PrincipalSearchFilter psf = new PrincipalSearchFilter();        psf.setCommonName(groupName);        psf.setSpecificDomainName(domainName);
    
            //By default the filter causes like search unless you are using the absolute version        //Setting this ensures that search is exact        psf.setMatchExactCriteria(true);
    
            //By default search returns obsolete users also. Set this to ensure that        //only active users are returned        psf.setRetrieveOnlyActive(); 
    
            //PrincipalReference are lightweight user objects and searching for them would be more performant        //compared to the User search. If you do not require any other user attribute then prefer this        //mode of search        List result = directoryManager.findPrincipalReferences(psf);        if(result.isEmpty()){            log("Sample group with name [%s] does not exist",groupName);            return null;        }else{            String oid = result.get(0).getOid();             log("Sample group with name [%s] already exist",groupName);            return oid;        }    }
    

Maybe you are looking for