Grouping of lines from common lines in detail header

Hello

I have two tables TAB_MST and TAB_DTL with the information as below:

{code}

CREATE TABLE TAB_MST
(
NUMBER OF MSTCOL
)
/

ALTER TABLE TAB_MST ADD CONSTRAINT TAB_MST_PK PRIMARY KEY (MSTCOL)
/

INSERT INTO TAB_MST (MSTCOL) VALUES (1);
INSERT INTO TAB_MST (MSTCOL) VALUES (2);
INSERT INTO TAB_MST (MSTCOL) VALUES (3);
INSERT INTO TAB_MST (MSTCOL) VALUES (4);

CREATE TABLE TAB_DTL
(
NUMBER OF MSTCOL
NUMBER OF DTLCOL
)
/

ALTER TABLE TAB_DTL ADD CONSTRAINT TAB_DTL_PK PRIMARY KEY (MSTCOL, DTLCOL)
/

INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (1, 1);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (1, 2);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (1, 3);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (1, 4);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (1, 5);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (2, 4);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (2, 7);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (2, 8);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (2, 9);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (3, 8);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (3, 9);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (3, 10);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (3, 11);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (4, 12);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (4, 13);
INSERT INTO TAB_DTL (MSTCOL, DTLCOL) VALUES (4, 14);

COMMIT;

{code}

I want to group the rows in the Master table (TAB_MST) to different groups based on the data in the secondary table (TAB_DTL) with output like below

MSTCOL GROUPID
1               1
2               1
3               1
4               2

Rule for grouping are as follows:

(1) if there is a common value of DTLCOL for two different values of MSTCOL, then two MSTCOL values should be grouped under the same group, for example for the above case of sample
DTLCOL (value = 4) is common for MSTCOL = 1 and MSTCOL = 2, so MSTCOL 1 and MSTCOL 2 belong to the same group (GROUPID = 1).
DTLCOL (value = 8, 9) is common for MSTCOL = 2, MSTCOL = 3, so 3 MSTCOL must belong to the same group as MSTCOL 2 (GROUPID = 1)
There is no common value of DTLCOL for MSTCOL = 4, so it is in a separate group.

Here is the PL/SQL block to highlight this grouping behavior. Two temporary tables are created to achieve this:

{code}

CREATE TABLE TAB_MST_GROUP
(
NUMBER OF MSTCOL
GROUPID NUMBER
)
/

CREATE TABLE TAB_TMP_GROUP
(
GROUPID NUMBER
)
/


DECLARE
CURSOR c1
IS
SELECT * FROM tab_mst;

prevmstcol NUMBER;
prevgroupid NUMBER: = 1;
vtmpgroupid NUMBER;
BEGIN
DELETE tab_mst_group;

FOR r1 IN c1
LOOP
IF prevmstcol IS NULL
THEN
INSERT INTO tab_mst_group
VALUES (r1.mstcol, prevgroupid);

prevmstcol: = r1.mstcol;
ON THE OTHER
INSERT INTO tab_tmp_group
SEPARATE SELECT GroupID
OF tab_mst_group a, tab_dtl b, tab_dtl c
WHERE a.mstcol = b.mstcol
AND c.dtlcol = b.dtlcol
AND c.mstcol = r1.mstcol;

IF SQL % ROWCOUNT = 0
THEN
prevgroupid: = prevgroupid + 1;

INSERT INTO tab_mst_group
VALUES (r1.mstcol, prevgroupid);
ON THE OTHER
SELECT MIN (groupid) IN the vtmpgroupid OF tab_tmp_group;

UPDATE tab_mst_group
SET groupid = vtmpgroupid
WHERE groupid IN (SELECT tab_tmp_group FROM groupid);

INSERT INTO tab_mst_group
VALUES (r1.mstcol, vtmpgroupid);

SELECT MAX (groupid) IN tab_mst_group prevgroupid;

DELETE tab_tmp_group;
END IF;
END IF;
END LOOP;
END;

{code}


Question:

a. can achieve us in SQL instead of PL/SQL?
b. fresh general reading of TAB_DTL grows exponentially if the number of cases in TAB_MST develops. How can we reduce the number of TAB_DTL reading as the real lines of TAB_DTL is very high.


Thank you
sukhijank

Hi, Sukhijank,

Thanks for the additional information.  Has not only learned these details since posting your first message, did you?  If you post information like that in your first post, and then people can use it to give you a better response to the first answer.

The idea I had for a recursive solution of WITH clause will not work after all.

