Select Group with label

Hi, I try to choose the Group on the page

var doc = app.activeDocument;

var myModul = doc.groups.item ("media");

var myModul = doc.groups [0];

$.writeln ("ID:" + myModul.id);

$.writeln ("manufacturer:" + myModul.constructor.name);

$.writeln ("type:" + typeof (myModul));

App.Select (myModul);

Why it does not work ?

Try the code below

var doc = app.activeDocument;

var doc.pages = myPage

var myModul = doc.groups.item ("media");

for (var i = 0;  myPage.length > i; i ++) {}

var allItems = myPage [i] .allPageItems

for (var j = 0; j)<>

{

var myGroup = allItems [j];

If (myGroup.label == "modul") {}

$.writeln ("manufacturer:" + myGroup.constructor.name);

App.Select (myGroup);

}

}

}

Tags: InDesign

Similar Questions

  • I want to move a large number of photos but don't want to unique, click each photo. I know there is a simple control function that allows to select groups of files with ' two'clicks ', as opposed to the selection of each file. Suggestions?

    I want to spend a lot of photos (they are in order) but and do not want to have to click to move each photo. I know there is a simple control function that allows to select groups of files with ' two'clicks ', as opposed to the selection of each file. Suggestions? I know it's apple 101, but I don't remember what order to press the button command, or shift, or other. Thank you

    Select the first file, then hold down the SHIFT key, and then click the last file. Or, select any file in the folder and then press command + A

  • Hi, my photoshop won't allow me to select layers with my mouse, I have to go to each individual layer on the side to select. On the computers at my school, I was always able to select a layer group to the right of the file I'm working on that. Having

    Hi, my photoshop won't allow me to select layers with my mouse, I have to go to each individual layer on the side to select. On the computers at my school, I was always able to select a layer group to the right of the file I'm working on that. Have to go to the layers panel and select each layer one is really long time and not effective - what do I do to fix this?

    Hi Cartere49372123,

    I hope you do well.

    Please check this link below and see if it helps

    http://www.photoshopessentials.com/basics/layer-shortcuts/

    Concerning

    Rohit

  • 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

  • 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.

  • Choose a group with the special value

    I have table below. Each client has a few accounts with different interest rates.

    customer

    account

    interestRate

    Balance

    one

    1

    28

    100

    one

    2

    24

    200

    one

    3

    20

    50

    b

    4

    19

    60

    b

    5

    20

    90

    c

    6

    24

    150

    d

    7

    19

    20

    d

    8

    24

    70

    d

    9

    24

    10

    d

    10

    15

    30

    I want to select customers with interestRate = 24 and the balance of their accounts, as it the sum

    one

    100 + 200 + 50

    c

    150

    d

    20 + 70 + 10 + 30

    I can do this with nested query, but I'm looking to recover these data with a query with minimum cost

    The global version

    Thanks for the borrowed data

    with cust as

    (

    Select 'a' customer, '1' account, '28' rate, 100' ball of all the double union

    Select 'a' customer, '2' account, '24' rate, 200' dance of all the double union

    Select 'a' customer, '3' account, '20' rate, 50' dance of all the double union

    customer select 'b', '4' account '19', 60' dance of all the double union

    customer select 'b', '5' account '20', 90' dance of all the double union

    Select customer 'c', "6", rate '24', '150' ball of all the double union

    Select ' client '7' account, rate ' 19', 20' dance of all the double union

    Select ' client '8' account, rate ' 24', 70' dance of all the double union

    Select ' client '9' account, rate ' 24', 10' ball of all the double union

    Select ' client '10' account, rate ' 15', 30' double ball

    )

    Select customer, sum (bal) sum_bal

    the cust

    Customer group

    having count (case rates when '24' then 1 end) > 0

    order by customer

    CUSTOMER SUM_BAL
    one 350
    c 150
    d 130

    Concerning

    Etbin

  • 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.

  • 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

  • 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.

  • 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.
     
     
  • Adobe *.pdf files can be opened in Internet Explorer, the default program can not be changed to acrobat reader in the properties or select 'Open with'

    Adobe *.pdf files can be opened in Internet Explorer, the default program can not be changed to acrobat reader in the properties or select 'Open with'. Cannot change the default program of Adobe in the file association list.

    I have the latest version of Adobe (9.3.3).

    Hello

    Don't forget to log on as an ADMINISTRATOR

    Use this utility to unassociate the. PDF and then re - associate with Adobe Acrobat Reader.

    How Unassociate a Type of Extension file in Vista and a utility to help
    http://www.Vistax64.com/tutorials/91920-unassociate-file-extention-type.html

    How to set default Associations for a program under Vista
    http://www.Vistax64.com/tutorials/83196-default-programs-program-default-associations.html

    How to associate a file Extension with a program Type in Vistahttp://www.vistax64.com/tutorials/69758-default-programs.html

    How to view and change an Extension of filename on Vista
    http://www.Vistax64.com/tutorials/103171-file-name-extension.html

    Restore the Type Associations by default Vista file extensions
    http://www.Vistax64.com/tutorials/233243-default-file-type-associations-restore.html
    I hope this helps.

    Rob Brown - MS MVP - Windows Desktop Experience: Bike - Mark Twain said it right.

  • 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.

  • Replace the selected text with other content TextFrame

    Hello

    I am changing a text selected in something new, involving the movement of text and the paragraph style using a jsx script. At the present time, everything works beautifully:

    • I entered the select text
    • I have create a new temporary TextFrame
    • I build my new paragraphs and apply styles to them in the new TextFrame

    What I was not able to reach still is to replace the original selected text by temporary TextFrame content.

    Any help would be more than welcome

    A part of my script:

    myText = app.selection[0].contents;

     

    ... do some stuff


    var myDocument = app.documents.item(0);

    var myPage = myDocument.pages.item(0);

    var myTextFrame = myPage.textFrames.add();


    myTextFrame.geometricBounds = [0, -70, 150, 70];

    myTextFrame.contents = "Paragraph1\rParagraph2...";


    myTextFrame.paragraphs[0].appliedParagraphStyle = pStyleGroup.paragraphStyles.itemByName('Style1');

    myTextFrame.paragraphs[1].appliedParagraphStyle = pStyleGroup.paragraphStyles.itemByName('Style2');

    And now, in myTextFrame, I have my new paragraph formatted, and I would like to replace the original selected text with the contents of my TextFrame (keeping the paragraph styles).

    Hello

    Keep the logic of the code and edit utilities:

    var
        mSourceIdx = app.selection[0].index,
        mStory = app.selection[0].parentStory,
        mReplaceStuff = {
            elements: [
                ["Paragraph_1\r",  "Style_1"],
                ["Paragraph_2\r",  "Style_2"],
                ["Paragraph_X\r",  "Style_X"]
                ]},
        mTarget, cElement, cText, cParaStyle;
    
    while (cElement = mReplaceStuff.elements.pop()) {
        cText = cElement[0];
        cParaStyle = app.activeDocument.paragraphStyles.item(cElement[1]);    // modify if styleGroups present in a structure
      mTarget = mStory.insertionPoints.item(mSourceIdx);
        mTarget.contents = cText;
        mTarget.paragraphs[0].appliedParagraphStyle = cParaStyle;
         }
    
    app.selection[0].contents = "";
    

    MReplaceStuff allows to prepare stuff to replace

    Jarek

Maybe you are looking for