Need help with a self-join select the parent and child

Hi all

I have an OFFICE table that will hold the Oncology, district and division of the hierarchic is Oncology-district-> division >

I want to list Oncology, district and division with its parent of the value of the following
provinc     district      division

A            NULL       NULL
A            A.A         NULL
A            A.A         A.A.A 
-- Create table
CREATE TABLE OFFICE
(
  SLNO         VARCHAR2(20 BYTE),
  OFFICE_NAME  VARCHAR2(20 BYTE),
  PARENT_SLNO  VARCHAR2(20 BYTE),
  TYPE         VARCHAR2(2 BYTE)
);

ALTER TABLE OFFICE ADD (
  CONSTRAINT OFFICE_PK
  PRIMARY KEY
  (SLNO)
 );

ALTER TABLE OFFICE ADD (
  CONSTRAINT P_C_FK 
  FOREIGN KEY (PARENT_SLNO) 
  REFERENCES OFFICE (SLNO));


INSERT INTO OFFICE
  (SLNO, OFFICE_NAME, PARENT_SLNO, TYPE)
VALUES
  ('1', 'A', NULL, 'PR');
INSERT INTO OFFICE
  (SLNO, OFFICE_NAME, PARENT_SLNO, TYPE)
VALUES
  ('2', 'A.A','1', 'DT');  
INSERT INTO OFFICE
  (SLNO, OFFICE_NAME, PARENT_SLNO, TYPE)
VALUES
  ('3', 'A.A.A', '2', 'DV');  
I need your help.
Thank you.

Published by: Dipabkar Banik (DB) on June 13, 2011 12:17 AM

Published by: Dipabkar Banik (DB) on June 13, 2011 12:18 AM

Published by: Dipabkar Banik (DB) on June 13, 2011 06:45

Published by: Dipabkar Banik (DB) on June 13, 2011 06:47

Try this

SELECT   CONNECT_BY_ROOT (office_name) provinc,
             DECODE (LEVEL, 2, office_name, PRIOR office_name) district,
             DECODE (LEVEL, 3, office_name) division
      FROM   office
CONNECT BY   PRIOR slno = parent_slno
START WITH   parent_slno IS NULL

Tags: Database