I think that the best solution will be in PL/SQL, using a table like tab_mst_group that you posted, but with an extra column:

CREATE TABLE TAB_MST_GROUP
(
  mstcol NUMBER PRIMARY KEY,
  groupid   NUMBER,
  levelnum NUMBER
);
CREATE INDEX tab_mst_group_groupid_levelnum
ON     tab_mst_group (levelnum, groupid);

If llevelnum = 0, which means that the allocation of groupid is not certain; If levelnum > 0, then groupid is correct.

Here is a procedure you can use to fill in the table:

CREATE OR REPLACE PROCEDURE tab_mst_group_populate
AS
    new_groupid  tab_mst_group.groupid%TYPE
     := 0;
    new_levelnum tab_mst_group.levelnum%TYPE;
    num_added  PLS_INTEGER;
    truncate_stmt VARCHAR2 (50) := 'TRUNCATE TABLE tab_mst_group';
BEGIN
    --  *****  Remove old entries from the table  *****
    -- dbms_output.put_line (truncate_stmt || ' = truncate_stmt in tab_mst_group_populate'); -- Debugging
    EXECUTE IMMEDIATE  truncate_stmt;

    --  *****  Populate table with all mstcols, and 1-member groups  *****
    INSERT INTO  tab_mst_group (mstcol, groupid, levelnum)
    SELECT    m.mstcol
    ,       m.mstcol  AS groupid
    ,       MIN ( CASE
                     WHEN  o.mstcol IS NULL
     THEN  1
     ELSE  0
                 END
    )  AS lvlnum
    FROM     tab_mst    m
    LEFT JOIN tab_dtl    d ON  d.mstcol = m.mstcol
    LEFT JOIN tab_dtl    o ON  o.dtlcol = d.dtlcol
            AND o.mstcol   != d.mstcol
    GROUP BY    m.mstcol;

    --  ***** Get groupid for lowest mstcol that still needs one  *****
    WHILE  new_groupid IS NOT NULL
    LOOP
        SELECT  MIN (groupid)
INTO new_groupid
FROM tab_mst_group
WHERE levelnum = 0;
IF  new_groupid   IS NOT NULL
THEN
     --  ***  Confirm groupid for this one mstcol  ***
     UPDATE  tab_mst_group
     SET     levelnum = 1
     WHERE   levelnum = 0
     AND     groupid = new_groupid;
     new_levelnum := 2;
     num_added := 1;
     --  ***  Add neighboring mstcols to this group  ***

     WHILE  num_added > 0
     LOOP
         UPDATE  tab_mst_group
  SET groupid   = new_groupid
  , levelnum  = new_levelnum
  WHERE levelnum  = 0
  AND groupid   IN (
                   SELECT  d2.mstcol
            FROM  tab_mst_group g1
      JOIN  tab_dtl       d1  ON  d1.mstcol  = g1.mstcol
      JOIN  tab_dtl       d2  ON  d2.dtlcol  = d1.dtlcol
                    AND d2.mstcol != d1.mstcol
      JOIN  tab_mst_group g2  ON  g2.mstcol  = d2.mstcol
      WHERE  g1.levelnum  = new_levelnum - 1
      AND  g1.groupid   = new_groupid
      AND  g2.levelnum  = 0
         );
  num_added := SQL%ROWCOUNT;
  dbms_output.put_line (num_added || ' = num_added');
         new_levelnum := new_levelnum + 1;
     END LOOP;
END IF;
    END LOOP;

END tab_mst_group_populate;
/
SHOW ERRORS

The basic strategy is that we start assuming that each mstcol will have its own groupid.  The CASE expression in the INSERT statement sets levelnum = 1 for the mstcols that do not exist in the tab_dtl table, or are not related to other mstcols in tab_dtl.  The loop after that looks like for tab_mst_group lines are always 0, which means that the grpupid must still be confirmed or changed.  He begins by finding the lowest mstcol which still has levelnum = 0 and makes a new group.  The inner loop looking for related mstcols and the brand as being in the same group.

You could combine tab_mst and tab_mst_group; I see no need to have a separate table (but maybe do you).  If combine you them, then you would not truncate the table in the procedure.

Tags: Database

