Column line

Hi team

I have a table T1 with structure below

role Total State country

IND Doc 05 AP

SIS IND AP 10

IND DOC 07 HP

SIS IND HP 10

IND HP Wat 02

Doc Amr RN 09

SIS Amr RN 14

Wat Amr RN 01

I need a result like this

country state Doc sis wat

IND, 05 10 00 AP

HP 07 10 02 IND

AMR 09 14 01 RN

Can anyone help on this please. I use Oracle 10 g.

Thank you

11081985

Hello

This is called swivel.  In Oracle 10, you can do it like this:

SOME countries, State

SUM (CASE WHEN SUPERIOR (role) total = 'DOC' THEN END) AS doc

SUM (CASE WHEN HIGHER (role) = 'SIS' THEN total) SIS

SUM (CASE WHEN SUPERIOR (role) total = "WAT" THEN END) AS wat

FROM t1

GROUP BY country, State

;

Suppose total is a NUMBER, it does not assume that something is unique.

Depending on your data and your needs, you can use MIN or MAX instead of the SUM,

Starting Oracle 11, there is a clause PIVOT, that you can use in SELECT statements, but I do not think that this would make this simple problem.

Tags: Database

Similar Questions

  • Calculate the values of a SharePoint workflow status Page column lines

    On the workflow status page, how can I have a column with a value in the column lines?  My workflow page lists commands that are in the workflow.  I wish there was a column where the value of each PO, displays a running total of the PO rises before him.

    Hello

    It is not a community forum for issues of SharePoint. Please post to the appropriate

    Forum on MSDN SharePoint.

    http://social.msdn.Microsoft.com/forums/SharePoint/en-us/home

    Don

  • Question to the first image in a clickable column/line

    Hello

    I hope someone can help. I created a page in lines and columns. All images are a hyperlink in each cell. For some reason, the first image of each line is not clickable, while the rest of them are. I've been in the Inspector, and I can't find the problem. http://store.skeeterz71.com/

    Thank you

    First photo not clickable

    not-clickable.jpg

    Clickable second photo

    clickable.jpg

    There is no need for you to get all hostile. I appreciate you pointing me in the right direction...

  • Conversion of column line

    CREATE TABLE TEST_PLC

    (

    NUMBER OF "PRCS_ID."

    VARCHAR2 (20 BYTE) "LIC_ID."

    "SEQ" VARCHAR2 (1 BYTE),

    "PLCY' VARCHAR2 (10 BYTE)

    );

    INSERT INTO TEST_PLC (PRCS_ID, LIC_ID, SEQ, PLCY) VALUES (123456, 'XXXX' ", '1', ' A1212");

    INSERT INTO TEST_PLC (PRCS_ID, LIC_ID, SEQ, PLCY) VALUES (123456, 'XXXX' ", '2', ' B1678');

    INSERT INTO TEST_PLC (PRCS_ID, LIC_ID, SEQ, PLCY) VALUES (123456, 'XXXX', 'C1876',' 3');

    INSERT INTO TEST_PLC (PRCS_ID, LIC_ID, SEQ, PLCY) VALUES (678956, 'XXXX' ", '1', ' C1888");

    INSERT INTO TEST_PLC (PRCS_ID, LIC_ID, SEQ, PLCY) VALUES (345678, "YYYY" ", '1', ' A1101");

    INSERT INTO TEST_PLC (PRCS_ID, LIC_ID, SEQ, PLCY) VALUES (345678, "YYYY" ", '2', ' C1765");

    INSERT INTO TEST_PLC (PRCS_ID, LIC_ID, SEQ, PLCY) VALUES (456789, 'ZZZZ' ', '1', ' A2222");

    INSERT INTO TEST_PLC (PRCS_ID, LIC_ID, SEQ, PLCY) VALUES (989898, 'ZZZZ' ', '1', ' A3322");

    INSERT INTO TEST_PLC (PRCS_ID, LIC_ID, SEQ, PLCY) VALUES (989898, 'ZZZZ' ', '2', ' B3352');

    commit;

    I have a table as above and I want to fill new table as my results below.

    PRCS_ID is an indicator only, I want to do PLCY line to column based on seq as PLCY1, PLCY2, PLCY3, PLCY4, PLCY5 columns (I have upto seq 5 max)

    Expected results


    PRCS_IDLIC_IDPLCY1PLCY2PLCY3PLCY4PLCY5
    123456XXXXA1212B1678C1876
    678956XXXXC1888
    456789AAAAA1101C1765
    456789ZZZZA2222
    989898ZZZZA3322B3352


    I checked some of the examples and try to use PIVOT work as I am on 11g but not able to get the desired result. It is required to use the sum function, but I have no column amount in my paintings.

    Maybe I used the wrong function.

    Please help to solve one.

    Hello

    Here's one way:

    SELECT *.

    OF test_plc

    PIVOT (MIN (plcy)

    FOR seq IN (1 AS plcy1

    2 UNDER plcy2

    3 AS plcy3

    4 AS plcy4

    5 AS plcy5

    )

    )

    ORDER BY lic_id, prcs_id

    ;

    Thanks for the display of the data of the sample; It is very useful.

  • How to manage the pause embedded inside the CSV column line

    Hello

    I'm under pressure to make it work. I've already put this question on the forum of the APEX, but on reflection, I think that it relates more to PL/SQL rather than APEX APEX 4.1 having already utility to manage the Upload of CSV.
    If you already read in the forum of the APEX, please ignore.
    I'm sorry for that. Thanks for reading.

    I need to develop an application that allows the user to upload a CSV file to a table of interface.
    The APEX version on my workplace is 4.0.2.
    I used the code of
    http://dbswh.webhop.NET/HTMLDB/f?p=blog:read:0:article:11000346061523
    It all works fine until recently I find
    If a column in a CSV file cotain a break line (or line spacing) for example (the tester copy and paste this text which has a line break on a column in a spreadsheet)

    It is the first sentence.
    It is the second sentence.

    It will break the 'it's the second sentence In a new column.

    The contents of the CSV read next to Notepad as below
    Date of assessment, Date, assessment provider, name of the assessor, Court, first name, middle name, last name, PRN person record, NHI number, assisted defendant Y/N number, is dependent on O/N, Notes, primary of ethnicity, "the ethnic origin other, please specify", gender, currently in treatment O/N, another Substance, Substance of concern 5 specified
    22/09/2012, Co name of the provider, Warren Edgley, Wellington, sale, 2545554, dgsdf,, 'is the first sentence.
    It's the second sentence. ', Japanese, woman, b.

    This is the CSV UTIL code, please help me how can I replace the line break to a space so that the download process is correct.
      CREATE OR REPLACE PACKAGE BODY "CSV_UTIL" 
    AS
         --strip the beginning and the end quotes, then replace double quotation with single 
       FUNCTION de_quote (p_str IN VARCHAR2, p_enc_by IN VARCHAR2)
          RETURN VARCHAR2
       IS
       v_str VARCHAR2(32767) := p_str;
       BEGIN
          IF (p_enc_by IS NULL)
          THEN
             RETURN p_str;
          ELSE
            
            IF SUBSTR(p_str,-1) = p_enc_by THEN
               v_str := SUBSTR(p_str,1,LENGTH(p_str)-1);
            END IF;
            IF SUBSTR(p_str,1,1) = p_enc_by THEN
               v_str := SUBSTR(v_str,2);
            END IF;  
            RETURN REPLACE (v_str,
                             p_enc_by || p_enc_by,
                             p_enc_by
                            );
          END IF;
       END de_quote;
    
       PROCEDURE parse (p_str IN VARCHAR2, p_enc_by IN VARCHAR2, p_sep IN VARCHAR2)
       IS
          l_n          NUMBER   DEFAULT 1;
          l_in_quote   BOOLEAN  DEFAULT FALSE;
          l_ch         NCHAR (1);
          l_len        NUMBER   DEFAULT NVL (LENGTH (p_str), 0);
       BEGIN
          IF (l_len = 0)
          THEN
             RETURN;
          END IF;
    
          g_words := g_empty;
          g_words (1) := NULL;
    
          FOR i IN 1 .. l_len
          LOOP
             l_ch := SUBSTR (p_str, i, 1);
    
             IF (l_ch = p_enc_by)
             THEN
                l_in_quote := NOT l_in_quote;
             END IF;
    
             IF (l_ch = p_sep AND NOT l_in_quote)
             THEN
                l_n := l_n + 1;
                g_words (l_n) := NULL;
             ELSE
                g_words (l_n) := g_words (l_n) || l_ch;
             END IF;
          END LOOP;
    
          g_words (l_n) := de_quote (g_words (l_n), CHR(10));
          g_words (l_n) := de_quote (g_words (l_n), CHR(13));
          FOR i IN 1 .. l_n
          LOOP
             g_words (i) := de_quote (g_words (i), p_enc_by);
          END LOOP;
       END parse;
    
    /*
    
    Author: Oleg Lihvoinen
    Company: DbSWH
    
    Changes:
    10.02.2011, There was a miscalculation of the file line last position in case it is the end of file
    
    */
    
    
       PROCEDURE upload (p_file_name VARCHAR2, p_collection_name VARCHAR2, p_enc_by IN VARCHAR2, p_sep_by IN VARCHAR2, p_rows NUMBER)
       IS
          v_blob_data    BLOB;
          v_clob_data    CLOB;
          v_clob_len     NUMBER;
          v_position     NUMBER;
          v_char         NCHAR (1);
          c_chunk_len    NUMBER           := 1;
          v_line         VARCHAR2 (32767) := NULL;
          v_data_array   vcarray;
          v_rows         NUMBER           := 0;
          n_seq          NUMBER           := 1;
          dest_offset    NUMBER           := 1;
          src_offset     NUMBER           := 1;
          amount         INTEGER          := DBMS_LOB.lobmaxsize;
          blob_csid      NUMBER           := DBMS_LOB.default_csid;
          lang_ctx       INTEGER          := DBMS_LOB.default_lang_ctx;
          warning        INTEGER;
          l_sep          VARCHAR2(100)    := CASE WHEN p_sep_by = '\t' THEN chr(9) ELSE p_sep_by END;
       BEGIN
          htmldb_collection.create_or_truncate_collection
                                          (p_collection_name      => p_collection_name);
    
          -- Read blob from wwv_flow_files
          SELECT blob_content
            INTO v_blob_data
            FROM wwv_flow_files
           WHERE NAME = p_file_name;
    
          v_position := 1;
          DBMS_LOB.createtemporary (lob_loc      => v_clob_data,
                                    CACHE        => TRUE,
                                    dur          => DBMS_LOB.SESSION
                                   );
          DBMS_LOB.converttoclob (v_clob_data,
                                  v_blob_data,
                                  amount,
                                  dest_offset,
                                  src_offset,
                                  blob_csid,
                                  lang_ctx,
                                  warning
                                 );
          v_clob_len := DBMS_LOB.getlength (v_clob_data);
          IF v_clob_len = 0 THEN
             RETURN;
          END IF;
          
          WHILE (v_position <= v_clob_len + 1)
          LOOP
             v_char := DBMS_LOB.SUBSTR (v_clob_data, c_chunk_len, v_position);
             v_line := v_line || v_char;
             v_position := v_position + c_chunk_len;
    
             -- When the whole line is retrieved and not end of file or end of file
             IF v_char = CHR (10) AND v_position < v_clob_len OR v_position = v_clob_len + 1
             THEN
               
                parse (p_str => v_line, p_enc_by => p_enc_by, p_sep => l_sep);
                v_data_array := g_words;
                FOR i IN 1..g_words.count LOOP
                
                   IF i <= 50 THEN
                   
                      v_data_array(i) := g_words(i);
                   ELSE
                      exit;
                   END IF;
                
                END LOOP;
                
                FOR i IN g_words.count + 1..50 LOOP
                   
                   v_data_array(i) := null;
    
                END LOOP;            
                v_rows := v_rows + 1;
                -- exit if uploaded specified number of rows
                IF p_rows IS NOT NULL AND v_rows > p_rows THEN
                   EXIT;
                END IF;
                -- Store data to collection
                n_seq :=
                   htmldb_collection.add_member
                                         (p_collection_name      => p_collection_name,
                                          p_c001                 => v_data_array
                                                                               (1),
                                          p_c002                 => v_data_array
                                                                               (2),
                                          p_c003                 => v_data_array
                                                                               (3),
                                          p_c004                 => v_data_array
                                                                               (4),
                                          p_c005                 => v_data_array
                                                                               (5),
                                          p_c006                 => v_data_array
                                                                               (6),
                                          p_c007                 => v_data_array
                                                                               (7),
                                          p_c008                 => v_data_array
                                                                               (8),
                                          p_c009                 => v_data_array
                                                                               (9),
                                          p_c010                 => v_data_array
                                                                               (10),
                                          p_c011                 => v_data_array
                                                                               (11),
                                          p_c012                 => v_data_array
                                                                               (12),
                                          p_c013                 => v_data_array
                                                                               (13),
                                          p_c014                 => v_data_array
                                                                               (14),
                                          p_c015                 => v_data_array
                                                                               (15),
                                          p_c016                 => v_data_array
                                                                               (16),
                                          p_c017                 => v_data_array
                                                                               (17),
                                          p_c018                 => v_data_array
                                                                               (18),
                                          p_c019                 => v_data_array
                                                                               (19),
                                          p_c020                 => v_data_array
                                                                               (20),
                                          p_c021                 => v_data_array
                                                                               (21),
                                          p_c022                 => v_data_array
                                                                               (22),
                                          p_c023                 => v_data_array
                                                                               (23),
                                          p_c024                 => v_data_array
                                                                               (24),
                                          p_c025                 => v_data_array
                                                                               (25),
                                          p_c026                 => v_data_array
                                                                               (26),
                                          p_c027                 => v_data_array
                                                                               (27),
                                          p_c028                 => v_data_array
                                                                               (28),
                                          p_c029                 => v_data_array
                                                                               (29),
                                          p_c030                 => v_data_array
                                                                               (30),
                                          p_c031                 => v_data_array
                                                                               (31),
                                          p_c032                 => v_data_array
                                                                               (32),
                                          p_c033                 => v_data_array
                                                                               (33),
                                          p_c034                 => v_data_array
                                                                               (34),
                                          p_c035                 => v_data_array
                                                                               (35),
                                          p_c036                 => v_data_array
                                                                               (36),
                                          p_c037                 => v_data_array
                                                                               (37),
                                          p_c038                 => v_data_array
                                                                               (38),
                                          p_c039                 => v_data_array
                                                                               (39),
                                          p_c040                 => v_data_array
                                                                               (40),
                                          p_c041                 => v_data_array
                                                                               (41),
                                          p_c042                 => v_data_array
                                                                               (42),
                                          p_c043                 => v_data_array
                                                                               (43),
                                          p_c044                 => v_data_array
                                                                               (44),
                                          p_c045                 => v_data_array
                                                                               (45),
                                          p_c046                 => v_data_array
                                                                               (46),
                                          p_c047                 => v_data_array
                                                                               (47),
                                          p_c048                 => v_data_array
                                                                               (48),
                                          p_c049                 => v_data_array
                                                                               (49),
                                          p_c050                 => v_data_array
                                                                               (50)                                                                           
                                         );
             
                -- Clear the line
                v_line := NULL;
             END IF;
          END LOOP;
       END;
    END;
    In my applications, I save these lines in a table rather than a collection of APEX because the number of columns can contain greater than 50.
    I want to know how can replace these newline within a column to a space.
    If anyone has any ideas, please let me know.

    Thank you very much in advance.
    Ann
  • Dynamics of the columns/line data adds forms (11.1.1.3) v/s (11.1.2.1)

    Hi all
    There was once an option in Hyperion planning 11.1.1.3 Dynamic add lines in the data form. I don't see this option in planning 11.1.2.1?
    Could you please suggest how we can grant the right to users to add dynamic add rows and columns in the form of data? or it's possible in 11.1.2.1?
    users want to have a feature of adding line in data forms (forms of planning)

    Thank you

    Published by: 842804 on August 17, 2011 12:49

    Do you mean 11.1.2 If Yes, then the ad hoc forms really take over to add lines they add many more features.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Dynamics of the columns/line data adds forms (11.1.1.3) v/s (11.1.1.2)

    Hi all
    There was once an option in Hyperion planning 11.1.1.3 Dynamic add lines in the data form. I don't see this option in planning 11.1.1.2?
    Could you please suggest how we can grant the right to users to add dynamic add rows and columns? or it is possible in 11.1.1.2

    Thank you

    What about ad-hoc analyses? Reading this: http://download.oracle.com/docs/cd/E17236_01/epm.1112/hp_user/ch04s02s03.html

    See you soon,.
    Mehmet

  • How to convert the column lines

    I need to convert my output lines of sql for the column as a pivot to 11g

    Please give me the example of this

    check out this link

    http://nimishgarg.blogspot.com/2010/06/Oracle-pivot-data-rows-to-columns.html

    request for 10g would be

    Select *.
    (select job,
    Sum (decode(DEPTNO,10,SAL)) dept10,
    Sum (decode(DEPTNO,20,SAL)) dept20,
    Sum (decode(DEPTNO,30,SAL)) dept30,
    Sum (decode(DEPTNO,40,SAL)) dept40
    from scott.emp
    Working Group)
    order by 1;

  • Pivot column lines - 10g

    Hello

    I need pivot 1-6 rows of columns. I don't know the number of lines until the SQL is executed, but the number of rows in pivot will be consistent for a performance.

    The example below is rotating in two rows.

    Any suggestions?

    Thanks in advance for your help,

    Lou

    Entry
    CITY STATE DATE NBR
    California, Los Angeles 28 February 09 540
    California, Los Angeles March 31 09 719
    California at San Diego 28 February 09 779
    California at San Diego 31 March 09 956
    California at San Francisco 28 February 09 368
    California San Francisco 31 March 09 341


    Desired result
    CITY STATE DATE DATE NBR NBR
    California, Los Angeles 28 February 09 540 31 March 09 719
    California at San Diego 28 February 09 779 31 March 09 956
    California at San Francisco 28 February 09 368 31 March 09 341
    select state,city, substr( string, 2 ) as dt_nbr,nbr
    from your_table--t
    model
    return updated rows
    partition by ( state,city )
    dimension by ( row_number() over (partition by state,city ORDER BY dt ) as rn )
    measures (dt, max(dt)over(partition by 1) max_dt,cast( dt as varchar2(4000) ) as string,nbr )
    rules
    upsert
    iterate( 1000 )
    until ( presentv(string[iteration_number+2],1,0) = 0 )
    ( string[0] = string[0] || ' ' || string[iteration_number+1],
    nbr[0]  = case when max_dt[iteration_number+1]=dt[iteration_number+1] then nbr[iteration_number+1] end
      )
    order by state,city
    /
    
    SQL> with t as ( select 'California' STATE , 'Los Angeles'CITY ,to_date( '28-02-2009','dd-mm-yyyy')
    dt , 540  NBR from dual union all
      2  select 'California', 'Los Angeles' ,to_date( '31-03-2009','dd-mm-yyyy'), 719 from dual union al
    l
      3  select 'California','San Diego' ,to_date( '28-02-2009','dd-mm-yyyy'), 779 from dual union all
      4  select 'California','San Diego', to_date( '31-03-2009','dd-mm-yyyy'), 956 from dual union all
      5  select 'California' ,'San Francisco', to_date( '28-02-2009','dd-mm-yyyy'), 368 from dual union
    all
      6  select 'California','San Francisco' ,to_date( '31-03-2009','dd-mm-yyyy'), 341 from dual )
      7  select state,city, substr( string, 2 ) as dt_nbr,nbr
      8  from t
      9  model
     10  return updated rows
     11  partition by ( state,city )
     12  dimension by ( row_number() over (partition by state,city ORDER BY dt ) as rn )
     13  measures (dt, max(dt)over(partition by 1) max_dt,cast( dt as varchar2(4000) ) as string,nbr )
     14  rules
     15  upsert
     16  iterate( 1000 )
     17  until ( presentv(string[iteration_number+2],1,0) = 0 )
     18  ( string[0] = string[0] || ' ' || string[iteration_number+1],
     19  nbr[0]  = case when max_dt[iteration_number+1]=dt[iteration_number+1] then nbr[iteration_number
    +1] end
     20    )
     21  order by state,city
     22  /
    
    STATE      CITY          DT_NBR                                                    NBR
    ---------- ------------- -------------------------------------------------- ----------
    California Los Angeles   02-28-2009 03-31-2009                                     719
    California San Diego     02-28-2009 03-31-2009                                     956
    California San Francisco 02-28-2009 03-31-2009                                     341
    
    SQL>  
    
  • Returns the value of column line

    Greetings!  I currently have a request we will tell

    SELECT value, period FROM MAS_CFUS_KEYACM_CONTROLDATA ORDER BY cf_keyword_ID

    RESULTS

    Period value

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

    100.0002 1 JANUARY 14

    -35.68 1 DECEMBER 14

    -1943.67 NOVEMBER 1, 14

    678.0013 OCTOBER 1, 14

    This continues for about 15 results by cf_keyword_ID.

    I'm looking to return the VALUE first in a new column called PREV1, the second value of PREV2, third in PREV3 and so on.  The same goes for the dates.  And all this for only the first 10 values of each cf_keyword_ID.  Can anyone suggest the best way to achieve this?

    Thank you!!

    Hello

    This is called pivoting.  Because I don't have a copy of your table test, I'll use scott.emp to illustrate.

    This shows the first 3 employees for each job, in order by hiredate, along with their hiredates:

    WITH relevant_data AS

    (

    SELECT ename, job, hiredate

    row_number () taken OVER (PARTITION OF work

    ORDER BY hiredate

    ) AS r_num

    FROM scott.emp

    )

    SELECT *.

    OF relevant_data

    PIVOT (MIN (ename) AS ename

    MIN (hiredate) AS hiredate

    FOR r_num (1, 2, 3)

    )

    ORDER BY job

    ;

    Output:

    WORK 1_ENAME 1_HIREDATE 2_ENAME 2_HIREDATE 3_ENAME 3_HIREDATE

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

    ANALYST FORD 3 December 1981 SCOTT April 19, 1987

    The CLERK SMITH December 17, 1980, 3 December 1981 JAMES MILLER January 23, 1982

    MANAGER JONES 2 April 1981 BLAKE 1 May 1981 CLARK June 9, 1981

    PRESIDENT KING November 17, 1981

    SELLER ALLEN 20 February 1981 WARD 22 February 1981 TURNER 08-Sep-1981

    There are actually more than 3 SECRETARIES and SALESMEN.  Which does not cause an error; the only first 3 are shown.

    As you can see, having less of 3 does not cause any errors, either.

    For more info on pivots, see the FAQ of the Forum:

    Re: 4. How can I convert rows to columns?

    I hope that answers your question.

    If this isn't the case, please post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and also publish outcomes from these data.

    Explain, using specific examples, how you get these results from these data.

    If yod post rather a problem using scott.emp, then you need not display the sample data; just results and explanations.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum:

    Re: 2. How can I ask a question in the forums?

  • How can I see my column lines in a textbox control in Indesign CC?

    OK, I am confused and tired of searching it me:

    I made a TextBox with 2 columns in it. It would really help if I can see the space between the columns to place a few guides, but I can't seem to find an option to show only.

    This used to be a right standard, or am I crazy?

    Anyone where I can turn on this feature? I hope I'm clear on what I want.

    Best regards, Liek

    Hello.

    By default, you should see the gap column:

    You see your outer edge of the frame?

    Otherwise, choose View > Extras > show/hide the contours of the block.

    Of course, you must be in Normal display mode...

  • Column lines

    Hello

    I want to get the column values in the row.
    create table sample(id number(10),phone_number number(10),fax_no number(10));
    /
    insert into sample(1,23456678,23123);
    /
    insert into sample(2,2345,21345);
    /
    I need output like this for my requirement.
    id   phone_type             number
    1    phone_number        23456678
    1    fax_no               23123
    2    phone_number        2345
    2    fax_no               21345
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
    select id, 'phone_number' phone_type , phone_number num from sample
    union all
    select id, 'fax_no' phone_type, fax_no num from sample
    order by 1;
    

    Published by: hm on 03.09.2012 22:06

    I changed the alias column for the column numlast, because the number is a reserved word.

    You can also use 'NUMBER' as alias for column (with the quotes). But I advice not to use reserved words as column alias.

  • the sum of the column lines based on distinct values of column B

    Hi all
    Here is my xml
    rowset <>
    < ROW >
    < ORDER_NO > 103-4385509 < / ORDER_NO >
    < SITE_NO > 103 < / SITE_NO >
    < ORDER_ID > 4385509 < / ORDER_ID >
    < CUSTOMER_ID > 2676832 < / CUSTOMER_ID >
    < TAX_AMOUNT >.33 < / TAX_AMOUNT >
    < CREATED_DATE > 20/08/2010 < / CREATED_DATE >
    < USER_CREATED > TSDAL671 < / USER_CREATED >
    < Delivery_Method > CARRY OUT STORE < / Delivery_Method >
    < Entered_By > TSDAL671 < / Entered_By >
    < SKU_NO > 321182 < / SKU_NO >
    < NAME_TEXT > MGR_OVERRIDE < / NAME_TEXT >
    < > 319 ATTRIBUTE_ID < / ATTRIBUTE_ID >
    Override < ATTRIBUTE_VALUE > done < / ATTRIBUTE_VALUE >
    < DETAIL_SEQ_NO > 1 < / DETAIL_SEQ_NO >
    < / ROW >
    < ROW >
    < ORDER_NO > 103-4385509 < / ORDER_NO >
    < SITE_NO > 103 < / SITE_NO >
    < ORDER_ID > 4385509 < / ORDER_ID >
    < CUSTOMER_ID > 2676832 < / CUSTOMER_ID >
    < TAX_AMOUNT >.33 < / TAX_AMOUNT >
    < CREATED_DATE > 20/08/2010 < / CREATED_DATE >
    < USER_CREATED > TSDAL671 < / USER_CREATED >
    < Delivery_Method > CARRY OUT STORE < / Delivery_Method >
    < Entered_By > TSDAL671 < / Entered_By >
    < SKU_NO > 321182 < / SKU_NO >
    < NAME_TEXT > OEDTL_TAX_INFO < / NAME_TEXT >
    < > 314 ATTRIBUTE_ID < / ATTRIBUTE_ID >
    < ATTRIBUTE_VALUE > 441130760 | 441130760 | 441130760 | 1. 1. 1. 20100820 | 2676832 | 2. SPARE PARTS | < / ATTRIBUTE_VALUE >
    < DETAIL_SEQ_NO > 1 < / DETAIL_SEQ_NO >
    < / ROW >
    < ROW >
    < ORDER_NO > 103-4385509 < / ORDER_NO >
    < SITE_NO > 103 < / SITE_NO >
    < ORDER_ID > 4385509 < / ORDER_ID >
    < CUSTOMER_ID > 2676832 < / CUSTOMER_ID >
    < TAX_AMOUNT >.18 < / TAX_AMOUNT >
    < CREATED_DATE > 20/08/2010 < / CREATED_DATE >
    < USER_CREATED > TSDAL671 < / USER_CREATED >
    < Delivery_Method > CARRY OUT STORE < / Delivery_Method >
    < Entered_By > TSDAL671 < / Entered_By >
    < SKU_NO > 412679 < / SKU_NO >
    < NAME_TEXT > OEDTL_TAX_INFO < / NAME_TEXT >
    < > 314 ATTRIBUTE_ID < / ATTRIBUTE_ID >
    < ATTRIBUTE_VALUE > 441130760 | 441130760 | 441130760 | 1. 1. 1. 20100820 | 2676832 | 2. 0035 | < / ATTRIBUTE_VALUE >
    < DETAIL_SEQ_NO > 2 < / DETAIL_SEQ_NO >
    < / ROW >


    I have to display 3 lines but all the sum of TAX_AMOUNT grouped by ORDER_ID, I need sum for 2 records based on the distinct value of DETAIL_SEQ

    so my output should be something like below

    ORDER_ID | TAX_AMOUNT | DETAIL_SEQ | ATTRIBUTE_ID
    -----------------------------------------------------------------------------
    4385509 | 0.33 | 1. 319
    4385509 | 0.33 | 1. 314
    4385509 | 0.18 | 2. 314
    --------------------------------------
    SUM = 0.51
    ------------------------------------------


    Note: I can't make separate in the sql attribute_id is different for the same DETAIL_SEQ_NO.


    I tired to do <? sum ([xdoxslt:distinct_values (current - group () / DETAIL_SEQ_NO)] / TAX_AMOUNT)? >

    It did not work.

    Can someone help me please!



    Thanks in advance!

    This syntax will not work.

    A method to do so.

     
    
          
     
    
     
    
    
    
  • Download the column lines

    Hello
    I have this structure
    CREATE TABLE TEST (col CLOB);
    
    INSERT INTO TEST (col) VALUES (' <432 pers example 1
      ref 1234545 
      title 1
      pers example 2
      title 2
      ref kljfsdng');
    If run select...
    API> select * from test;
    
    COL
    ---------------------------
     <432 pers example 1
      ref 1234545
      title 1
      pers example 2
      title 2
      ref kl
    
    
    Transcurrido: 00:00:00.40
    A single line.

    I want lines where the substring "PREP."
    So my output would be:
    COL
    ---------------------------
     <432 pers example 1
      pers example 2
    Two lines, one for each line.

    Thank you.

    You mean like this?

    SQL> ed
    Wrote file afiedt.buf
    
      1  select rn, row_txt
      2  from (
      3    select rn, regexp_substr(col, '[^'||CHR(13)||CHR(10)||']+', 1, rn) as row_txt
      4    from test, (select rownum rn from test connect by rownum <= length(regexp_replace(col, '[^'||CHR(13)||CHR(10)||']'))+1)
      5    )
      6* where instr(row_txt,'pers') > 0
    SQL> /
    
            RN ROW_TXT
    ---------- --------------------------------------------------------------------------------
             1  <432 pers example 1
             4   pers example 2
    
    SQL>
    
  • config file error could not open the file column line 0 0

    Games worked very well... went out of town for two weeks, now receive above error when you try to open the games.

    Any help is appreciated.

    I also discovered the same question and was lucky enough to happen across this FIX somehow. It instantly fixed the issue.

    http://www.WildTangent.com/gamesapp?DP=hpipg

    Some files have been deleted, or maybe even. I couldn't find the files as indicated when looking in my files. IT WILL WORK! Good luck!

Maybe you are looking for