How to Transpose series of rows & columns to singular inline column?

Hi gang!
Looking to do the reverse of my previous post (here: http://discussions.apple.com/message.jspa?messageID=9355192#9355192).
Specifically, looking to transpose from many rows & columns to 1 inline column...
from:
A1 A2 A3 A4 A5 A6 A7
B1 B2 B3 B4 B5 B6 B7
to:
A1
A2
A3
A4
A5
A6
A7
B1
B2
B3
B4
B5
B6
B7
For a whole set of data (over 330 rows of 7 columns)!
A function for doing the inverse was graciously provided in the previous post, but am stuck as to how to reverse it!
Previous (from 1 column to many):
INDEX(TRANSPOSE('Table_Src' :: B2:H2),7,1*(ROW()-2)+COLUMN()-1)
becomes... (from many to 1 column)
Anyone with ideas? Found the Function guide only more confusing! :O

I would use this simple script:
--[SCRIPT] on run
set {rname, tName, sName, dName, colNum1, rowNum1, colNum2, rowNum2} to my getSelParams()
tell application "Numbers" to tell document dName to tell sheet sName to tell table tName
set liste to {}
repeat with r from rowNum1 to rowNum2
repeat with c from colNum1 to colNum2
copy value of cell r of column c to end of liste
end repeat
end repeat
end tell
set liste to my recolle(liste, return)
set the clipboard to liste
end run
--=====
on getSelParams()
local r_Name, t_Name, s_Name, d_Name, col_Num1, row_Num1, col_Num2, row_Num2
set {r_Name, t_Name, s_Name, d_Name} to my getSelection()
if my parleAnglais() then
if r_Name is missing value then error "No sheet has a selected table."
else
if r_Name is missing value then error "Aucune feuille ne contient une table sélectionnée."
end if
set two_Names to my decoupe(r_Name, ":")
tell application "Numbers" to tell document d_Name to tell sheet s_Name to tell table t_Name
set col_Num1 to address of column of cell (item 1 of two_Names)
set row_Num1 to address of row of cell (item 1 of two_Names)
if item 2 of two_Names = item 1 of two_Names then
set {col_Num2, row_Num2} to {col_Num1, row_Num1}
else
set col_Num2 to address of column of cell (item 2 of two_Names)
set row_Num2 to address of row of cell (item 2 of two_Names)
end if
end tell -- _Numbers …
return {r_Name, t_Name, s_Name, d_Name, col_Num1, row_Num1, col_Num2, row_Num2}
end getSelParams
--=====
set {r_Name, t_Name, s_Name, d_Name} to my getSelection()
on getSelection()
local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
tell application "Numbers" to tell document 1
repeat with i from 1 to the count of sheets
tell sheet i
set x to the count of tables
if x > 0 then
repeat with y from 1 to x
try
(selection range of table y) as text
on error errMsg number errNum
set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
return {theRange, theTable, theSheet, theDoc}
end try
end repeat -- y
end if -- x>0
end tell -- sheet
end repeat -- i
end tell -- document
return {missing value, missing value, missing value, missing value}
end getSelection
--=====
on decoupe(t, d)
local l
set AppleScript's text item delimiters to d
set l to text items of t
set AppleScript's text item delimiters to ""
return l
end decoupe
--=====
on recolle(l, d)
local t
set AppleScript's text item delimiters to d
set t to l as text
set AppleScript's text item delimiters to ""
return t
end recolle
--=====
on parleAnglais()
local z
try
tell application "Numbers" to set z to localized string "Cancel"
on error
set z to "Cancel"
end try
return (z is not "Annuler")
end parleAnglais
--=====
--[/SCRIPT]
Select the range to transpose
Run the script
paste where you want.
Yvan KOENIG (from FRANCE lundi 4 mai 2009 15:17:08)

Similar Messages

  • How do you auto-size row height in a multi-column listbox with multiple lines?

    I have a multi-column listbox containing four columns. The fourth column is for notes, which will be of arbitrary length; they can get to be very lengthy. I want the cells in the "notes" column to have a constant width. When the width of the text is wider than the cell, I want the cell to automatically adjust its height and go to the next line so that all of the text is visible. For example,
    |<--CELL WIDTH-->|
     This is not the way ...I want the listbox cell to function.
     This is the way I
     want the listbox
     cell to function.

    Yeah, I looked at the responses for questions like mine. Most of them adjust the width of the column to fit the text, which is not what I want to do. I figured that I would have to programmatically insert new lines when the text gets too long, I just wanted to make sure that there wasn't an easier solution before I spend the time developing the code to do that since it will take some time. Thanks.

  • How to suppress a complete row when some of the columns are blank

    Hello,
    is it possible to suppress an entire row in the BEx Report where some of the columns contain no values. The report is in BW 3.5 version and is opened in the web browser. It contains only characteristics in the ROWS area of BEx Designer.
    Pls help. Thanks.
    SD

    Hi,
    You can wirte a condition on any keyfigure stating that KF1 > 0.So once that condiiton is active and if any column is blank then it will not display it.
    Pelase check out this link as well.
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/dd3841d132d92be10000000a1550b0/content.htm
    Hope it helps.
    Regards,
    AL

  • How to transpose the data records (rows) to column(lists) using apd

    Hi,
      how to transpose the data records (rows) to column (lists) using apd  in sap bw.
    I do not want to use abap routine.only use the transpose rows to list  transformation .
    Pls provide the step by step procedure .
    thanks,
    Nimai

    Save youe file to transpose as a csv and in the header row of your file for the columns you want to transpose you need to put some soer of a tag before the column name (ie your colum header was for a period budget will be something lie 2011001:ZFIBDD)
    1. You will need to create a new apd process (rsanwb)
    2. Insert a "Read from Data File" data source object and map it file (,csv)
    3. insert a transpose object into your apd process (middle row 4th one over in the transformations section)
    4. under the definition tab in the transformation object select all the columns that are to be transposed into rows and move them to the transformed area, the grouping fields section should contain the rows that you want to now be columns
    5.under the transformation tab enter in the seperator you selected  under the Field Name/Infoobject area (ie. ZFIBDD)
    6. under the details tab  you need to enter in all the fields to be transformed and tner the transposition field (ie ZFIBDD)
    7. Then you can insert a set of transformations and a DSO and link the newly transposed fields into that.
    hope that helps

  • How to transpose columns to rows in ODI

    Hi,
    I am trying to transpose Columns to rows along with Headers. For instance if i have
    Account Name | Assigned To | Lead Source | Currency | Onsite_April |Offisite_April2 | FCST AMC LIC April
    | | | | | |
    Microsoft | Mark | Channel1 | INR | 1000 | 2000 | 3000
    Then i need in the below way
    Account Name | Assigned To | Lead Source | Currency | Month | Amount
    | | | | |
    Microsoft | Mark | Channel1 | INR | Onsite_April | 1000
    Microsoft | Mark | Channel1 | INR | Offisite_April2 | 2000
    Microsoft | Mark | Channel1 | INR | FCST AMC LIC April | 3000
    Is there any specific function where i can achieve this?
    More over i need break up Month column into two i.e Onsite_April will be Onsite (in one column) April (in another column).

    Hi
    here is what i got by using the above KM
    create table cad_temp_1(item_id number, location_id number, sales_date_ud1 varchar2(100), qty_ud2 number);
    create table cad_temp_2(item_id number, location_id number, D01012010 number, D01022010 number);
    insert into cad_temp_2 values(1,1,200,300);
    commit;
    Source in interface is : cad_temp_2
    Target is: cad_temp_1
    Mapping is
    Item_id - Item_id execute on: CAD_TEMP_2 (Source selected) Update - Insert and Update checked
    Location_id - Location_id execute on: CAD_TEMP_2 (Source selected) Update - Insert and Update checked
    sales_date_ud1 - :NA execute on: <null> (Target selected) Update - Insert, Update, UD1 selected
    qty_ud2 - :NA execute on : <null> (Target selected) Update - Insert, Update, UD2 selected.
    Execute the interface
    It works.
    Thanks
    Bhaskar

  • How to transpose columns to rows in OBIEE

    Lets say I have a row of data with 3 columns as shown below.
    Col1 Col1 Col3
    Val1 Val2 Val3
    How can this be shown as 3 rows as below
    Col 1 Val1
    Col 2 Val2
    Col 3 Val2
    Thanks.

    Use the Narrative View
    Prefix: <table border=1>
    Narrative:
    <tr><td>Col1</d><td>@1</td></tr>
    <tr><td>Col2</d><td>@2</td></tr>
    <tr><td>Col3</d><td>@3</td></tr>
    Postfix:
    </table>
    Enjoy!

  • How to transpose Row to Column heading

    Hi,
    I have a table with following data.
    ID     COLUMN_NAME     COLUMN_DATA
    198     LAST_NAME     OConnell
    198     HIRE_DATE     6/21/1999
    198     JOB_ID     SH_CLERK
    198     FIRST_NAME     Donald
    198     DEPARTMENT_ID     50
    199     FIRST_NAME     Jennifer
    199     LAST_NAME     Whalen
    199     HIRE_DATE     9/17/1987
    199     JOB_ID     AD_ASST
    199     DEPARTMENT_ID     10
    I want to transpose the data in the field column_name as column heading and corresponding data in the field column_data as row under it.
    Thanks $ Regards
    Manisha

    If you have 11g, you can do this...
    With T As (
    select '198' ID ,'LAST_NAME' COLUMN_NAME ,'OConnell' COLUMN_DATA from dual union all
    select '198','HIRE_DATE','6/21/1999' from dual union all
    select '198','JOB_ID','SH_CLERK' from dual union all
    select '198','FIRST_NAME','Donald' from dual union all
    select '198','DEPARTMENT_ID','50' from dual union all
    select '199','FIRST_NAME','Jennifer' from dual union all
    select '199','LAST_NAME','Whalen' from dual union all
    select '199','HIRE_DATE','9/17/1987' from dual union all
    select '199','JOB_ID','AD_ASST' from dual union all
    select '199','DEPARTMENT_ID','10' from dual
    --End of sample data
    select ID,LAST_NAME,HIRE_DATE,JOB_ID,FIRST_NAME,DEPARTMENT_ID from T
    pivot (max(column_data) for
    column_name in ('LAST_NAME' as LAST_NAME,'HIRE_DATE' as HIRE_DATE,'JOB_ID' as JOB_ID,'FIRST_NAME' as FIRST_NAME,'DEPARTMENT_ID' as DEPARTMENT_ID))
    ID  LAST_NAME HIRE_DATE JOB_ID    FIRST_NAM DEPARTMEN
    198 OConnell  6/21/1999 SH_CLERK  Donald    50
    199 Whalen    9/17/1987 AD_ASST   Jennifer  10
    Elapsed: 00:00:00.00or if 10g or older
    With T As (
    select '198' ID ,'LAST_NAME' COLUMN_NAME ,'OConnell' COLUMN_DATA from dual union all
    select '198','HIRE_DATE','6/21/1999' from dual union all
    select '198','JOB_ID','SH_CLERK' from dual union all
    select '198','FIRST_NAME','Donald' from dual union all
    select '198','DEPARTMENT_ID','50' from dual union all
    select '199','FIRST_NAME','Jennifer' from dual union all
    select '199','LAST_NAME','Whalen' from dual union all
    select '199','HIRE_DATE','9/17/1987' from dual union all
    select '199','JOB_ID','AD_ASST' from dual union all
    select '199','DEPARTMENT_ID','10' from dual
    --End of sample data
    select * from (
    select id,
    max(decode(column_name,'LAST_NAME', COLUMN_DATA)) LAST_NAME,
    max(decode(column_name,'HIRE_DATE', COLUMN_DATA)) HIRE_DATE,
    max(decode(column_name,'JOB_ID', COLUMN_DATA)) JOB_ID,
    max(decode(column_name,'FIRST_NAME', COLUMN_DATA)) FIRST_NAME,
    max(decode(column_name,'DEPARTMENT_ID', COLUMN_DATA)) DEPARTMENT_ID
    from T group by id)
    order by ID
    PRAZY@11gR1> /
    ID  LAST_NAME HIRE_DATE JOB_ID    FIRST_NAM DEPARTMEN
    198 OConnell  6/21/1999 SH_CLERK  Donald    50
    199 Whalen    9/17/1987 AD_ASST   Jennifer  10
    Elapsed: 00:00:00.01Regards,
    Prazy
    Edited by: Prazy on Apr 5, 2010 3:32 PM
    Added sql for older versions

  • How do I delete multiple rows and columns in an image?

    I am looking into how digital SLRs extract video data from a CMOS sensor. To give an example, the GH1 from Panasonic can record video at 1920 x 1080 from a 12 MPixel sensor that, say, is 4000 horizontal x 3000 vertical. How they do that seems to be not in the public domain, but there have been a few guesses (see http://www.dvxuser.com/V6/showthread.php?t=206797 and http://luminous-landscape.com/forum/index.php?showtopic=38713).
    One approach would be to simply read every second row of sensor pixels (1500 rows read from the original 3000) and once you have those in memory, delete every second column (2000 columns left). You would end up with a 2000 x 1500 image which could then be resampled to 1920 x 1080.
    I'd like to simulate what the camera appears to be doing, by generating a 4000 x 3000 test image and then asking Photoshop CS4 to delete the appropriate rows and columns. It may not necessarily be every second row; the Canon 5DMk11 appears to read every third row, so I may need to delete two out of every three rows.
    Can Photoshop do that sort of thing? If so, how?

    Thanks for the suggestions. Yes, I did take a detailed look at your images, but they weren't 100% convincing because it wasn't clear just what was happening. And Adobe's explanation, after reading it again, explains nothing at all to someone who doesn't know how Nearest Neighbor works.
    But you are correct -- Nearest Neighbor does effectively delete pixels. I proved it with the attached 6 x 6 image of coloured pixels (the tiny midget image right after this full stop -- you'll have to go to maximum zoom in PS to see it).
    These are the steps to delete every second row and then every second column.
    1. Select Image > Image Size.
    2. Set Pixel Dimensions > Height to half the original (in this case set to 3 pixels).
    3. Set Resample Image to Nearest Neighbor.
    4. Click OK and the image shoould now consist of three vertical white strips and three vertical Green-Red-Blue stripes.
    5. Repeat steps 1-4, but this time set Pixel Dimensions > Width to half the original (in this case set to 3 pixels). The image should now consist of three horizontal stripes Green-Red-Blue.
    Just to make sure the method worked for every third pixel, I repeated the above steps but with 2 pixels instead of 3 and obtained the correct White-Green, White-Green pattern.
    I resampled the Height and Width separately for the test so that I could see what was happening. In a real example, the height and width can be changed at the same time in the one step, achieving the same results as above.
    Finally, how to explain how Nearest Neighbor works in the simple cases described above?
    Division by 2
    In the case of an exact division by two (pixels numbered from top leftmost pixel), only the even numbered rows and columns remain. To put it a different way, every odd numbered row and column are deleted.
    Division by 3
    Only rows and columns 2, 5, 8, 11... remain.
    Division by N
    Only rows and columns 2, 2+N, 2+2N, 2+3N... remain.
    To put it simply, a resample using Nearest Neighbor (using an exact integer multiple) keeps every Nth row and column, starting from number two. The rest are deleted.

  • How do I get the layout guides (A,B,C column headers and 1,2,3 Row Headers) to print with my spreadsheet?

    How do I get the Layout Guides (A,B,C column headers and 1,2,3 Row Headers) to print on my spreadsheet? They are invaluable for discussing the data with my clients over the phone.
    They appear while I am editing, but don't print with the spreadsheet. I know how to do it in Excel, but I am transitioning to Numbers. I can't imagine I have to type them into their own columns and rows. It must be a difference in vernacular that I can't find the solution in the User Guide. Can anyone help?

    Hi ktjobauer,
    Numbers is not Excel and Excel is not Numbers. Numbers is WYSIWYG (at least in File > Print and the actual printout).
    I can't imagine I have to type them into their own columns and rows.
    No, you don't. You can use the charm of Numbers to create cell references for your Excel clients.
    In this Numbers Table, I have added some extra Columns that you can hide later.
    Column B =COLUMN(A2)
    Column C =HLOOKUP(B2,'Table 1-1' :: $1:$2,2,FALSE)      [explanation later]
    Column D =ROW(B2)
    Column E =C2&D2
    Add those formulas to the first Body Row (below the Header Row) and Fill Down.
    Column C refers to another Table which you need only create once, to convert a Column number to a letter:
    and so on from 1-26, A-Z.
    You can move the second Table to another Sheet to hide it. Formulas will automatically adjust to keep the links between Sheets.
    Now in the first Table, select and Hide Columns B,C,D. Formulas will continue to work with hidden cells:
    Regards,
    Ian.

  • How to display number of rows as columns in a select statement? This is on

    How to display number of rows as columns in a select statement? This is on 10g R2.
    Thanks,
    R

    For the current (ie. row 1 of 100)
    row_number over (order by -pick_a_column_set) as rnfor the total number of columns returned in your query
    count(*) over() as total_count

  • How do you freeze a row or column which is not a header in Numbers '09?

    Just wondering if anyone has worked out how to freeze a chosen row or column? I know you can do it with header rows, but the row I want to freeze is row 4. I'm using Numbers '09.
    And is it right that you cannot link cells between different documents in Numbers, as I used to in Excel?
    All help much appreciated!

    Using Numbers you cannot reference a cell in another document.
    I do not think you can freeze non-header rows.  You can make up to 5 rows part of the header:
    Then freeze the headers.

  • How to reject external table rows with some blank columns

    How to reject external table rows with some blank columns
    I have an external table and I would like to reject rows when a number of fields are empty. Here are the details.
    CREATE TABLE EXTTAB (
    ID NUMBER(10),
    TSTAMP DATE,
    C1 NUMBER(5,0),
    C2 DATE,
    C3 FLOAT(126)
    ORGANIZATION EXTERNAL (
    TYPE ORACLE_LOADER
    DEFAULT DIRECTORY EXT_DAT_DIR
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY NEWLINE
    LOAD WHEN (NOT (c1 = BLANKS AND c2 = BLANKS AND c3 = BLANKS))
    LOGFILE EXT_LOG_DIR:'exttab.log'
    BADFILE EXT_BAD_DIR:'exttab.bad'
    DISCARDFILE EXT_BAD_DIR:'exttab.dsc'
    FIELDS TERMINATED BY "|"
    LRTRIM
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL
    FIELDS (
    ID,
    TSTAMP DATE 'YYYYMMDDHH24MISS',
    C1,
    C2 DATE 'YYYYMMDDHH24MISS',
    C3
    ) LOCATION ('dummy.dat')
    REJECT LIMIT UNLIMITED
    So, as you can see from the LOAD WHEN clause, I'd like to reject rows when C1, C2 and C3 are empty.
    The above statement works fine and creates the table. However when I am trying to load data using it, the following error is produced:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "not": expecting one of: "double-quoted-string, identifier, (, number, single-quoted-string"
    KUP-01007: at line 1 column 41
    ORA-06512: at "SYS.ORACLE_LOADER", line 14
    ORA-06512: at line 1
    It seems that external tables driver does not understand the "NOT (...)" condition. Could anyone suggest how I can achieve what I want in a different way?
    Thank you.
    Denis

    Another method would be to simply remove the "LOAD WHEN condition" and create a view on the external table which filters the data.
    CREATE EXTTAB_VIEW AS
    SELECT * FROM EXTTAB
    WHERE not (c1 is null and c2 is null and c3 is null);

  • How can I add new row/column into existing jTable?

    Hi add!
    Can you help me how can I add new row/column into existing jTable?
    Tnx in adv!

    e.g
    Create two buttons inside the Table ( "Add New Row" ) and ("Add new Column")
    their handlers are:
    add new row:
    //i supose u already have
    DefaultTabelModel tablemodel = new DefaultTableModel(rowdata, columnNames);
    //and   
       JTabel jtable = new JTable(tablemodel);
    // Handler (row)
    jbtAddRow.addActionListener(new ActionListener(){
       public void actionPerformed(ActionEvent e) {
          if(jtable.getSelectedRow() >= 0 )
              tablemodel.insertRow(jtable.getSelectedRow(), new java.util.Vector());  
           else  
                tablemodel.addRow(new java.util.Vector());
        });to add new columns its the same but inside actionPerformed method:
    ask for e.g "Whats the name for the new column"
    then,
       tablemodel.addColumn(nameOfColumn, new java.util.Vector());   Joao
    Message was edited by:
    Java__Estudante

  • How to programatically select a row in TableBean and update its column?

    Hi,
    Can anyone help me on How to programmatically select a row in a TableBean and update its column?
    Thanks,
    Jon

    Hi,
    My requirement is I need to update a column in a particular row of the table using fire action...
    I have a datefield bean serve as birhdate and base on this I need to update the age column depending on the given dates..
    Here's my code under the Process form request for your reference...
    if (actionInMainPersonScreen.equals("changeDate"))
    String checkId = pageContext.getParameter("paramDatePersonId");
    OAFormValueBean depPerId = (OAFormValueBean)depTable.findIndexedChildRecursive("ChildPersonID");
    OAMessageTextInputBean depFName = (OAMessageTextInputBean)depTable.findIndexedChildRecursive("FirstName");
    OAMessageDateFieldBean dateBirth = (OAMessageDateFieldBean)depTable.findIndexedChildRecursive("BDay");
    OAMessageStyledTextBean age = (OAMessageStyledTextBean)depTable.findIndexedChildRecursive("Age");
    Date changeBDate = new java.util.Date();
    Date dateToday = new java.util.Date();
    SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
    changeBDate = (Date)dateBirth.getValue(pageContext);
    Calendar cal = Calendar.getInstance();
    ResultSet empAge = null;
    String newAge = null;
    OADBTransaction trans = personam.getOADBTransaction();
    System.out.println("BirthDate: " + changeBDate + " Date Today: " + sdf.format(dateToday));
    String expQuery = "SELECT Trunc((sysdate - To_Date('" + pageContext.getParameter("paramDateBirth") + "'))/365) compAge, Sysdate from dual";
    System.out.println("SQL: " + expQuery);
    PreparedStatement expPreparedStatement = trans.createPreparedStatement(expQuery ,1);
    try
    empAge = expPreparedStatement.executeQuery();
    } catch (SQLException e) {}
    try
    while (empAge.next())
    newAge = empAge.getString("compAge");
    age.setText(pageContext, newAge);
    empAge.close();
    } catch (SQLException e) {}
    regards,
    Jon

  • How can I display the rows into columns.

    How can I display the rows into columns. I mean
    Create table STYLE_M
    (Master varchar2(10), child varchar2(10));
    Insert itno style_m
    ('MASTER1','CHILD1');
    Insert itno style_m
    ('MASTER2','CHILD1');
    Insert itno style_m
    ('MASTER2','CHILD2');
    Insert itno style_m
    ('MASTER3','CHILD1');
    Insert itno style_m
    ('MASTER3','CHILD2');
    Insert itno style_m
    ('MASTER3','CHILD3');
    Note : The Master may have any number of childs.
    I want to display like this..
    Master child1, child2, child3, .......(dynamic)
    MASTER1 CHILD1
    MASTER2 CHILD1 CHILD2
    MASTER3 CHILD1 CHILD2 CHILD3
    Sorry for disturbing you. Please hlp me out if you have any slution.
    Thanks alot.
    Ram Dontineni

    Here's a straight SQL "non-dynamic" approach.
    This would be used if you knew the amount of children.
    SELECT
         master,
         MAX(DECODE(r, 1, child, NULL)) || ' ' || MAX(DECODE(r, 2, child, NULL)) || ' ' || MAX(DECODE(r, 3, child, NULL)) children
    FROM
         SELECT
              master,
              child,
              ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r
         FROM
              style_m
    GROUP BY
         master
    MASTER     CHILDREN                        
    MASTER1    CHILD1                          
    MASTER2    CHILD1 CHILD2                   
    MASTER3    CHILD1 CHILD2 CHILD3             Since you said that the number of children can vary, I incorporated the same logic into a dynamic query.
    SET AUTOPRINT ON
    VAR x REFCURSOR
    DECLARE
            v_sql           VARCHAR2(1000) := 'SELECT master, ';
            v_group_by      VARCHAR2(200)  := 'FROM (SELECT master, child,  ROW_NUMBER() OVER(PARTITION BY master ORDER BY child) r FROM style_m) GROUP BY master';
            v_count         PLS_INTEGER;
    BEGIN
            SELECT
                    MAX(COUNT(*))
            INTO    v_count
            FROM
                    style_m
            GROUP BY
                    master;
            FOR i IN 1..v_count
            LOOP
                    v_sql := v_sql || 'MAX(DECODE(r, ' || i || ', child, NULL))' || ' || '' '' || ';
            END LOOP;
                    v_sql := RTRIM(v_sql, ' || '' '' ||') ||' children ' || v_group_by;
                    OPEN :x FOR v_sql;
    END;
    PL/SQL procedure successfully completed.
    MASTER     CHILDREN
    MASTER1    CHILD1
    MASTER2    CHILD1 CHILD2
    MASTER3    CHILD1 CHILD2 CHILD3I'll point your other thread to this one.

Maybe you are looking for

  • How can I see what apps are running on my iphone 5?

    Is there an app that will show me the apps running and also allow me to close apps that don't need to be running?

  • Safari and Firefox problems with wireless network

    I have seen similar questions to mine on the forums recently. Here's my story: I have 5 month old Mac Book with Leopard, no airport extreme, just the inbuilt Airport card. I connec through the internet with Netgear. I have been on to Apple support wh

  • Quicksilver 2002 and Tiger

    I have a quicksilver 2002 Powermac G4 on 10.3.9 and I need to upgrade it. I am having a hard time figuring out what will work. Tiger? what version? or Leopard?

  • Is it possible to make a homogenious copy

    Is it possible to make a SAP homogeneous copy from the backup of Oracle DB on HPUX (64 bit) to Oracle on Windows (32 bit) ? I am planning to make a sand box system on windows from the database backup of ORACLE/HPUX. Your reply will be highly apprecia

  • How to get subtotals on my table

    Hello, Could any one please tell me how can i get subtotals on my table. i am new to the tool trying to get subtotals and grand totals for my analysis. please advice