Similar Questions

  • Trying to get ending entry into force for the groups of lines

    Hello world

    I searched the forums, but I can't find a post that is a problem quite like that.

    I have some data that looks like this:
            ID_NUM     EFFECTIVE ALLOC_PERCENT   ACCT
    ---------- --------- -------------   ----
           101 01-JUL-11            21   A1
           101 01-JUL-11            72   A2
           101 01-JUL-11             7   A3
    
           101 01-JUL-12            20   B1
           101 01-JUL-12            80   B2
    
           101 01-JAN-13            20   A1
           101 01-JAN-13            20   A2
           101 01-JAN-13            50   A3
           101 01-JAN-13            10   B1
    
           101 01-JUN-13            50   A1
           101 01-JUN-13            50   A2
    (note: I inserted manually empty lines for clarity)

    Here's the logic: the lines represent an assignment of percentage on the account for the identification number specified for this entry into force. A new date to cancel the previous, and if any line in the conceptual group is replaced, so they are all.

    I'll try to find the date when the effective period of each group ended and which includes in the game so that I can calculate then the number of days in a given line has been effective; something like that;
      ID_NUM     EFFECTIVE END_DATE   ALLOC_PERCENT ACCT
    ---------- --------- ---------- ------------- ----
           101 01-JUL-11 01-JUL-12             21 A1
           101 01-JUL-11 01-JUL-12             72 A2
           101 01-JUL-11 01-JUL-12              7 A3
    
           101 01-JUL-12 01-JAN-13             20 B1
           101 01-JUL-12 01-JAN-13             80 B2
    
           101 01-JAN-13 01-JUN-13             20 A1
           101 01-JAN-13 01-JUN-13             20 A2
           101 01-JAN-13 01-JUN-13             50 A3
           101 01-JAN-13 01-JUN-13             10 B1
    
           101 01-JUN-13 <null>                50 A1
           101 01-JUN-13 <null>                50 A2
    The end_date of the group is the EFFECTIVE_DATE of the next group (ordered by ID_NUM, EFFECTIVE_DATE).

    End_date of two rows is zero because there is no group of lines with an effective date the later - in my process, I'll NVL which sysdate so that my calculations of days will be valid.

    I tried some analytical queries with LEAD, but I couldn't figure out how to get the next date of the efficient group. I could get the entry into force of the next row, but not the next group. I couldn't specify how many lead lines to look forward, because there is not a number of rows in each group.

    How to fill the end_date column?

    Here's the code to create the above.
    create table t
    (id_num number,
     effective_date date,
     alloc_percent number,
     acct_code varchar2(4)
     );
    
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2011',21.0,'A1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2011',72.0,'A2'); 
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2011',7.0,'A3');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2012',20.0,'B1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jul-2012',80.0,'B2');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',20.0,'A1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',20.0,'A2');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',50.0,'A3');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jan-2013',10.0,'B1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jun-2013',50.0,'A1');
    insert into t (id_num,Effective_date,alloc_percent,acct_code) values(101,'01-jun-2013',50.0,'A2');
    
    commit;
    
    select * from t;
    Oracle version information:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE 11.2.0.3.0 Production."
    AMT for Solaris: 11.2.0.3.0 - Production Version
    NLSRTL Version 11.2.0.3.0 - Production


    Thank you very much

    Hello

    Here is one more way to do using lead work.

    WITH ds as (id_num, effective_Date, lead (effective_date) select on end_date (id_num order, effective_Date))

    t

    Id_num group, effective_date)

    Select t.*, ds.end_date

    DS, t

    where t.effective_Date = ds.effective_Date;

  • Type special group some lines

    Hey guys,.

    the time is the Dungeon running and there are still a few problems with my apex report, so I decied to ask fruther.

    I combine all my lines as in example 2 above. I know I could put the information corresponding to all, in the columns 'number', 'title' and 'project', for a line. I tried to use these solutions, but some of my entries in the last column "history" are a bit longer than usual of the. So my text cut to 32 k characters, because all the cells of a report are limited to 32 KB.

    Maybe it's important to know that the values of 'number', 'title' and 'project' could repeat sometimes.
    Now, I don't put all the information in my whole machted in a row. Each entry gets its own line.
    But you can see that the values for 'number', 'title' and 'project' always repeat and it is not should like this.

    Is it possible to group my lines, as in the 2.example?




    It looks like at the moment: (1. example)

    Number of... title... history of project...
    1... has... b.line1
    __________________________________
    1... has... b.line2
    __________________________________
    1... a... ab... ine3




    and so it should look like: (example 2)

    Number of... title... history of project...
    1... has... b.line1
    __________________________________
    ........................................ . Line2
    __________________________________
    ..........................................line3
    __________________________________
    2................b..........bb.........xxxx
    __________________________________
    ..........................................bbbb
    __________________________________

    (the points must be white space)

    and so on...



    Best regards
    wderr

    Hello wderr,

    Try this - it has no limitation on the number of columns to break down on:

    SELECT   DECODE(ROW_NUMBER() OVER (PARTITION BY num ORDER BY num), 1, num, '') num,
             DECODE(ROW_NUMBER() OVER (PARTITION BY num, title ORDER BY num, title), 1, title, '') title,
             DECODE(ROW_NUMBER() OVER (PARTITION BY num, title, project ORDER BY num, title, project), 1, project, '') project,
             history
      FROM   your_table;
    

    See the model? Just keep adding some "decode" columns for additional groups.

    Hope this helps,
    John

  • How to develop and reduce lines or groups of lines in figures?

    How to develop and reduce lines or groups of lines in figures?

    Thank you

    Casey

    Select the rows (or columns):

    Then, place the cursor on one of the row headings (the numbers on the left):

    so that you see the carat facing downwards, then click here to bring up the context menu for the lines:

    then select "hide selected rows.

  • Grouping of lines - SQL Developer

    I was wondering if someone can help me here - Im trying to group the lines in a "package" to get fewer lines of data and group together the dates where they follow (and they have the same class of service and client ID). Im not the most irritable person so any help is appreciated.

    Here's my CREATE & INSERT

    CREATE TABLE ACF_SERVICES_DIM (Client_id varchar2 (20),)
    Date of Agreement_Start_date,
    Date of Agreement_End_Date,
    Service_Category Varchar2 (200),
    Agreement_id varchar2 (20));

    Insert into Acf_Services_Dim (Client_Id, Agreement_Start_Date, Agreement_End_Date, Service_Category, Agreement_Id)
    VALUES ('2607 ', 'J2849', 'Red', TO_DATE (' 01/10/2013 ',' dd/mm/yyyy'), NULL);

    Insert into Acf_Services_Dim (Client_Id, Agreement_Start_Date, Agreement_End_Date, Service_Category, Agreement_Id)
    VALUES ('2607 ', 'J2279', 'Red', TO_DATE (' 30/09/2013 ',' dd/mm/yyyy'), TO_DATE (' 01/03/2002 ',' dd/mm/yyyy'));

    Insert into Acf_Services_Dim (Client_Id, Agreement_Start_Date, Agreement_End_Date, Service_Category, Agreement_Id)
    VALUES ('2607 ', 'J2284', 'Red', TO_DATE (' 30/09/2013 ',' dd/mm/yyyy'), TO_DATE (' 01/03/2002 ',' dd/mm/yyyy'));

    Commit;

    The last two are of the same exact service type / id / dates etc so id expect to see a result... I think however it it link to 1 also, such as tracking the dates on and again, everything else is the same.

    If there is a 4th line-

    VALUES ('2607 ', 'J2299', 'Blue', TO_DATE (' 30/09/2013 ',' dd/mm/yyyy'), TO_DATE (' 01/03/2002 ',' dd/mm/yyyy'));

    Commit;

    I only expect to show also in a separate package because it does not match the 1st 3 because it is a different class of service, even if the dates are the same... I hope that helps?

    The request im trying to use is the following... HOWEVER it keeps giving me a not authorized windows error function

    WITH got_package_id AS

    (

    SELECT agreement_id

    MIN (CONNECT_BY_ROOT agreement_id) AS package_id

    Of acf_services_dim

    CONNECT BY NOCYCLE client_id = client_id PRIOR

    AND service_category = PRIOR service_category

    AND agreement_id <>agreement_id PRIOR

    AND (agreement_start_date = agreement_end_date FRONT + 1).

    OR agreement_end_date = PRIOR agreement_start_date - 1

    OR (agreement_start_date = PRIOR agreement_start_date

    AND agreement_end_date = PRIOR agreement_end_date

    )

    )

    GROUP BY agreement_id

    )

    SELECT s.Client_Id

    MIN (s.Agreement_Start_Date) AS package_start_date

    , NULLIF (NVL (MAX (s.Agreement_End_Date))

    DATE "9999-01-01'

    )

    DATE "9999-01-01'

    ) AS package_end_date

    s.Service_Category

    p.package_Id

    ROW_NUMBER () OVER (PARTITION BY s.client_id

    s.service_category

    ORDER BY p.package_id

    ) AS package_num - if wanted

    Of s acf_services_dim

    JOIN got_package_id p ON p.agreement_id = s.agreement_id

    GROUP BY s.client_id

    s.service_category

    p.package_id

    ;

    Don't know why, but im getting the following error when running in SQL developer... no idea why?

    Error in the command column line: 32:56

    Error report:

    SQL error: ORA-30483: window functions are not allowed here

    30483 00000 - "window functions are not allowed here."

    * Cause: Window functions are allowed only in the SELECT a query list.

    And, depending on the window cannot be an argument in another window or group

    function.

    * Action:

    Make a copy of your test case in a spreadsheet SQL Developer 4.0.3 connected to Oracle Xe (11.2.0.2) with jdk1.7.0_67 on Windows 7, everything works as expected:

    CLIENT_ID PACKAGE_START_DATE PACKAGE_END_DATE SERVICE_CATEGORY

    -------------------- ---------------------------------- ------------------------------- -------------------------------

    2607 1 March 02 13 - SEP - 30 Blue

    2607 1 March 02 13 - SEP - 30 Red

    No ORA-30483 at all.  What versions of SQL, Oracle DB, Java developer and so on are you using?

  • Confused about "Roll up 50-100 lines of detailed data for a global line."

    Hello

    When I read the main practices of OBIEE.

    He mentions that when we do aggregate, one of the guidelines is to roll up to 50-100 lines of detailed data a global line... What does that mean?

    And also confused on the extension table, what is the purpose of the extension table? And how to do it?

    Kind regards
    Anne

    Published by: anne on October 19, 2011 19:32

    Hi Anne,.

    Table extensions:

    Region_D is NOT an extension for District_D table, because the relationship between them is not one by one. A region can have many neighborhoods, she 1:Many link. A perfect example will be w_person_d and w_person_dx tables.w_person_d table will have a primary key with all the attributes of a person, while w_person_dx will have the same primary key has several other attributes of a person as an address line, zip etc. The number of records will be the same in the tables d and dx.

    Aggregates:

    Yes, it's a way to create tables of aggregation as explained here:

    http://www.rittmanmead.com/2007/10/using-the-OBIEE-aggregate-persistence-Wizard/

    Another way is to model the aggregation tables in the datawarehouse iteself as explained here:

    http://www.rittmanmead.com/2006/11/aggregate-navigation-using-Oracle-BI-server/

    Rgds,
    DpKa

  • 'Create a group' has disappered from Contacts in Windows Mail

    In Windows Mail 'contacts', 'create a group' is missing from the toolbar.  How can I get it back?

    http://www.vista4beginners.com/missing-buttons-from-Windows-contacts-toolbar

    The above information will help you solve the problem.

    http://www.Vistax64.com/tutorials/186477-new-contact-new-contact-group-button-missing.html

    Another tutorial on this subject.

    See you soon.

    Mick Murphy - Microsoft partner

  • How to integrate a mp.3 background without having a blank line above the header?

    Hello

    , I have integrated a Mp3 file that plays very well when loading the home page, however he created this white line above the header of the home page.  You can see it at http://rotorooterhsv.com

    I've embedded the file under page properties / metadata / HTML for < head >: < embed src = "music/Roto - RooterJingleFemaleSinger.mp3" autostart = "true" loop = "false" hidden = "true" > < / embed >. (The header also contains GA and a few other scripts)

    Thanks in advance for any advice!

    rotorooter screen capture.PNG

    HTML code foris not where you need to insert. As the audio player is already hidden, try to place somewhere in the page by using the object-> the option Insert HTML code. And using layers, you can place it in the back.

    Please see the following article on what labels can be added to the head section - http://www.w3schools.com/html/html_head.asp.

    Thank you

    Vinayak

  • How to create a line with pointed head

    Hello
    In my application, I need to draw the line with pointed head, I don't know how to set a custom with pointed head line.

    Is there a solution, please answer.

    Thank you

    Hi, add this function after drawing the line

    public function createArrow (): void
    {
    var angle: Number = Math.atan2 (getY2 () - getY1 (), getX2 () - getX1 (());
    graphics.lineTo (getX2 () - arrowHeight * Math.cos (angle) - arrowWidth * Math.sin (angle),)
    getY2 () - arrowHeight * arrowWidth + Math.sin (angle) * Math.cos (angle));
    graphics.lineTo (getX2 (), getY2());
    graphics.lineTo (getX2 () - arrowHeight * arrowWidth + Math.cos (angle) * Math.sin (angle),)
    getY2 () - arrowHeight * Math.sin (angle) - arrowWidth * Math.cos (angle));
    }

    getX1(), getY1(), getx2() and getY2() are the start and finish of the line

    Hope it will work for you.

  • Classic report - "BOLD" of the 1st line of detail of each break

    I have a classic report based on an sql:

    Select
    'LOCATION ',.
    "DEPTNAME",.
    "MODEL_NUMBER,"
    "FIRSTNAME."
    "LASTNAME."
    Sum (decode("category",'CAD',1)) CAD,
    Sum (decode("category",'Desktop',1)) desktop computer,.
    Sum (decode("category",'Portable',1)) Portable
    from 'table1 '.
    Group
    'LOCATION', "DEPTNAME", 'CATEGORY', 'MODEL_NUMBER', 'FIRSTNAME ',.
    'LASTNAME '.
    Union
    Select
    'LOCATION ',.
    "DEPTNAME",.
    "" as "MODEL_NUMBER."
    "" as "FIRSTNAME."
    "" as "LASTNAME."
    Sum (decode("category",'CAD',1)) CAD,
    Sum (decode("category",'Desktop',1)) desktop computer,.
    Sum (decode("category",'Portable',1)) Portable
    from 'table1 '.
    Group
    "LOCATION',"DEPTNAME","CATEGORY"," "
    order by 1 ASC, ASC 2, CSA 3

    while I have the total of break on the 1st line and the details below.

    For example,.

    Human resources New York 2 1 0
    Model a Joe Smith 1 0 0
    Model B John Wayne 1 0 0
    Model B Jim Jones 0 1 0

    I want the 1st line (i.e., total of break) to be bold and normal detail lines. How can I easily do that. I looked at the model and I couldn't understand how to differentiate the two types of lines.

    Can someone please help.

    Thank you in advance,
    Robert

    Published by: sect55 on September 29, 2009 02:32

    Hi Robert,.

    In the two parts you select statement, you could add in a dummy flag - 1 for the first statement and 2 for the second. Then create a new report based on your existing model. You must define at least two models of row and Conditions - each having the same content, but with a bold style. The condition for the "BOLD" would be ' #FLAG #' = '1' and the second one would be ' #FLAG #' = '2' - you should probably add a third party unconditionally, just in case the use of the model not fat

    Andy

  • can someone tell me why I can't update to El Capitan 10.11.2? the line "Show details" gets up and I click on it to make the update. When I do this, it just goes back to doing nothing, so I can never get past this point.

    can someone tell me why I can't update to El Capitan 10.11.2?

    When I try to update "updates available have changed" guest shows up.i click "Show details" prompt to complete the update and when I do that, it just goes back to doing nothing, so I can never get past this point. can someone help me with this, please?

    Thank you very much.

    In some cases, this error message is caused by a problem in the network. Restart your router as your device at wide band, if they are separated. If there is no change, see below.

    This procedure will remove some temporary and cache files. The files are generated automatically and do not contain any of your data. Sometimes they can become corrupted and cause problems like yours.

    Please, back up all data and read this message before doing anything.

    Triple-click anywhere in the line below on this page to select this option:

    /var/folders/zz/zyxvpxvq6csfxvn_n00000s0000068

    Right-click or Ctrl-click on the highlighted line and select

    Services ▹ reveal in Finder (or just to reveal)

    the contextual menu.* file should open with a selected subfolder. The subfolder has a long name beginning with "zyx" and ending with "68". Place this subfolder in the trash. Do not move other subfolders with similar names. You may be prompted for administrator login password. Restart the computer and empty the trash.

    * If you do not see the item context menu copy the selected text in the Clipboard by pressing Control-C key combination. In the Finder, select

    Go ▹ go to the folder...

    from the menu bar and paste it into the box that opens by pressing command + V. You won't see what you pasted a newline being included. Press return.

  • How to spanne line / single called for a similar group of lines

    Hello

    I have a detail existing like that report, there is a conditional formatting on the cost, GP and safe etc..

    Type of mandate

    Type of assets

    Cost of the asset

    Term

    Grace period

    Deposit

    Future

    Vehicle

    1 173 952

    48

    0

    0% of the cost

    Future

    Vehicle

    4 173 952

    60

    0

    0% of the cost

    Future

    Vehicle

    1 500 000

    60

    0

    0% of the cost

    Future

    Material

    10,500,952

    48

    2

    10% of the cost

    Current

    Vehicle

    269 352

    36

    0

    0% of the cost

    Current

    Machines

    60,269,352

    48

    0

    0% of the cost

    Current

    Material

    200 000

    36

    0

    0% of the cost

    Current

    Material

    450 000

    36

    0

    0% of the cost

    Current

    Material

    250 000

    36

    0

    0% of the cost

    And we need to change the report at the start of this way without removing any existing conditional formatting.

    Type of mandate

    Type of assets

    Cost of the asset

    Term

    Grace period

    Deposit

    Current

    Vehicle

    269 352

    36

    0

    0% of the cost

    Machines

    60,269,352

    48

    0

    0% of the cost

    Material

    200 000

    36

    0

    0% of the cost

    Material

    450 000

    36

    0

    0% of the cost

    Material

    250 000

    36

    0

    0% of the cost

    Future

    Vehicle

    1 173 952

    48

    0

    0% of the cost

    Vehicle

    4 173 952

    60

    0

    0% of the cost

    Vehicle

    1 500 000

    60

    0

    0% of the cost

    Material

    10,500,952

    48

    2

    10% of the cost

    I tried many lines lasted , but without success, sometimes text out of the table or line covering the expected grouping. It is out of control for me

    Please help me, provide any sample/demo.

    Thank you

    I just tried according to your xml provided in post above, here is the model of form field and overview for your help.

    It's like you want.

    Type of mandate

    Type of assets

    Term

    Cost of the asset

    Grace period

    Deposit

    G V IF TERM_TYPE RS

    G V IF ASSET_TYPE RS

    G V IFTERMRS

    F ASSET_COST

    GRACE_PERIOD

    DEPOSIT E E E E

    Form fields

    G

    V

    IF

    TERM_TYPE

    RS

    G

    V

    IF

    ASSET_TYPE

    RS

    G

    V

    IF

    TERM

    RS

    F

    ASSET_COST

    GRACE_PERIOD

    DEPOSIT

    E

    E

    E

    E

    Overview

    Type of mandate

    Type of assets

    Term

    Cost of the asset

    Grace period

    Deposit

    Current

    Material

    36

    200 000

    0

    0% of the cost

    450 000

    0

    0% of the cost

    250 000

    0

    0% of the cost

    Machines

    48

    60,269,352

    0

    0% of the cost

    Vehicle

    36

    269 352

    0

    0% of the cost

    Future

    Material

    48

    10,500,952

    2

    10% of the cost

    Vehicle

    48

    1 173 952

    0

    0% of the cost

    60

    4 173 952

    0

    0% of the cost

    1 500 000

    0

    0% of the cost

    Note: as you mentioned earlier, it is a conditional formatting and logic on the existing model, these must be change as field are group / nested group, you may need to set field with current - group)

  • Group multiply lines - HARD

    Hello
    NAME | FAMILY NAME |     x | There | BIRTH_DAY
    KRIS | ONE | 324. 52. 2011 09-12
    KRIS | SIX | 222. 111. 2011 09-13
    KRIS | SSS | 1558. 13. 2011 09-13
    ANNA | DDD | 7486 | 0     | 2011 09-12
    TOM | DDD |     4853 | 111. 2011 09-12
    JERRY | DDD | 6402 | 112. 2011 09-12
    JACK | DDD | 957. 113. 2011 09-15
    JACK | DDD | 11445.     368. 2011-09-19

    I have the problem.
    I need to aggregate all that data by name column, so each name must be a single line, x must be added, there must be added and in name of family and birthday column, the values can be taken randomly. In the finall I have a line with a name containing summed values of x and y column and the name of family and_birthday values can be picked at random. Examle how he shoul look for KRIS ROW:

    KRIS | SIX | 546. 163. 2011 09-13

    For KRIS SURNAME column value six was taken randomly from the SIX values, x and did the amount and value for the BIRTH_DAY column was taken at random dates 12-09-2011 and 2011-09-13.

    I have no idea how I can do it.
    May I ask for help?

    Edited by: user13520646 2011-10-10 09:17

    (not tested)

    select name, min(surname), sum(x) , sum(y), min(birth_day)
     from table_name_not_provided
    group by name;
    
  • Smoothing the rough lines? (Details in the post)

    Hi all. Thanks in advance I spill the details.

    I hand draw my art. After the scan it, I use the trace function in Illustrator with a value of 2 usually, blur then pull upward in Photoshop to touch up the lines.

    My dilemma is: how to smooth out the lines in my designs? What I did with SOME success is from the return PSD file in Illustrator, make some blur again, then back to Psalm

    In addition, I have attached a sample of a scanned drawing. If you guys/girls have a better and more simple way to smooth out the lines, I'm all ears.Scan0001.jpg

    Thank you!

    Howdy.

    Beautiful technique, Noel.

    Chewingcow: I don't know what you want to do with your image. If you need a line made without much editable, technical Christmas looks great. But if you want maximum editability, jump to Ps and learn to do it in Illustrator. If you check the forums Adobe Illustrator, the limitations of automatic Trace are a frequent topic. If the results you get need a trip to the Ps to get cleaned up, you might reconsider using Auto Trace. The big dogs world Illy always recommend to avoid Auto Trace and recommend instead followed by hand, using the pen tool. More you do it, you get faster. Of course, Illy has simple tools to create the geometric pieces.

    I know not how much you know about Illy, but in the time it takes to move back from Illy to Ps, you could probably recreate it from scratch in Illustrator. And have a fully editable and extremely scalable vector image.

    I made tracing below using the pen, with the exception of a circle tool, which I did with the Oval tool. It took only a few minutes.

    I kept going, and 20 minutes later, the drawing is converted to outlines. Twenty minutes is not a long time your art to speak. Especially when you consider where this 20 minutes gets you. From there, the rest is gravy.

    The foregoing has a stroke applied to paths. But if you want it to look more hand drawn, you can apply a brush instead of a stroke. There are tons of brushes in Illy, and it's easy to create your own. You can apply a brush that makes lines look smooth or rough. With a single mouse click, the image above looks like the image below. It seems tougher than the original. You can make it look like it was drawn with a pencil or a pen of calligraphy if you want.

    Or you can apply the color. Mouse over just a few clicks. One of the bazillion of opportunities.

    It is well worth your while to vectorize your art in Illustrator. It allows the same artwork as anything a business card for a T-shirt to a wrap of the car at a billboard of output. PS, not so much. There is a reason that illustrator is called Illustrator and Photoshop called Photoshop.

    But, if you really want to use Ps (this is the Ps forum, after all), I used to scan stuff hand drawn in Ps all the time. But I've rarely analysed in full compositions as in your example. I scanned in pieces and assembled with other art created in PS. My process is quite simple.

    I used the quick selection tool to select the Africa.

    Then, using the palette traced, I converted the selection to a vector using the command create a track work with tolerance set to 1.5. I usually put it entre.8 and 2, depends on the resolution of the image and a contrast. Fill and stroke have been applied. The form is not quite perfect (image of low resolution, blurry drawing are less accurate quick selection tool. The sharper your drawing, the better it works.), but it can be changed by using the vector tools in PS. I add Madagascar to the layer of Africa and organize other forms in appropriate laters. Build the image in this way, you get maximum editability. Not as good as Illustrator, but I made this way for years before I'm Illy.

    For what it's worth.

    Peace,

    Lee

  • How to give users a group of line access to a voice mailbox using Cisco CM 8.5?

    Users who are part of the group line not to see when a message is left on the phone. Is there a way to associate the Group of curves with their voicemails?

    In the unit, it is called replacement extension.  This is the same problem solved by someone else

    https://supportforums.Cisco.com/discussion/11527831/MWI-alternate-extension

