Cross tab report with a Twist

Here's a puzzle. The table on the cross tab below should display text values in row 2, column 2 and not a sum. In addition, there are several values for each column, and they need to be under another. For example, let's say that the desired output is as follows:

Industry - 2005 - 2004 - 2003
Society 1-10-30-25
-------------------------20---------50----------0
Company 2 - 12 - 0-15

'0' cells may simply include white, that's all that is needed.

Here's the RTF cross code table tab:
Cell 1.1 {noformat} <? horizontal-break-table: 1? > {noformat}
Cell 1.2 {noformat} <? for-each-group@column:results;. / YEAR? > <? YEAR? > <? end for each group -? > {noformat}
Cell 2.1 {noformat} <? for-each-group: RESULTS; / INDUSTRY? > <? variable@InContext:G1;current-group()? > <? INDUSTRY? > {noformat}
Cell 2, 2 {noformat} <? for each group-@cell://RESULTS;. / YEAR? > <? for - each:current-group()? > <? ($G1[(./YEAR=current()/YEAR)]/SALES)? > <? end foreach? > <? end for each group -? > <? end for each group -? > {noformat}

However, this does not have the expected results. It displays this, which is not correct:

Industry - 2005 - 2004 - 2003
Society 1-10-30-25
-------------------------10---------30---------25
-------------------------10---------0-----------0
Company 2 - 12 - 0-15
-------------------------12---------0----------15
-------------------------12---------0-----------0

The following XML code:

rowset <>
< RESULTS >
The <>Company INDUSTRY 1 < / INDUSTRY >
< YEAR > 2005 < / YEAR >
< > 10 SALES < / SALES >
< / RESULTS >
< RESULTS >
The <>Company INDUSTRY 1 < / INDUSTRY >
< YEAR > 2005 < / YEAR >
< > 20 SALES < / SALES >
< / RESULTS >
< RESULTS >
The <>Company INDUSTRY 1 < / INDUSTRY >
< YEAR > 2004 < / YEAR >
< > 30 SALES < / SALES >
< / RESULTS >
< RESULTS >
The <>Company INDUSTRY 1 < / INDUSTRY >
< YEAR > 2004 < / YEAR >
< SALES > 50 < / SALES >
< / RESULTS >
< RESULTS >
The <>Company INDUSTRY 1 < / INDUSTRY >
< YEAR > 2003 < / YEAR >
< > 25 SALES < / SALES >
< / RESULTS >
< RESULTS >
<>company 2 < / INDUSTRY >
< YEAR > 2005 < / YEAR >
< > 12 SALES < / SALES >
< / RESULTS >
< RESULTS >
<>company 2 < / INDUSTRY >
< YEAR > 2003 < / YEAR >
< > 15 SALES < / SALES >
< / RESULTS >
< / LINES >

Any ideas? Thank you very much!

Give you a few points: 0)

Tags: Business Intelligence