Similar Questions

  • Need help with a self-join query

    Hello
    I have A table with the following data

    OID parent_oid
    4 of 10
    4 2
    2 2
    12 6
    6 6

    parent_oid is the parent of the oid. I would like a query that displays the final parent of the oid. The result must indicate the following

    Final parent OID
    2 of 10
    4 2
    2 2
    12 6
    6 6

    I use Oracle 10 g. I am familiar with free joins, but that alone will not do the job. Thank you!

    Hello

    arizona9952 wrote:
    ... I am familiar with free joins, but that alone will not do the job.

    You are absolutely right!

    A self-join 2-way would work for lines have no parent, or lines which are directly related to their final ancestor (such as the oid = 4), but not for what anyone further.
    A 3-way self-join would work to a level more away from the last row, but no more. That would be enough with the small set of sample data that you posted, but it won't work if you have added a new rank parent_id = 10.
    An N - way self-join would work for up to N + 1 levels, but no more.

    You need something that can go to any number of levels, such as CONNECT BY:

    SELECT     CONNECT_BY_ROOT oid     AS oid
    ,     parent_oid          AS final_parent
    FROM     a
    WHERE     CONNECT_BY_ISLEAF     = 1
    CONNECT BY     oid     = PRIOR parent_oid
         AND     oid     != parent_oid
    ;
    

    Published by: Frank Kulash, February 22, 2010 19:09

    On sober reflection, I think that a request from top down, as one below, would be more effective than a motion up and down, like the one above:

    SELECT     oid
    ,     CONNECT_BY_ROOT     parent_oid     AS final_parent
    FROM     a
    START WITH     parent_oid     = oid
    CONNECT BY     parent_oid     = PRIOR oid
         AND     oid          != PRIOR oid
    ;
    
  • NEED HELP WITH SERVICE PACK 3. After downloading and the computer goes into rebooting mode I get the screen to restart with three options, network security safe mode and the other thing. ,

    NEED HELP WITH SERVICE PACK 3.  After downloading and the computer goes into rebooting mode I get the screen to restart with three options, network security safe mode and the other thing. , but it of although he gets, he keeps countdown to restart and reboots and restarts, over and over again, never reboots, same screen. my computer won't let me out this screen even after I turned off the computer and turn it back on, I get the same screen. the only way I can get out of this is to erase my computer everything and bring it back to factory, right out of the box, this big headaches. Thanks for anyone who can help me. PS. Keep the answers in simple terms please.

    Hi BSRC$, in stock

    1. You have security software installed on the computer?
    2. You receive an error message when you restart the computer?

    Reinstalling Windows XP to the factory setting would not be the first option.

    It is possible that some third-party programs or the services installed on the computer interfere with the installation of service pack 3.

    I suggest that you try to uninstall service pack 3 from the computer by using the recovery console and subsequently ask the article below for what to do before installing the service pack 3on the computer.

    How to remove Windows XP Service Pack 3 from your computer

    http://support.Microsoft.com/kb/950249

    Steps to take before you install Windows XP Service Pack 3

    http://support.Microsoft.com/kb/950717

  • need help with my screen has been using mouse and the screen is smaller and smaller

    need help with my screen has been using the mouse and the screen is smaller and smaller, so can't see

    Try to hold the 'ctrl' key and turn the wheel of scrolling the mouse forward to zoom, turning the scroll wheel to the rear is to zoom out.

  • Need help with a query complex for the production database

    Hello again,

    I need your help once again, for a query how to show me how long each stage of production is by order.
    See examples of data and what I expect.
    Thank you all for your help.

    We use Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    Here the example data tables:
    CREATE      TABLE      TABLE_2
       
    (     "ORDER_NR"      VARCHAR2 (12)
    ,      "PRIORITY"      VARCHAR2 (2)
    ,      "WO_STEP"      VARCHAR2 (1)
    ,      "STEP_DATE"      DATE
    );
    
    CREATE      TABLE      TABLE_1
    (     "ORDER_NR"           VARCHAR2     (12) PRIMARY KEY
    ,      "PRIORITY"           VARCHAR2      (2)
    ,      "CREATE_DATE"      DATE
    ,     "ACT_STEP"          VARCHAR2     (2)
    ,     "STEP_DATE"          DATE
    ,     "EMPLOYEE"          VARCHAR2     (5)
    ,     "DESCRIPTION"     VARCHAR2     (20)
    );
    
    INSERT      INTO      TABLE_1      (ORDER_NR,               PRIORITY,      CREATE_DATE,                                                        ACT_STEP,     STEP_DATE,                                                            EMPLOYEE,     DESCRIPTION) 
                        VALUES           ('1KKA1T205634',     '12',          TO_DATE('10-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'),     'U',          TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'),     'W0010',     'CLEAN HOUSE');
    INSERT      INTO      TABLE_1      (ORDER_NR,               PRIORITY,     CREATE_DATE,                                                        ACT_STEP,     STEP_DATE,                                                            EMPLOYEE,     DESCRIPTION)
                        VALUES           ('1KKA1Z300612',     '12',          TO_DATE('08-FEB-13 14:00:00','DD-MON-RR HH24:MI:SS'),     'F',          TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'),     'K0052',     'REPAIR CAR');
    
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'A',          TO_DATE('12-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          '5',          TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'K',          TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          '5',          TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'K',          TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          '5',          TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'C',          TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'B',          TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'E',          TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'F',          TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'S',          TO_DATE('21-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'R',          TO_DATE('21-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1T205634',     '12',          'U',          TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'A',          TO_DATE('12-FEB-13 13:52:42','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          '5',          TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'K',          TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          '5',          TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'K',          TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          '5',          TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'C',          TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'B',          TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'E',          TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS'));
    INSERT     INTO      TABLE_2      (ORDER_NR,               PRIORITY,     WO_STEP,     STEP_DATE)
                        VALUES           ('1KKA1Z300612',     '12',          'F',          TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'));
    COMMIT;
    And here's what I expect of my request:
    SYSDATE     28.Feb.13 14:00                                                                                     
                                                                                              
    ORDER_NR     PRIORITYCREATE_DATE     STATUS     STATUS_DATE     DESCRIPTION     AGE_1     AGE_2     WAITNG     STEP_A     STEP_B     STEP_C     STEP_5     STEP_K     STEP_E     STEP_F     STEP_S     STEP_R     
    1KKA1T205634     12     10.Feb.13 10:00     U     28.Feb.13 12:00     CLEAN HOUSE     18,083     8,833     2,125     0,833     4,125     0,083     0,750     0,208     2,125     0,666     0,042     7,125     
    1KKA1Z300612     12     08.Feb.13 14:00     F     20.Feb.13 16:00     REPAIR CAR     20,000     16,042     2,125     0,833     4,125     0,083     0,750     0,208     2,125     0,666          
    And now the explanation for the result of the query:
    The AGE_1 is the difference in days between the "CREATE_DATE" and if EXSIST L'ETAPE 'U' then STEP_DATE or if the STEP 'U' is not found in TABLE_2 then it should show the difference in days between the "CREATE_DATE' and the 'SYSDATE.
    The AGE_2 is the difference in days between the STEP "A" STEP_DATE and IF EXSIST L'ETAPE 'R' then STEP_DATE or if the STEP 'R' is not in TABLE_2 then it should show the difference in days between the "CREATE_DATE' and the 'SYSDATE.
    The EXPECTATION is the difference in days between CREATE_DATE and STEP 'A' STEP_DATE
    The following columns indicate the days, how long the ORDER_NR remains in these TIMES, if an ORDER_NR comes in the same STEP should be calculated together more than once.
    If the ORDER_NR jump a step, it should show a zero in the specific field.

    I hope that my explanation is good enough, my English skills are far from good.

    Thank you for all your help.

    Hosts Reinhard W.

    Solomon Yakobson says:
    Just add the amounts:

    In fact, you could edit all CASES:

    with t2 as (
                select  t.*,
                        lead(step_date) over(partition by order_nr order by step_date) next_step_date
                  from  table_2 t
               )
    select  t1.*,
            nvl(
                max(
                    case t2.wo_step
                      when 'U' then t2.step_date
                    end
                   ),
               sysdate
              ) - t1.create_date age_1,
            nvl(
                max(
                    case t2.wo_step
                      when 'R' then t2.step_date
                    end
                   ),
               sysdate
              ) - t1.create_date age_2,
            sum(
                case
                  when t2.wo_step in ('B','5') then t2.next_step_date - t2.step_date
                end
               ) step_b_5,
            sum(
                case t2.wo_step
                  when 'C' then t2.next_step_date - t2.step_date
                end
               ) step_c,
            sum(
                case t2.wo_step
                  when 'K' then t2.next_step_date - t2.step_date
                end
               ) step_k,
            sum(
                case t2.wo_step
                  when 'E' then t2.next_step_date - t2.step_date
                end
               ) step_e,
            sum(
                case t2.wo_step
                  when 'F' then t2.next_step_date - t2.step_date
                end
               ) step_f,
            sum(
                case t2.wo_step
                  when 'S' then t2.next_step_date - t2.step_date
                end
               ) step_s,
            sum(
                case t2.wo_step
                  when 'R' then t2.next_step_date - t2.step_date
                end
               ) step_r
      from  table_1 t1,
            t2
      where t2.order_nr = t1.order_nr
      group by t1.order_nr,
               t1.priority,
               t1.create_date,
               t1.act_step,
               t1.step_date,
               t1.employee,
               t1.description
    /
    
    ORDER_NR     PR CREATE_DA AC STEP_DATE EMPLO DESCRIPTION      AGE_1      AGE_2   STEP_B_5     STEP_C  STEP_K     STEP_E     STEP_F        STEP_S     STEP_R
    ------------ -- --------- -- --------- ----- ----------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------
    1KKA1T205634 12 10-FEB-13 U  28-FEB-13 W0010 CLEAN HOUSE 18.0833333 10.9583333      4.875 .083333333 .208333333      2.125 .666666667 .041666667      7.125
    1KKA1Z300612 12 08-FEB-13 F  20-FEB-13 K0052 REPAIR CAR   44.252338  44.252338      4.875 .083333333 .208333333      2.125
    
    SQL>
    

    SY.

  • Need help with EEM applet 'info type snmp oid' and 'Add' the syntax of commands

    I am trying sample and adding a number of OIDs in the mib/ISDN on 2431 & 2921 boxes.  The number of T1s on the boxes can vary with the model and configuration of the box. I studied the OID I want to loop through and am sure those to whom I need to try, but I can't build the digital oid using the command 'Add' and get the SNMP get command use the result.  Here is my test cmdlet:

    config t

    No test event manager applet

    applet Test Event manager

    event no

    Info action 200 type snmp oid 1.3.6.1.2.1.10.20.1.3.1.0 get-exact type! isdnSignalingGetIndex

    game action 202 j "$_info_snmp_value".

    game action 203 I '1 '.

    game action 204 k '2 '.

    206 action value calls '0 '.

    action 210 all $i lt $j! Browse the ISDN interfaces

    action 215 all 4 $k! Browse calls in & stats connectes.2 &.4

    game action 220 myoides "1.3.6.1.2.1.10.20.1.3.3.1."

    action 222 Add $myoid ' $k$ I ".

    Info action 223 type snmp oid get exact $myoid

    action 224 puts "" myoides = $myoid, i = $i, j $j, k = $k, value = snmp oid = $_info_snmp_value ".

    action 225 regexp ' [0-9] + "" $_info_snmp_value ".

    the 226 if action $_regexp_result eq 1

    227 Add $Calls action $_info_snmp_value

    game action 228 $Calls "$_result '.

    229 action puts 'calls is $Calls. "

    230 action ended

    action 232 increment k 2

    end of the 234 action

    action 240 increment i

    250 action ended

    end

    clear all system event handler

    test run the event handler

    Here is the result when I run the cmdlet:

    bctrunks-2431-2 #event man run test

    myoides = 1.3.6.1.2.1.10.20.1.3.3.1, i = 1, j = 2, k = 2, 2 = snmp oid value

    Calls = 0

    myoides = 1.3.6.1.2.1.10.20.1.3.3.1, i = 1, j = 2, k = 4, 2 = snmp oid value

    Calls = 0

    Here's a snmpwalk on Solaris 10 of the poll server the OID I am trying sample and add

    -bash-3, $00 snmpwalk-v1 - c TWC-default 10.40.209.2 1.3.6.1.2.1.10.20.1.3.1.0

    SNMPv2 - SMI:transmission.20.1.3.1.0 = INTEGER: 2<---- this="" is="" isdnsignallinggetindex="" which="" is="" 1="" +="" last="" isdn="" port="">

    -bash-3, $00 snmpwalk-v1 - c TWC-default 10.40.209.2 1.3.6.1.2.1.10.20.1.3.3.1

    SNMPv2-SMI::transmission.20.1.3.3.1.1.1 = Counter32 : 10

    SNMPv2-SMI::transmission.20.1.3.3.1.2.1 = Counter32 : 10<----- this="" is="" the="" number="" of="" isdn="" outbound="" calls="">

    SNMPv2-SMI::transmission.20.1.3.3.1.3.1 = Counter32 : 2

    SNMPv2-SMI::transmission.20.1.3.3.1.4.1 = Counter32 : 2<------ this="" is="" the="" number="" of="" isdn="" inbound="" calls="">

    SNMPv2-SMI::transmission.20.1.3.3.1.5.1 = Counter32 : 0

    -bash-3, $ 00

    In this case, the cmdlet must obtain the OID 1.3.6.1.2.1.10.20.1.3.3.1.2.1 & 1.3.6.1.2.1.10.20.1.3.3.1.4.1 values and add them.

    The comand 'append' does not seem to be working properly, as indicated by the value of myoides.  The IOS command result search tool for the "add action".

    order does not explicitly say where the result of append it is placed, so I guess that the result is placed in the variable 'myoides' in my test applet.

    I have successfully used the 'action info exact snmp oid get-type type' syntax in the past, but I do not know if it works using a constructed string variable.

    Let me know if you can help me.  Thanks in advance.

    Add use the variable name not its value.  Try this instead:

    action 222 Add myoides ' k $I ".

  • Girls need help with a script to repeat the link to another folder in indesign

    I REALLY hope you smart people can help me.

    We had servers which means that all of our Indesign documents now have a broken link. To manually "re-edit the link to the file" causes Indesign down :-(. And it takes forever I am hoping to find a script that can connect all the links in the doc to a new file structure.

    The name of the link (name of file) and the file structure remains the same; Just point to another server. The structure contains subfolders so the best way would be that the script can see subfolders as well, but otherwise I would gladly use a script that points of 6 subfolders at a time.

    Problem - I KNOW NOT ALL SCRIPTS and I'm a graphic designer so I can't create scripts :-(. I have already had success Googling a script to unlink everything in the document, but I don't know how to run the script. DO NOT to create them.

    ANY help in this forum? I have 6 designers waiting for me to fix this.

    Is there a script where I could just change the path and then he could repeat?

    We have iMac OSX Yosemite 10.10.4

    PLEASE HELP... :-)

    / Dina

    Try this... it is created by Vamitul

    main() {} function

    var doc = app.activeDocument;

    myLinks var = doc.links.everyItem () .getElements ();

    var linkObj = {};

    Create the initial object

    / * {linkObject

    [path] {missingNr,

    arrayOfMissingLinks}

    } */

    for (var i = 0; i)< mylinks.length;="" i++)="">

    If (myLinks [i] .status == LinkStatus.LINK_MISSING) {}

    var myPath = File(myLinks[i].filePath).path.toString ();

    If (linkObj [myPath] == undefined) {}

    linkObj [myPath] = {}

    missingNr: 1.

    missingLinks: [myLinks [i]],.

    newPath: "

    }

    } else {}

    linkObj [myPath] .missingNr ++;

    linkObj [myPath].missingLinks.push (myLinks [i] .getElements () [0]);

    }

    }

    }

    $.writeln (linkObj.toSource ());

    var myDialog = new window ("dialog", "link Chaser:', undefined");

    Panel1 = myDialog.add var ('panel', undefined, "double-click to select the new path '");

    Panel1. Align = ["fill",""];

    myList var = panel1.add ("listBox", undefined, "", {})

    columnWidths: [160, 160, 130],

    numberOfColumns: 3,.

    showHeaders: true,

    columnTitles: ['old road', 'New Path', 'Nr. missing links']

    });

    myList.size = [450, 200];

    myList.align = ["fill",""];

    for {(var missingPath in linkObj)

    with (myList.add ("item", missingPath)) {}

    Subitems [0] .text is linkObj [missingPath] .newPath;.

    Paragraphs [1] .text is linkObj [missingPath] .missingNr;.

    }

    }

    myList.onDoubleClick = function() {}

    var myNewPath = (new folder (app.activeDocument.filePath) .selectDlg ("Select New Folder") |. toString() ' ");

    myList.selection.subItems [0] .text = myNewPath;

    linkObj [myList.selection.text] .newPath = myNewPath;

    }

    myDialog.add ('button', {undefined, "Ok",

    name: 'ok '.

    });

    myDialog.add ("button", undefined, "Cancel", {})

    name: "Cancel".

    });

    If (myDialog.show () == 1) {}

    for (var i in linkObj) {}

    If (linkObj [i] .newPath! = ") {}

    var fixedNr = 0;

    Var links = linkObj [i] .missingLinks

    for (var j = 0; j)< links.length;="" j++)="">

    var queue = newFile (linkObj [i] .newPath + "/" + links [j] .name);

    If {(newFile.exists)

    fixedNr ++;

    Links [j] .relink (NewFile);

    }

    }

    Alert ("in the folder: \n" + linkObj [i] .newPath + '\n' +)

    'Fixed' fixedNr ' links of ' + linkObj [i] .missingNr + '\n ' +.

    "Please check");

    }

    }

    };

    }

    app.doScript ('main()', undefined, undefined, UndoModes.entireScript, "Chaser link");

  • Need help with custom script to rename the layers

    Hello world.

    I need help to write a custom script (because I suck at it) that will allow me to go through all the layers and sous-calques for a specific name ('X') and give it a new specific name ('Y').

    I have had success using the script below, but it does not work on any text layers names where the text layer was previously particularly well-known in 'X' and now changed needs.

    Any help is greatly appreciated.

    * Note: this script was originally used to find any layer with 'Copy' in its name and remove with anything after (to correct the problem of duplication of layers by adding this text).

    This is why the function is named removeCopy. It works for renaming layers also - just not a layer of text unfortunately.

    #target illustrator

    function removeCopy() {}
    If (app.documents.length == 0) return;
    var app.activeDocument = docRef;
    recurseLayers (docRef.layers);
    }
    removeCopy();
    function recurseLayers (objArray) {}
    for (var i = 0; i < objArray.length; i ++) {}
    ObjArr [i] .name = ObjArr [i].name.replace (/ \s*current name\s*\d*/, 'new name');
    If (objArray [i] .layers) recurseLayers (. layers.length > 0 ObjArr [i]);
    }
    }

    I finally found something after searching forums for a week. My confusion was related to the way Illustrator treats real layers against text/path/object "layers." Instead of layers, I had to use the pageItems in the script. The code below works. Thanks to Gustavo for his answer in another thread and Carlos I thank you for this looking too good! You're great to be ready to help models do more advanced things with Illustrator.

    var doc = app.activeDocument;
    var items = doc.pageItems;
    for (var g = 0; g)
        elements [g] .name = elements [g].name.replace ('Century Schoolbook text line', ' MonogramText: Century Schoolbook ");
    };
    App.Redraw ();
  • Need help with creating table that inserts the lines according to the amount of data

    Hello

    I try to create a table for supervisors to enter their subordinates of information and inserts lines for supervisors with several of his subordinates.  This form is not be connected to a data source, the supervisors will be simply fill out the form and print.  I want it sort of look like this:

    Name Position # Ranking Hours

    I really appreciate any help.  Thank you!

    Hi Laura,

    It's very strange. I downloaded a new version on the site and it works perfectly. The script is in the right place.

    I can sugggest you right click on the download link and select "save a copy as" the alternative menu. This should save the form locally and from there, you should be able to open it in Acrobat.

    If you are a Mac, make sure that the form opens in preview from Apple.

    Also make sure that Javascript is enabled in Acrobat (in the preferences window).

    Niall

  • [8i] need help with full outer join combined with a cross join...

    I can't understand how to combine a full outer join with a different type of join... is it possible?

    Here are some create table and insert for examples of database:
    CREATE TABLE     my_tab1
    (     record_id     NUMBER     NOT NULL     
    ,     workstation     VARCHAR2(4)
    ,     my_value     NUMBER
         CONSTRAINT my_tab1_pk PRIMARY KEY (record_id)
    );
    
    INSERT INTO     my_tab1
    VALUES(1,'ABCD',10);
    INSERT INTO     my_tab1
    VALUES(2,'ABCD',15);
    INSERT INTO     my_tab1
    VALUES(3,'ABCD',5);
    INSERT INTO     my_tab1
    VALUES(4,'A123',5);
    INSERT INTO     my_tab1
    VALUES(5,'A123',10);
    INSERT INTO     my_tab1
    VALUES(6,'A123',20);
    INSERT INTO     my_tab1
    VALUES(7,'????',5);
    
    
    CREATE TABLE     my_tab2
    (     workstation     VARCHAR2(4)
    ,     wkstn_name     VARCHAR2(20)
         CONSTRAINT my_tab2_pk PRIMARY KEY (workstation)
    );
    
    INSERT INTO     my_tab2
    VALUES('ABCD','WKSTN 1');
    INSERT INTO     my_tab2
    VALUES('A123','WKSTN 2');
    INSERT INTO     my_tab2
    VALUES('B456','WKSTN 3');
    
    CREATE TABLE     my_tab3
    (     my_nbr1     NUMBER
    ,     my_nbr2     NUMBER
    );
    
    INSERT INTO     my_tab3
    VALUES(1,2);
    INSERT INTO     my_tab3
    VALUES(2,3);
    INSERT INTO     my_tab3
    VALUES(3,4);
    And, the results that I want to get:
    workstation     sum(my_value)     wkstn_name     my_nbr1     my_nbr2
    ---------------------------------------------------------------
    ABCD          30          WKSTN 1          1     2
    ABCD          30          WKSTN 1          2     3
    ABCD          30          WKSTN 1          3     4
    A123          35          WKSTN 2          1     2
    A123          35          WKSTN 2          2     3
    A123          35          WKSTN 2          3     4
    B456          0          WKSTN 3          1     2
    B456          0          WKSTN 3          2     3
    B456          0          WKSTN 3          3     4
    ????          5          NULL          1     2
    ????          5          NULL          2     3
    ????          5          NULL          3     4
    I tried a number of different things, google my problem and no luck yet...
    SELECT     t1.workstation
    ,     SUM(t1.my_value)
    ,     t2.wkstn_name
    ,     t3.my_nbr1
    ,     t3.my_nbr2
    FROM     my_tab1 t1
    ,     my_tab2 t2
    ,     my_tab3 t3
    ...
    So, what I want, it's a full outer join of t1 and t2 on workstation and a cross join of one with the t3. I wonder if I can't find examples of it online because it is not possible...

    Note: I'm stuck dealing with Oracle 8i

    Thank you!!

    Hello

    The query I posted yesterday is a little more complex that it should be.
    My_tab2.workstation is unique, there is no reason to make a separate subquery as mt1. We can join my_tab1 to my_tab2 and get the SUM in a subquery.

    SELECT       foj.workstation
    ,       foj.sum_my_value
    ,       foj.wkstn_name
    ,       mt3.my_nbr1
    ,       mt3.my_nbr2
    FROM       (     -- Begin in-line view foj for full outer join
              SELECT        mt1.workstation
              ,        SUM (mt1.my_value)     AS sum_my_value
              ,        mt2.wkstn_name
              FROM        my_tab1   mt1
              ,        my_tab2   mt2
              WHERE        mt1.workstation     = mt2.workstation (+)
              GROUP BY   mt1.workstation
              ,        mt2.wkstn_name
                            --
                    UNION ALL
                            --
              SELECT      workstation
              ,      0      AS sum_my_value
              ,      wkstn_name
              FROM      my_tab2
              WHERE      workstation     NOT IN (     -- Begin NOT IN sub-query
                                               SELECT      workstation
                                       FROM      my_tab1
                                       WHERE      workstation     IS NOT NULL
                                     )     -- End NOT IN sub-query
           ) foj     -- End in-line view foj for full outer join
    ,       my_tab3  mt3
    ORDER BY  foj.wkstn_name
    ,       foj.workstation
    ,       mt3.my_nbr1
    ,       mt3.my_nbr2
    ;
    

    Thanks for posting the CREATE TABLE and INSERT statements, and very clear expected results!

    user11033437 wrote:
    ... So, what I want, it's a full outer join of t1 and t2 on workstation and a cross join of one with the t3.

    She, exactly!
    The trickiest part is when and how get SUM (my_value). You could address the question of exactly what my_tab3 must be attached to a cross that's exactly what should look like the result set of the full outer join between my_tab1 and my_tab2 to. To do this, take your desired results, remove columns that do not come from the outer join complete and delete duplicate rows. You will get:

    workstation     sum(my_value)     wkstn_name
    -----------     -------------   ----------
    ABCD          30          WKSTN 1
    A123          35          WKSTN 2
    B456          0          WKSTN 3
    ????          5          NULL          
    

    So the heart of the problem is how to get these results of my_tab1 and my_tab2, which is done in the subquery FOJ above.

    I tried to use auto-documenté in my code names. I hope you can understand.
    I could spend hours explaining the different parts of this query more in detail, but I don't know that I would lose some of that time, explain things that you already understand. If you want an explanation of the specific element (s), let me know.

  • Need help with this code to update the user interface example

    I'm triying to understand the differences between the three methods to manage UI interactions.
    I'm really confused with these three terms when triying them figure out in a real case.
    Basically, I know that I should use invokeLater, invokeAndWat, or getEventLock() to avoid
    This exception: java.lang.illegalStateException: engine access UI without holding the lock on the event

    The code below illustrates the function of the invokeAndWait method, but if I replace it with
    invokeLater or getEventLock() the program will work exactly the same way.
    Could you please change the code to show the differences between the three
    methods of updating the user interface?

    / public final class HelloWorldMainScreen extends form {}

    private LabelField labelField;
    public HelloWorldMainScreen() {}
    labelField = new LabelField ("Hello World");
    Add (labelField);
    Thread MainScreenUpdaterThread = new MainScreenUpdaterThread (this);
    thread. Start();
    }

    {} public void appendLabelText (String text)
    labelField.setText(labelField.getText()+"\n"+text);
    }

    }

    SerializableAttribute public class MainScreenUpdaterThread extends Thread {}
    HelloWorldMainScreen screen;

    public MainScreenUpdaterThread (screen HelloWorldMainScreen) {}
    this.mainScreen = screen;
    }

    public void run() {}
    for (int i = 0; i)< 10;="" i++)="">
    try {}
    Thread.Sleep (5000);
    } catch (InterruptedException ex) {};
    UiApplication.getUiApplication () .invokeAndWait (new Runnable() {}
    public void run() {}
    mainScreen.appendLabelText ("Update");
    }
    });

    }
    }
    }

    These three concepts are very confusing for a lot from people so all explanatory source code
    describing their functions will be highly useful for everyone, I think.

    Thanks in advance!

    With respect to the effect, there is no difference between methods.  The difference is the way in which the result is achieved.  So we can't change the code to show you the difference.

    As we are unable to demonstrate the difference, you have to do with an explanation.  To understand the explanation, you'll need to understand the thread of events, so if you have not already, please consider this:

    http://supportforums.BlackBerry.com/T5/Java-development/what-is-the-event-thread/Ta-p/446865

    If the three options are differentiated by the processing order:

    (a) invokeLater executes the update on the thread of events.  The transformation takes place at a later stage and the code which is in order after the invokeLater will actually run before the code within the invokeLater.

    (b) invokeAndWait also manages the update on the thread of events, which means that all other events that await on the thread of events will be run before this code.  But any code after the invokeAndWait will not be executed.

    (c) the synchronized option, like invokeAndWait, runs the update of the UI before moving on to the following code.  The difference is that the code to run on the event Thread is not executed before code in the synchronized block.

    If this is meaningless, so that probably does not matter too much.  in general, you should use invokeLater, except if you need to update the user interface occur in the order with your background processing.  If so, use invokeAndWait. It has synced are very few occasions where you must use the block, and it should be very small updates to the user interface and you should understand the implications this could have on the wire events.

  • Need help with choice variables remain in the new session

    I have a set of approx. Flash to the top with several variables. Y at - it a simple action script that will allow the user to maintain their choice after the closure of the .swf and revive it?
    Thanks in advance for your help.

    How do check you if these components have been checked or ticked. in fact, I probably don't want to know that.

    you really recommended to use a listener to detect when your components have changed and then you can use the modified method to define your variables and update your sharedobject.

  • have dell dimension 4700 xp need help with outlook express I have error message and can not send email

    I need help to figure out why my outlook express does not work when I try to send a link, or email. I have a dell dimension 4700 xp restored. The error message cannot find the server with an error code number. I am a newbee so one who responds to it will have to break it down for me. So far, I had lots of help from proceeding to audio and graphics, and I am totally grateful for the help I get.

    Thank you, Gina Davis

    I have

    He has already worked with Outlook Express? Using OE? Hotmail is a Webmail service.

    How to add your Hotmail e-mail account to Microsoft Outlook Express
    http://windowslivehelp.com/solution.aspx?SolutionID=99d4b13d-13dB-40D8-9cdf-172002d4194c

    If you don't want to use OE to access Hotmail and want to just use IE to access Hotmail, then just copy the link and paste it into a new message from Hotmail.

  • Need help with packaging CS4; activation of 10.10 and 10.11 customers

    We have a package made by activating the former employee worked in 10.9 OSX clients. Now, we need to rebuild and get the activation job. Our license is provided.

    Is likely not to be able to do this because of the 'special' required to install OLD programs on the NEW Mac (see below)

    But to help you, you need these 2 links... Packer links https://forums.adobe.com/thread/1586021

    http://forums.Adobe.com/community/download_install_setup/creative_suite_enterprise_deploym ent

    CS6 and previous programs have not been tested and will not be updated to run on Mac El Capitan

    -which means you are trying to use CS6 and earlier at YOUR risk of having problems

    -You can get CS6 and previous programs to install and run, or you can not (some do, some don't)

    -IF not, Details of the message from the error messages and a person may be able to help (just not Adobe)

    Maybe it's a fake because of Mac El Capitan and OLD programs error

    This information is a MUST to install old programs on Mac El Capitan

    -You can't get the same error message, but here are some links that CAN help with old programs

    -Java https://helpx.adobe.com/dreamweaver/kb/dreamweaver-java-se-6-runtime.html can help

    Install CS5 on Mac 10.11 https://forums.adobe.com/thread/2003455 can help (also for others than CS5)

    -also a TEMPORARY security change https://forums.adobe.com/thread/2039319

    -http://mac-how-to.wonderhowto.com/how-to/open-third-party-apps-from-unidentified-developer s-mac-os-x-0158095 /

    -the guardian https://support.apple.com/en-au/HT202491

  • Relative time with the Parent and child Comps

    Hi, is it possible to see the time a child-comp has in her own scenario, and in his own timeline window see what time there in a certain-comps-chronology kinship?

    I tried several views, but could not display 2 different comps and / or move the time slider to a model he moves in the other computer too...

    Kind regards

    Frank

    Well, that said Rick is the first to check, but by default, this option is enabled, so I wonder... Your compositions are in fact really nested or y at - it something to do that we do not know? As well use the parameters of the model and adjust the com time beginning when necessary. Desp you can always use simple expressions for anotehr comp time and attach it to the effect numbers...

    Mylenium

Maybe you are looking for