Maybe you are looking for

  • Thunderbird crashes on some messages - how to read these messages?

    Two colleagues of an organization in particular I sent emails a day. Whenever I try to open, Thunderbird crashes and I can not read the messages. They sent me new messages later--and I have no problem of their opening. The accident report ID is bp-70

  • My default PDF program is Nitro but when I download a PDF file fails

    When I download a PDF file it comes up with the following message...C:\DOCUME~1\ADMINI~1\Locals~1\Temp\FXP8560MFPD-1.PDF could not be opened, because the associated helper application does not exist. Changing the association in your preferences. Wher

  • Photosmart C410A: HP Solution Center install on 2 PCs for the same printer

    I have two PCs running Windows 7 Professional 64 - bit and a HP Photosmart C410A printer, wireless connections to my network.  The solution Center has worked well on the first PC, it was installed on.  I tried to install it on my new PC, but I get an

  • Activate the webcam R61

    Hello I have a lenovo R61 and I can't use my webcam. I check on my config and I install the drivers, I just integrated camera on the list in my configuration. I try freewarelike webcam Yawcam and my camera's av webcam capture. How to activate and use

  • 0x8000000a error code

    I put in my SD card, what worked yesterday, and I get the 0x8000000a error code and I can't see my pictures.  I can see photos of my other SD cards.  What should I do?