Similar Questions

  • Cross tab report vertical display?

    Is it possible for a cross-tab (or another format of report template RTF) to achieve this?

    The only problem with our cross tab report is that the data should be grouped by day. This is the format we want to achieve:

    Employee - MON - TUE - sea
    John - 08:15 - 08:15 - 11:00
    -12:15 PM - 08:15-16:00
    -01:15 PM - 08:15-17:00
    -17:30 PM - 08:15-19:30
    Mary - 10:00 - 08:15 - 10:00
    -14:15 PM - 11:15 - 14:15
    -15:15 PM - 12: 15 - 15:15
    -19:30 PM - 17:15-19:30

    In this way, each watch used (John and Mary) time, they started to work and below the time they went on their lunch break below that time back from lunch break and below the time they finished the work.

    With a report of the cross we tab get these results:


    Employee - Monday - TUES - Wednesday - Thurs
    John - 08:15 - 12:15 - 13:15-17:30
    Mary - 10:00 - 14:15 15:15 PM - 19:30

    The data goes across the row instead of to the bottom. John 12:15 time lunch should appear directly above the time of 08:15 that he begins to work as in the first example.

    Suggestions for a report on the cross tab (or any other type of format) to display data like that?

    Thank you very much! :)

    OK, I got it, bit of hacking, and I got the result you wanted... old skool crosstabbing

    ! http://blogs.Oracle.com/xmlpublisher/images/CTab2.jpg!

    The fields are

    ! http://blogs.Oracle.com/xmlpublisher/images/CTab3.jpg!

    He writes for a blog next week...

    RTF model available here [http://blogs.oracle.com/xmlpublisher/files/ToughCrossTab.rtf]

    Tim

  • Trying to understand what he in @incontext: average when you create a variable in a cross tab report.

    Try to understand the cross tab reports.

    I'm looking at 3 different examples.  I have a question about something I see on 2 examples.

    Example 1.
    http://2.BP.blogspot.com/_F24IZvIkLOI/SrpSl8JSEBI/AAAAAAAAAlQ/ETt_kB3dIew/S1600-h/IKE.jpg
    <? for each group -: / EXPENSE_REPORT/EXPENSE_ITEMS; / DATE? >
    <? variable@InContext:G1;current-group()? > <? DATE of? >


    Example 2.
    http://technology.AMIS.nl/2007/01/30/XML-Publisher-building-a-matrix-report-sqllims/

    <? for-each-group@section:row;. / SAMPLE_ID? >
    <? sort: SAMPLE_ID; ' ascending '; data-type = "text"? >
    <? SAMPLE_ID? >
    <? variable@InContext:SAM_ID; SAMPLE_ID? >

    My question is..? variable@InContext: creates a variable but what incontext means?

    Sound in the two examples.

    Both create variables but and in example 2 explains the variable SAM_ID will hold the sample_id for this group.

    My question is why - what is needed?

    Thank you

    Howard

    -is to define a variable 'G1' and him assigning the value of the field Current - group (). The @incontext command maintains the variable located inside the loop... (you can not update but you can simply reference or re - declare)

    You can insert a field (BI Publisher menu - field and select a field from your xml file) and then double click on and click on properties of Word-> help add some text and then edit (delete the existing code or modify the code to what it must be)

    Thank you

    ~ KKT ~.

  • SORTING FOR THE FIELD OF COMPUTING IN CROSS TAB REPORT

    LIST_G_AUCTION_TITLE >
    < G_AUCTION_TITLE >
    < BID_NUMBER > 5002 < / BID_NUMBER >
    < AUCTION_TITLE > E2E-01 Construction RFQ < / AUCTION_TITLE >
    C2631 < ITEM_NUMBER > < / ITEM_NUMBER >
    < ITEM_DESCRIPTION > 4G, 000, 000, 0STRUC, X, SPECIAL STRUCTURE < / ITEM_DESCRIPTION >
    < ESTIMATED_QTY > 1 < / ESTIMATED_QTY >
    LS < UNIT > < / UNIT >
    < QUOTE_PRICE > 400 < / QUOTE_PRICE >
    < ESTIMATED_QUOTE_PRICE > 400 < / ESTIMATED_QUOTE_PRICE >
    < PROVIDER > X - L CONTRACTING < / PROVIDER >

    My xml data in this format, I have created a relationship of the cross for ITEM_DESCRIPTION line and SUPPLIER as the column tab and calculated a sum (ESTIMATED_QUOTE_PRICE)
    for all ITEM_DESCRIPTION for each PROVIDER in templete. now, I need to sort the data by sum (ESTIMATED_QUOTE_PRICE) from the lowest to the more than left to right, which is the supplier with the lowest sum (ESTIMATED_QUOTE_PRICE) should display first from left to right.

    can anyone help thanks in advance.

    Hi Sandy,

    Thought, you would do the rest :)
    Neway, sent you an update.

  • Cross tab reports

    Hello
    I have a unique requirement. I a particular part number, quantity available date wise. Now, I also want to show the sum of the amounts on monthly and semi-annual too. This is the desired output. I tried with the grouping of different methods, but I'm not able to do. All of the data comes from a single table.

    Topic... * Jan allotment *... 4 - Jan... 11 - Jan... * allocation of February *... 1 - fen... 8 - February... * 1 H 2010 Total *...
    ABCD................ 9...............5.........4...............7.............3.........4.............16......................
    CDEF................ 11..............6.........5...............10...........5.........5.............21......................
    EFGH................ 9...............5.........4...............7.............3..........4............16......................

    I can generate the data without monthly or half annual group.
    Someone please guide me how to do this.

    Here is an example of XML data

    -< T03405180 >
    -< LIST_G_BUILD_HALF_YEAR >
    -< G_BUILD_HALF_YEAR >
    < BUILD_HALF_YEAR > 2 < / BUILD_HALF_YEAR >
    < BUILD_MONTH > Dec < / BUILD_MONTH >
    < BUILD_MONTH_NUM > 12 < / BUILD_MONTH_NUM >
    < BUILD_DATE > 9 December 09 < / BUILD_DATE >
    PC01500 < MDL > < / MDL >
    < > 14 QTY < / QTY >
    < / G_BUILD_HALF_YEAR >
    -< G_BUILD_HALF_YEAR >
    < BUILD_HALF_YEAR > 2 < / BUILD_HALF_YEAR >
    < BUILD_MONTH > Dec < / BUILD_MONTH >
    < BUILD_MONTH_NUM > 12 < / BUILD_MONTH_NUM >
    < BUILD_DATE > 10 December 09 < / BUILD_DATE >
    MA02500 < MDL > < / MDL >
    < > 2 QTY < / QTY >
    < / G_BUILD_HALF_YEAR >
    -----------------------
    -----------------------

    Thank you
    Vishalaksha

    Hi Vishalaksha,

    Envoy put sample to date, with the logic of the half-year.

  • Cross tab with several expandable columns

    Hi all

    I develop a cross tab report... is my example of xml file
    <? XML version = "1.0" encoding = "UTF-8"? >
    rowset <>
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > Call - Back-Office < / DD_CODE >
    < NOTE_DATE > 12 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > Call - Back-Office < / DD_CODE >
    < NOTE_DATE > 11 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > Call - Back-Office < / DD_CODE >
    < NOTE_DATE > 14 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > Call - Back-Office < / DD_CODE >
    < NOTE_DATE > 112 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > Call - monitoring < / DD_CODE >
    < NOTE_DATE > 121 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > Call - monitoring < / DD_CODE >
    < NOTE_DATE > 122 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > Call - monitoring < / DD_CODE >
    < NOTE_DATE > 131 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > Call - monitoring < / DD_CODE >
    < NOTE_DATE > 111 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    Visit Site < DD_CODE > - Back-Office < / DD_CODE >
    < NOTE_DATE > 11 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    Visit Site < DD_CODE > - Back-Office < / DD_CODE >
    < NOTE_DATE > 143 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    Visit Site < DD_CODE > - Back-Office < / DD_CODE >
    < NOTE_DATE > 122 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    Visit Site < DD_CODE > - Back-Office < / DD_CODE >
    < NOTE_DATE > 111 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    Visit Site < DD_CODE > - monitoring < / DD_CODE >
    < NOTE_DATE > 1432 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    Visit Site < DD_CODE > - monitoring < / DD_CODE >
    < NOTE_DATE > 112 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    Visit Site < DD_CODE > - monitoring < / DD_CODE >
    < NOTE_DATE > 121 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    Visit Site < DD_CODE > - monitoring < / DD_CODE >
    < NOTE_DATE > 123 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > visit - WDE Office < / DD_CODE >
    < NOTE_DATE > 123 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > visit - WDE Office < / DD_CODE >
    < NOTE_DATE > 1321 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > visit - WDE Office < / DD_CODE >
    < NOTE_DATE > 1312 < / NOTE_DATE >
    < / ROW >
    < ROW >
    Product < NAME > < / NAME >
    < DATE > 2008 - 05-01 T 00: 00:00.000 - 05:00 < / DATE >
    < TYPE_CODE > < / TYPE_CODE >
    < MOST_RECENT_NOTE_DATE > 1 < / MOST_RECENT_NOTE_DATE >
    < DD_CODE > visit - WDE Office < / DD_CODE >
    < NOTE_DATE > 211 < / NOTE_DATE >
    < / ROW >
    < / LINES >

    If I use the cross-tab Wizard... I get the following output...
    -------------Call - Back Office-------Call - Monitoring-------Site Visit - Back Office-------Site Visit -Monitoring-----Visit - WDE Office
    product              12                      121                       11                                    1432                   123
    
    but I'm looking for output like...
    
    -------------Call - Back Office-----Call - Monitoring------Site Visit - Back Office------Site Visit -Monitoring-------Visit - WDE Office
    product-------12 11 14 112-----------121 122 131 111----------11 143 122 111------------------1432 112 121 123 ---------123 1321 1312 211
    The figures in each column are dynamic... I might have 2,3,4... (In this case, all are four)... I looked at the link below, but he had static 2 repeat columns... but in my case, the columns of repetition are unknown...
    http://winrichman.blogspot.com/2008/09/crosstab-with-multiple-repeating.html
    Is is possible to build a cross- like this tab... ?
    Thanks in advance...

    Hello
    Email me at colectionaru at gmail dot com
    I'll watch your xml and post a solution here.

    Kind regards
    Colectionaru

  • How to create Cross Tab using Desktop

    Hello world

    We use Sundard banner (universities) with discoverer.

    I would like to create a cross-tab


    | Final note
    |_______________________________
    Title of the course.
    |
    |


    Valid values of rank are: HP - honors
    H - honors
    P past

    Suppose that we had 3 students for the class: emergency medicine
    George Washington - HP
    John Adams - HP
    Abraham Lincoln - H

    Want a query to look like this:


    | HP | H | P
    |_________ |_____|_________________
    Emergency medicine | 2. 1
    |
    |

    Is this possible using Desktop, pls advise... thx, Sandra

    Hello

    Yes, you should be able to create a cross tab report in Discoverer Desktop, select the title of the course, the final score and the counter of the students. Then put the title of the course on the final quality left on top and the County as your data point.

    Rod West

  • Cross Tab with group by period

    Good afternoon

    I wonder if some can help me with this query, I am writing?

    The cross-tab is for columns 1 to 31, representing the days of the month, sum of the quantity of an article sold.

    In addition the company description.

    I would then finish with 3 entrances in the results for each company, but these are for the sum of the quantity of items in the following periods: -.

    Breakfast: 01:00 - 10:00
    Lunch: 11:00 - 14:00
    Dinner: 17:00 - 22:30

    Yes, the company is closed for the missing periods, for example 10:00-11:00 & 14:00 to 17:00.

    Test case:
    CREATE TABLE COMPANIES
      (
        "ID"            NUMBER(9,0),
        "CODE"          NUMBER(8,0),
        "DESCRIPTION"   VARCHAR2(40 CHAR),
        CONSTRAINT "PK_COMPANIES" PRIMARY KEY ("ID")
      );
    
    INSERT INTO COMPANIES VALUES (1,1,'COMPANY A');
    INSERT INTO COMPANIES VALUES (2,2,'COMPANY B');
    INSERT INTO COMPANIES VALUES (3,3,'COMPANY C');
    
    
    CREATE TABLE CUSTOMERS
      (
        "ID"                     NUMBER(9,0),
        "CODE"                   VARCHAR2(30 CHAR),
        "CARD_NUM"               VARCHAR2(30 CHAR),
        "DESCRIPTION"            VARCHAR2(40 CHAR),
        "COMPANY_ID"                   NUMBER(9,0),
        CONSTRAINT "PK_CUSTOMERS" PRIMARY KEY ("ID")
      );
    
    INSERT INTO CUSTOMERS VALUES (1,'001','001','A CUSTOMER', 1);
    INSERT INTO CUSTOMERS VALUES (2,'002','002','A CUSTOMER', 2);
    INSERT INTO CUSTOMERS VALUES (3,'003','003','A CUSTOMER', 3);
    INSERT INTO CUSTOMERS VALUES (4,'004','004','A CUSTOMER', 1);
    INSERT INTO CUSTOMERS VALUES (5,'005','005','A CUSTOMER', 2);
    INSERT INTO CUSTOMERS VALUES (6,'006','006','A CUSTOMER', 1);
    
    
    CREATE TABLE ARTICLES
      (
        "ID"                     NUMBER(9,0),
        "CODE"                   VARCHAR2(20 CHAR),
        "DESCRIPTION"            VARCHAR2(40 CHAR),
        CONSTRAINT "PK_ARTICLES" PRIMARY KEY ("ID")
      );
    
    INSERT INTO ARTICLES
      VALUES (1,'001', 'A Meal');
    
    
    
    CREATE TABLE TRANSACTIONS
      (
        "ID"          NUMBER(9,0),
        "TILL_ID"     NUMBER(9,0) NOT NULL ENABLE,
        "SHOP_ID"     NUMBER(9,0) NOT NULL ENABLE,
        "OPERATOR_ID" NUMBER(9,0),
        "TRANS_NUM"   NUMBER(5,0) NOT NULL ENABLE,
        "SPLIT_NUM"   NUMBER(5,0),
        "TRANS_DATE" DATE NOT NULL ENABLE,
        "TOTAL_AMOUNT"      NUMBER(12,2) NOT NULL ENABLE,
        "BOOKKEEPING_DATE" DATE NOT NULL ENABLE,
        "CARD_NUM"           VARCHAR2(30 CHAR),
        CONSTRAINT "PK_TRANSACTIONS" PRIMARY KEY ("ID")
      );
    
    INSERT INTO TRANSACTIONS VALUES (1,1,1,1,1,NULL,to_date('27.04.2011 10:30:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'001');
    INSERT INTO TRANSACTIONS VALUES (2,1,1,1,1,NULL,to_date('27.04.2011 10:31:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'002');
    INSERT INTO TRANSACTIONS VALUES (3,1,1,1,1,NULL,to_date('27.04.2011 10:32:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'003');
    INSERT INTO TRANSACTIONS VALUES (4,1,1,1,1,NULL,to_date('27.04.2011 10:33:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'004');
    INSERT INTO TRANSACTIONS VALUES (5,1,1,1,1,NULL,to_date('27.04.2011 10:34:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'005');
    INSERT INTO TRANSACTIONS VALUES (6,1,1,1,1,NULL,to_date('27.04.2011 10:35:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'006');
    INSERT INTO TRANSACTIONS VALUES (7,1,1,1,1,NULL,to_date('27.04.2011 14:30:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'001');
    INSERT INTO TRANSACTIONS VALUES (8,1,1,1,1,NULL,to_date('27.04.2011 14:31:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'002');
    INSERT INTO TRANSACTIONS VALUES (9,1,1,1,1,NULL,to_date('27.04.2011 14:32:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'003');
    INSERT INTO TRANSACTIONS VALUES (10,1,1,1,1,NULL,to_date('27.04.2011 14:33:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'004');
    INSERT INTO TRANSACTIONS VALUES (11,1,1,1,1,NULL,to_date('27.04.2011 14:34:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'005');
    INSERT INTO TRANSACTIONS VALUES (12,1,1,1,1,NULL,to_date('27.04.2011 14:35:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'006');
    INSERT INTO TRANSACTIONS VALUES (13,1,1,1,1,NULL,to_date('27.04.2011 22:00:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'001');
    INSERT INTO TRANSACTIONS VALUES (14,1,1,1,1,NULL,to_date('27.04.2011 22:01:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'002');
    INSERT INTO TRANSACTIONS VALUES (15,1,1,1,1,NULL,to_date('27.04.2011 22:02:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'003');
    INSERT INTO TRANSACTIONS VALUES (16,1,1,1,1,NULL,to_date('27.04.2011 22:03:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'004');
    INSERT INTO TRANSACTIONS VALUES (17,1,1,1,1,NULL,to_date('27.04.2011 22:04:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'005');
    INSERT INTO TRANSACTIONS VALUES (18,1,1,1,1,NULL,to_date('27.04.2011 22:05:05', 'DD.MM.YYYY HH24:MI:SS'),0.01,to_date('27.04.2011', 'DD.MM.YYYY'),'006');
    
    CREATE TABLE TRANS_ARTICLES
      (
        "TRANSACTION_ID"        NUMBER(9,0) NOT NULL ENABLE,
        "ARTICLE_ID"            NUMBER(9,0) NOT NULL ENABLE,
        "QTY_WEIGHT"            NUMBER(10,3) NOT NULL ENABLE,
        "PRICE"                 NUMBER(10,2) NOT NULL ENABLE,
        CONSTRAINT "PK_TRANS_ARTICLES" PRIMARY KEY ("TRANSACTION_ID")
      )
    
    INSERT INTO TRANS_ARTICLES VALUES (1,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (2,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (3,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (4,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (5,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (6,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (7,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (8,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (9,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (10,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (11,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (12,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (13,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (14,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (15,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (16,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (17,1,1,0.01);
    INSERT INTO TRANS_ARTICLES VALUES (18,1,1,0.01);
    With similar results to: -.
    1     Company A - 01:00 10:00     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     1     0     0     0     0
    1     Company A - 11:00 14:00     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     1     0     0     0     0
    1     Company A - 17:00 22:30     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     3     0     0     0     0
    2     Company B - 01:00 10:00     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     1     0     0     0     0
    2     Company B - 11:00 14:00     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     2     0     0     0     0
    2     Company B - 17:00 22:30     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     2     0     0     0     0
    This is the Group of periods which is I don't know how to do.

    Thank you & best regards,

    Andrew

    Hello

    Here's a way to do it:

    WITH     all_time_slots     AS
    (
         SELECT  '01:00 - 11:00' AS label,  1 / 24 AS start_time, 11 / 24 AS end_time     FROM dual
         UNION ALL
         SELECT  '12:00 - 15:00',       12 / 24,               15 / 24          FROM dual
         UNION ALL
         SELECT  '17:00 - 23:30',          17 / 24,               23.5 / 24          FROM dual
    )
    ,     all_days     AS
    (
         SELECT     LEVEL     AS day_of_month
         FROM     dual
         WHERE     LEVEL     IN (1, 27, 31)          --     *****  FOR TESTING ONLY  *****
         CONNECT BY     LEVEL     <= 31
    )
    ,     inner_joins     AS
    (
         SELECT       EXTRACT  (DAY  FROM  tr.bookkeeping_date)     AS day_of_month
         ,       tr.trans_date
         ,       ta.qty_weight
         ,       cu.company_id
         FROM       articles            ar
         JOIN       trans_articles       ta  ON   ta.article_id     = ar.id
         JOIN       transactions              tr  ON   tr.id          = ta.transaction_id
         JOIN       customers            cu  ON   cu.card_num          = tr.card_num
               WHERE       ar.description       = 'A Meal'
               AND       tr.bookkeeping_date  >= DATE '2011-04-01'
         AND       tr.bookkeeping_date  <  DATE '2011-05-01'
    )
    ,     unpivoted_data     AS
    (
         SELECT       co.description
         ,       ad.day_of_month
         ,       NVL (ij.qty_weight, 0)     AS weight_0
         ,       ts.label
         FROM            companies       co
         CROSS JOIN        all_time_slots  ts
         CROSS JOIN       all_days       ad
         LEFT OUTER JOIN       inner_joins       ij   ON   ij.company_id     = co.id
                                              AND  ij.day_of_month     = ad.day_of_month
                                              AND  ij.trans_date - TRUNC (ij.trans_date)
                                                                 BETWEEN  ts.start_time
                                                        AND          ts.end_time
    )
    SELECT       *
    FROM       unpivoted_data
    PIVOT       (     SUM (weight_0)
           FOR     day_of_month     IN
                (      1     AS day_1
              ,     27     AS day_27
              ,     31     AS day_31
              )
           )
    ORDER BY  description
    ,            label
    ;
    

    Ouput, given the example of data that you changed it about an hour ago:

    DESCRIPTION LABEL              DAY_1     DAY_27     DAY_31
    ----------- ------------- ---------- ---------- ----------
    COMPANY A   01:00 - 11:00          0          3          0
    COMPANY A   12:00 - 15:00          0          3          0
    COMPANY A   17:00 - 23:30          0          3          0
    
    COMPANY B   01:00 - 11:00          0          2          0
    COMPANY B   12:00 - 15:00          0          2          0
    COMPANY B   17:00 - 23:30          0          2          0
    
    COMPANY C   01:00 - 11:00          0          1          0
    COMPANY C   12:00 - 15:00          0          1          0
    COMPANY C   17:00 - 23:30          0          1          0
    

    Sorry, I'm short on time right now.  I'll try to post an explanation in 4 hours approximately.
    See my next post for an explanation.

    Published by: Frank Kulash, 28 April 2011 21:29

  • When I run mozilla or open a link in a new window but I get the page you want to load an additional page of the new tab opens with it, the difficulty?

    When I launch mozilla or open a link in a new window I get the page you want to load but an additional page of the new tab opens with her. I tried to change my homepage to different things (new tab, firefox home, see the blank page) but I always get a new additional tab to open. How can I get only one page to open it?

    Hello

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.

    Note: This will make you lose all the Extensions and preferences.

    • Sites Web open is not recorded in less than 25 versions of Firefox.

    To reset Firefox, perform the following steps:

    For Firefox versions prior to 29,0:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the "Reset Firefox" line

      button.

    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    For Firefox 29,0 and above:

    1. Click the menu button

      click Help

      and select troubleshooting information.

    Now, should open a new tab containing your troubleshooting information.

    1. At the top right of the page, you should see a button that says "Reset Firefox"

      . Click on it.

    2. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    3. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

    Thank you.

  • Mozilla firefox 25.0 tab opens with error on URL res://ieframe.dll/unknownprotocol.htm#chrome-extension://kcnhkahnjcbndmmehfkdnkjomaanaooo/widget.html any idea?

    Mozilla firefox 25.0 tab opens with error on URL res://ieframe.dll/unknownprotocol.htm#chrome-extension://kcnhkahnjcbndmmehfkdnkjomaanaooo/widget.html any idea?

    In my view, it is an extension of google voice, but I don't have chrome installed on my PC

    Windows XP SP3 machine.

    Hello

    Sometimes a problem with Firefox can be a result of malware installed on your computer, you may not be aware of.

    You can try these free programs to search for malicious software that work with your existing anti-virus software:

    Microsoft Security Essentials is a good permanent antivirus for Windows 7/Vista/XP, if you do not already have one.

    More information can be found in the article troubleshooting Firefox problems caused by malware .

    This solve your problems? Please report to us!

    I hope this helps!

    Curtis

  • Error: Could not find the validation report with ID: 87

    I wrote a validation rule in FDM as below, attached this rule to the place. Once I have import data, validate, export and click Check, the system throws an error message stating "error: found no validation report with ID: 87. Not sure what needs to be done.

    The rule I wrote is 520000 ~ ~ > = 0
    This rule says that if the amount 520000 account is greater than zero, then only load it. otherwise, generate a report.

    Any suggestions?

    You must ensure that you have imported the Reports.xml file in the application of FDM. In addition, you want to connect to the application using the established customer and click on the reports tab and expand the English > reports check and do a right-click on the control of report and choose "set as Validation report.

  • cross tab using sql

    Hello

    I'm using the version of oracle 11g.

    I have a requirement where I have to produce a cross-tab as explained below. Please help me write a SQL query to do this. Thank you very much.


    Sample data:
    ------------------
    Customer             product type
    --------------------------------------------
    AAA                           DVD
    AAA                           Tape
    BBB                           Tape
    CCC                                 DVD
    CCC                           Bluray
    DDD                           DVD
    DDD                           Tape
    DDD                           Bluray
    Logic
                                                                                    
         AAA                                              BBB                         CCC                         DDD          
         DVD     Tape     Bluray                    DVD     Tape     Bluray               DVD     Tape     Bluray               DVD     Tape     Bluray
    DVD          1                    DVD                         DVD               1          DVD          1     
    Tape     1                         Tape          1               Tape                         Tape     1          1
    Bluray                              Bluray                         Bluray     1                    Bluray          1     
    Final Output
    No. of customers who purchased the products across all product types
                        
         DVD     Tape     Bluray               
    DVD          2     1               
    Tape     2     1     1               
    Bluray     1     1                    
    Scripts:
    -------------------------
    create table cust_product(customer varchar2(5), product_type varchar2(10));
    
    insert into cust_product values('AAA','DVD');
    insert into cust_product values('AAA','Tape');
    insert into cust_product values('BBB','Tape');
    insert into cust_product values('CCC','DVD');
    insert into cust_product values('CCC','Bluray');
    insert into cust_product values('DDD','DVD');
    insert into cust_product values('DDD','Tape');
    insert into cust_product values('DDD','Bluray');

    Hello

    858747 wrote:
    ... Sample data:
    ------------------

    Customer             product type
    --------------------------------------------
    AAA                           DVD
    AAA                           Tape
    BBB                           Tape
    CCC                                 DVD
    CCC                           Bluray
    DDD                           DVD
    DDD                           Tape
    DDD                           Bluray
    

    ...
    Final output
    N ° of guests who have purchased products for all types of product

    `     DVD     Tape     Bluray
    DVD          2     1
    Tape     2     1     1
    Bluray     1     1                    
    

    Sorry, I don't follow the logic. Try to explain in words, with specific examples.
    Doesn't have 2 separate clients, 'CCC' and 'DDD', buy 'DVD' and 'Bluray '? Why aren't the results

    `     DVD     Tape     Bluray
    DVD          2     2
    Tape     2     1     1
    Bluray     2     1                    
    

    with 2 in the corners?

    Assuming it was just error, you can do something like this:

    WITH     got_pairs     AS
    (
         SELECT       a.product_type               AS product_a
         ,       NVL (b.product_type, a.product_type)     AS product_b
         FROM            cust_product     a
         LEFT OUTER JOIN     cust_product     b  ON  a.customer     = b.customer
                                AND     a.product_type != b.product_type
    )
    SELECT       *
    FROM       got_pairs
    PIVOT       (     COUNT (*)
           FOR     product_b
           IN     ( 'DVD'
              , 'Tape'
              , 'Blueray'
              )
           )
    ORDER BY  CASE  product_a
              WHEN  'DVD'     THEN  1
              WHEN  'Tape'     THEN  2
              WHEN  'Bluray'     THEN  3
           END
    ;
    

    This assumes that the combination (customer, product_type) is unique, as in your example of data., and that only product_types is 3 in your sample data.
    If these assumptions are not true, then after a few revised sample data and results, which show what you want in these cases.

    Sorry, I don't have an Oracle 11 database now to test this.
    I can (and has) test the outer join, which combines a product_type with him that if he can not be combined with any other thing.

    Using a technique of 11 pivot before Oracle, the following works:

    WITH     got_pairs     AS
    (
         SELECT       a.product_type               AS product_a
         ,       NVL (b.product_type, a.product_type)     AS product_b
         FROM            cust_product     a
         LEFT OUTER JOIN     cust_product     b  ON  a.customer     = b.customer
                                AND     a.product_type != b.product_type
    )
    SELECT       product_a     AS product_type
    ,       COUNT (CASE WHEN product_b = 'DVD'    THEN 1 END)     AS dvd
    ,       COUNT (CASE WHEN product_b = 'Tape'   THEN 1 END)     AS dvd
    ,       COUNT (CASE WHEN product_b = 'Bluray' THEN 1 END)     AS dvd
    FROM       got_pairs
    GROUP BY  product_a
    ORDER BY  CASE  product_a
              WHEN  'DVD'     THEN  1
              WHEN  'Tape'     THEN  2
              WHEN  'Bluray'     THEN  3
           END
    ;
    

    Note that the got_pairs of the subquery is identical in the two motions.

    Thanks for posting the CREATE TABLE and INSERT statements; It's very useful!

    Published by: Frank Kulash, may 29, 2011 16:05
    Oracle 9 append query.

  • possible to encapsulate cross tab on the same page, rather than on the next page?

    Hello

    I'm working on a report on the cross tab in .rtf. I noticed that when there are more columns that can fit on a page, the prosecution is carried out on a new page. Is it possible to have continued to perform on the next 'line' under the first instead of on the next page?

    Thank you

    JK

    It's here :)

    http://winrichman.blogspot.com/2009/05/cross-tab-by-limiting-number-of-colums.html

  • Tabular report with more than one line by line

    Hello

    I designed a sort of Gallery page, a tabular report with only two small columns per line: a thumbnail from a BLOB column and link textual branching to a page showing the full size image with a bunch of textual information on this subject.

    As you can guess I look at the title of the topic, my concern is to display more than one (say 3 or 4) this line by line, in order to avoid a very long 'portrait' page with a lot of white space on the left and right.

    Is there a (not too complicated) way to do it? I might design a special model (?), but I'm not very used to style sheets and stuff.

    Thanks in advance.

    André

    Re: report columns of the SQL query for a couple of ways to do this.

    As your main concern is to maximize the use of horizontal space, custom report template/CSS approach would seem more appropriate, as the number of columns is not resolved.

    It is also possible to do using CSS inline-block property and given that it is now feasible cross-browser and less side effects and potential problems that the use of floats is probably the way to go.

  • When I click on the sign more to open a new tab. The tab opens with bing pg and I hate bing. How can I stop thiis doesn't happen.

    When I click on the sign more to open a new tab. The tab opens with bing pg and I hate bing. How can I stop thiis doesn't happen. I can find nothing to help even had a computer tech friend check.

    Looks like your pref browser.newtab.url has been changed.

    This extension will reset some prefs to the value default - browser.newtab.url - is covered. See "on this add-on" for more details.
    https://addons.Mozilla.org/en-us/Firefox/addon/SearchReset/

    It will run automatically and then disappear.

Maybe you are looking for

  • FAILURE ID 90C7W-5TC72S-MFGH5A - 60DR 03

    I have had this error coming up... hard Disk1, I can't run the test computerized quotes, self-financing not work.it returns me the defect number above ID... can u help me, what can I do?

  • HP mini computer enter current password

    I need help with my hp mini. He had a black screen with the current password. He was for a long time, that I didn't know I had a password. Then it says fatal error password verification failed... arrested system. CNU9204S3RCan someone please

  • Reference Dell optiplex 320 running windows xp lost all sounds

    Recently, I lost all sound, I tried to uninstall & reinstall my audio drivers but continues to come up with the error code 39, when I try to reinstall or update the drivers It is also in place with the wizard is unable to find a better match for your

  • I got a fix, but the file does not open correctly. __

    I received this fix: http://hotfixv4.microsoft.com/Windows%20Vista/sp3/Fix291684/6000/free/395073_intl_i386_zip.exe The self-extracting file does not open correctly.  Any thoughts on how to get this to work?

  • Replacement X 220 HDD with SSD?

    Hi people, 1 can you replace the built in hard drive on a X 220 with a SSD? 2. If possible, where can I find instructions on how to do it? 3. If possible, should be a tiny philips screwdriver - where can we got such a tool? TIA, SD