Formating the Row Based on one column value

Hi Friends
I am trying to format the Entire row based on the value of the first column in my Answers.
Example if first column value in 'F' now i want the Entire row to be colored
I can do conditional formating on one column but i want to do it on the entire row
F     8.1 %     12.0 %
E     5.2 %     3.5 %
M     2.3 %     3.3 %
If any one has done this or any suggestions please respond
Thanks
Sang

Its a Pivot View
F 8.1 % 12.0 %
E 5.2 % 3.5 %
M 2.3 % 3.3 %
the column 1 --> F,E,M are the Product
the column 2 --> 8.1% , 5.2% , 2.3% are the sales in year 2008
the column 3 --> 12.0 % , 3.5 %, 3.3 % are the sales in year 2009
So will i be able to apply the formating in pivot view based on one column to other column If yes please let me know how or
suggest if this can be done using the BI Office , or BI publisher
sing the BI Office i can do the formating in Excel but once i refresh the data all the formating is gone ... :(
I am donno BI Publisher if we have to use BIP please suggest any solution its very very very urgent and important report formating they need here ....
Thanks in advance David
sango

Similar Messages

  • Join all rows bases on one column value

    Hi All,
    I have requrement like Join all rows bases on one column value, i am not getting how to accomplish that. Here is my requrement. i have table test(id,id_desc) with no key
    table:Test
    id id_desc
    1 desc_a
    1 desc_b
    1 desc_c
    Now the requremnet i have one more table as test1(id,id_desc) here id is primary key. where record i need to insert as
    id id_desc
    1 desc_a
    desc_b
    desc_c

    orza wrote:
    Hi All,
    I have requrement like Join all rows bases on one column value, i am not getting how to accomplish that. Here is my requrement. i have table test(id,id_desc) with no key
    table:Test
    id id_desc
    1 desc_a
    1 desc_b
    1 desc_c
    Now the requremnet i have one more table as test1(id,id_desc) here id is primary key. where record i need to insert as
    id id_desc
    1 desc_a
    desc_b
    desc_cI'm guessing you want to pivot the results in TEST and use that to insert into TEST1?
    If so this may be useful
    http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php

  • How to split the data based on one column

    Dear All,
    I have the table data like this.
    type quantity revenue_mny count country
    a 10           10          2 India
    a 20          12          3 India
    b 30          15          1 India
    a 35          20          2 US
    b 20          10          1 US
    b 60          15          1 US
    I woulkd like to split the date based on type column.
    For each country, for Type "a" get the sum of revenue count quanity ans same for b
    and all shuld come in on row for each country.
    output should be like
    country revenue_mny(For a) quantity(for a) count(For a) revenue_mny(for b) quantity(for b) count(For b)
    India 22 30 5 15 30 1
    US 20 35 2 25 80 2
    I tried the below query . its not splittng the date for each country in one row.
    select country,
    sum(case when type='a') then revenue_mny else 0 end ) revenue_mny_a,
    sum(case when type='b' then revenue_mny else 0 end ) revenue_mny_b
    sum(case when type='a' then quantity else 0 end) quantity_a,
    sum(case when type='b' then quantity else 0 end) quantity_b from
    test
    group by country
    Please need your helo

    Like this?
    with t as
    select 'a' type, 10 quantity, 10 revenue_mny, 2 cnt, 'India' country from dual union all
    select 'a', 20, 12, 3, 'India' from dual union all
    select 'b', 30, 15, 1, 'India' from dual union all
    select 'a', 35, 20, 2, 'US' from dual union all
    select 'b', 20, 10, 1, 'US' from dual union all
    select 'b', 60, 15, 1, 'US' from dual
    select country,
    sum(case when type='a' then revenue_mny else 0 end ) revenue_mny_a,
    sum(case when type='a' then quantity else 0 end) quantity_a,
    sum(case when type='a' then cnt else 0 end) cnt_a,
    sum(case when type='b' then revenue_mny else 0 end ) revenue_mny_b,
    sum(case when type='b' then quantity else 0 end) quantity_b ,
    sum(case when type='b' then cnt else 0 end) cnt_b
    from t
    group by country;result:
    COUNTRY  REVENUE_MNY_A QUANTITY_A CNT_A REVENUE_MNY_B QUANTITY_B CNT_B
    India    22            30         5     15            30         1
    US       20            35         2     25            80         2Or you can do it with a decode instead of case. The result will be the same:
    with t as
    select 'a' type, 10 quantity, 10 revenue_mny, 2 cnt, 'India' country from dual union all
    select 'a', 20, 12, 3, 'India' from dual union all
    select 'b', 30, 15, 1, 'India' from dual union all
    select 'a', 35, 20, 2, 'US' from dual union all
    select 'b', 20, 10, 1, 'US' from dual union all
    select 'b', 60, 15, 1, 'US' from dual
    select country,
    sum(decode(type,'a',revenue_mny,0)) revenue_mny_a,
    sum(decode(type,'a',quantity,0)) quantity_a,
    sum(decode(type,'a',cnt,0)) cnt_a,
    sum(decode(type,'b',revenue_mny,0)) revenue_mny_b,
    sum(decode(type,'b',quantity,0)) quantity_b,
    sum(decode(type,'b',cnt,0)) cnt_b
    from t
    group by country;(I changed tablename from TEST to T and columnname from COUNT to CNT, because you should not use reserved words as tablename or columnname.)
    Edited by: hm on 09.10.2012 06:17

  • Need to  color a Table row based on a Column value

    Dear Alll
    I have a requirement to color the rows of a table based on a column value in it. I have tried and surfed many useful materials over the net. but none of them solves my purpose. Please help me, I know that i can used OADataBoundValueViewObject and create a custom css file and apply color to a particular column of a table using a decode in the select statement of that VO.
    But all i need is to color a particular row with a particular color. Need your help with this ........
    Please do reply
    Best Regards
    Edited by: Antony Jayaraj on Mar 27, 2012 8:54 PM

    These posts might help you.
    How to change the row color based on Condition
    Can we colour the rows in the column of a table
    Regards,
    Peddi.

  • How to retrieving latest row based on a column value

    Hi,
    Lets consider a scenario. I have a table which has a order number, count column which is our fact, a type column which contains types e.g. (A,B) with A has more priority then B. Now in our graph we are getting all rows i.e. if we have two rows in db for order #1 one for type A and one for type B, then it shows us data from both rows in graph.
    But I need only to show one row of type A in this case as A has higher priority than B. The row with type B should not contribute in construction of my graph if type A for same row also exists.
    I tried a solution, for which i created a new column at logical level which contain 1 for A and 0 for B. Now i put Max aggregation rule in it to get maximum value which will be row with Type A in our case. But it did not work.
    How we will can achieve it in OBIEE?
    Thanks.
    Aasim Khan.

    Hi Steve,
    I have a similar requirement... one of the columns in my table is a calculated value based on several xml fields,
    <?xdofx:(MATH01+MATH02+MATH03+MATH04+MATH05+AA+AA1)+((FNDCD01+FNDCD02+FNDCD03+FNDCD04+FNDCD05+MCHCD01+MCHCD02) div '8')?>
    if the resultant value above is less than 62, i do no want to display this entire row in the output. could you help me wout with this?
    thanks
    Domnic

  • Selecting rows based on one column change

    Hi All -
    I need to select the rows from a table (this table has 4 columns and has a primary key and have many records for that primary key).
    I need to select all the rows for this primary key for which only one column (in this case "flag" column) has been changing from its past value.
    How can I do this?
    for example, table data is:
    ID, flag, Profile,date
    pk, Y, Profile4,01/10/10
    pk, N, Profile4, 01/08/10
    pk,N, Profile3, 01/07/10
    pk,Y, Profile3, 01/05/10
    pk,Y, Profile2, 01/03/10
    pk,N, Profile1, 01/02/10
    The output of the query I am looking for should return the following i.e. only retrieve rows whose previous flag value has been changed:
    ID, flag, Profile,date
    pk, Y, Profile4,01/10/10
    pk,N, Profile3, 01/07/10
    pk,Y, Profile2, 01/03/10
    pk,N, Profile1, 01/02/10
    Please share your expertise.
    Thanks,
    Seenu

    Hi, Seenu,
    Centinul wrote:
    It is always helpful to provide the following:
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.
    Seenu001 wrote:(1) Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi
    PL/SQL Release 10.2.0.3.0 - Production
    CORE 10.2.0.3.0 Production
    TNS for Solaris: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production Good!
    (2) select 'pk' id,'Y' flag,'Profile4' profile,to_date('01/10/10','mm/dd/yy') dt from dual union all
    select 'pk','N','Profile4',to_date('01/08/10','mm/dd/yy') from dual union all
    select 'pk','N','Profile3',to_date('01/07/10','mm/dd/yy') from dual union all
    select 'pk','Y','Profile3',to_date('01/05/10','mm/dd/yy') from dual union all
    select 'pk','Y','Profile2',to_date('01/03/10','mm/dd/yy') from dual union all
    select 'pk','N','Profile1',to_date('01/02/10','mm/dd/yy') from dualNot bad. It can be made into a CREATE TABLE AS statement without a lot of work, but if you're not willing to do that little bit or work, why should anyone else?     
    (3) Expected output: I want all the rows from this table where the flags have been changed from its previous value.That's a vague description. Post the exat output, like Solomon did:
    ID F PROFILE  DT
    pk N Profile1 01/02/2010
    pk Y Profile2 01/03/2010
    pk N Profile3 01/07/2010
    pk Y Profile4 01/10/2010
    (4) I want all the rows from this table where the flags have been changed from its previous value.That's a repeat of the vague description. Explain how you get the crorrect results, with specific examples, like this:
    "The row dated January 2 should be included, because it is the oldest row in the table, regardless of what its flag is.
    The row dated January 3 should be included because ...
    The row dated January 5 should *not* be included, because ..."
    You don't have to explain every row, just every reason.
    Solomon - I tried your query but the prev_flag is not being populated, it shows null value '-'NULL is not the same as '-'. Did you issue a command like
    SET NULL "-"that would display a '-' instead of NULL?
    Solomon's query works fine for me, as it did for him. Post your code, even if you just copied it from this site. (There may have been an editing problem.)
    Frank - I tried your query, prev_flag is populated in this case but when I am using with the WITH clause, I am getting an error saying "unsupported column aliasing" , I guess WITH command doesnt allow use of column alias. The problem is that I forgot the keyword AS after the sub-query name.
    WITH     got_prev_flag     AS
         SELECT     id, flag, profile, dt     -- DATE is not a good column name
         ,     LAG (flag, 1, '??') OVER (ORDER BY dt)  AS prev_flag
         FROM     t
    --     WHERE     ...     -- any filtering goes here
    SELECT     id, flag, profile, dt
    FROM     got_prev_flag
    WHERE     flag     != prev_flag
    ;If you don't post data in an executable form, then people can't test their ideas. If people can't test their ideas, trivial mistakes like this are very likely.
    This flag column will have either
    Y or N columns. Could you tell me what is the use of "??" value.By default, LAG returns NULL for the first row. If you want to include the first row in the results, then "WHERE     flag     != prev_flag" won't work when prev_flag is NULL. We could explicitly check for "prev_flag IS NULL", but I find it cleared to override the default, and have LAG return '??' on the first row. I guessed that '??' would make the condition "WHERE     flag     != prev_flag" work, no matter what value flag had. There's nothing magical about '??'; you can use any string that will never actually match flag.

  • Move row based on one duplicated value

    is it possbile to move entire rows base on just the value in the first column?
    1    a
    1    b
    2    c
    2   d
    the result should be
    1   a
    2   c

    Yes - double the header row, then use a formula like the one that I posted but start in row 1, with the formula
    =COUNTIF($A$1:$A1,$A1)
    Then copy down, copy that column, paste as values, and finally, sort the entire table
    based on that value. Then List1 will all have 1s in that column, List2 will have 2s, etc.

  • Counting rows based on a column value

    Tricky Query.No offence if this is a repeat please.
    This is a PROD issue in SYBASE.
    TableA has id_flag_listing column
    TableA
    id_flag_listing
    N
    N
    N
    N
    N
    1) If all rows are set to 'N',then my count should be 0.
       PrimaryListing
       0
    2) If there is one row which is 'Y' then this shoud be:
       id_flag_listing
       N
       N
       Y
       N
       N
       PrimaryListing
       1
    How can I count in this manner?
    Do i use decode? I am using
    Select sum(decode(flg_active),'Y',1,0))
    from TABLEA
    Will the above work.??
    I am using SQL for Sybase.
    Please guide?

    Did you even tried the SQL query I've given?
    Your table A
    SQL> SELECT flg_listing
      2  FROM
      3  (
      4     SELECT 'N' flg_listing FROM DUAL
      5     UNION ALL
      6     SELECT 'N' FROM DUAL
      7     UNION ALL
      8     SELECT 'N' FROM DUAL
      9     UNION ALL
    10     SELECT 'N' FROM DUAL
    11     UNION ALL
    12     SELECT 'N' FROM DUAL
    13  ) TABLEA;
    FLG_LISTING
    N
    N
    N
    N
    N
    Your table A, from which I count where are of 'Y' value. In these queries, I change TableA contents.
    SQL> SELECT count(*)
      2  FROM
      3  (
      4     SELECT 'N' flg_listing FROM DUAL
      5     UNION ALL
      6     SELECT 'N' FROM DUAL
      7     UNION ALL
      8     SELECT 'N' FROM DUAL
      9     UNION ALL
    10     SELECT 'N' FROM DUAL
    11     UNION ALL
    12     SELECT 'N' FROM DUAL
    13  ) TABLEA
    14  WHERE flg_listing = 'Y';
      COUNT(*)
             0
    SQL> SELECT count(*)
      2  FROM
      3  (
      4     SELECT 'N' flg_listing FROM DUAL
      5     UNION ALL
      6     SELECT 'N' FROM DUAL
      7     UNION ALL
      8     SELECT 'Y' FROM DUAL
      9     UNION ALL
    10     SELECT 'N' FROM DUAL
    11     UNION ALL
    12     SELECT 'N' FROM DUAL
    13  ) TABLEA
    14  WHERE flg_listing = 'Y';
      COUNT(*)
             1
    SQL> SELECT count(*)
      2  FROM
      3  (
      4     SELECT 'N' flg_listing FROM DUAL
      5     UNION ALL
      6     SELECT 'N' FROM DUAL
      7     UNION ALL
      8     SELECT 'Y' FROM DUAL
      9     UNION ALL
    10     SELECT 'Y' FROM DUAL
    11     UNION ALL
    12     SELECT 'Y' FROM DUAL
    13  ) TABLEA
    14  WHERE flg_listing = 'Y';
      COUNT(*)
             3Yoann.

  • [8i] Way to add a specific nbr of rows based on a column value? (Follow-up)

    I'm dealing with an old database that's being phased out, and here's the version info (yes, it's really old):
    Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
    PL/SQL Release 8.1.7.2.0 - Production
    CORE 8.1.7.0.0 Production
    TNS for HPUX: Version 8.1.7.2.0 - Production
    NLSRTL Version 3.4.1.0.0 - Production
    I believe Frank Kulash gave me the solution to my original question, which was:
    Sample data:
    CREATE TABLE     testabc
    (     item     CHAR(25)
    ,     qty     NUMBER(13,4)
    INSERT INTO     testabc
    VALUES ('Item1',1);
    INSERT INTO     testabc
    VALUES ('Item2',3);
    INSERT INTO     testabc
    VALUES ('Item3',1);
    INSERT INTO     testabc
    VALUES ('Item4',2); Desired results:
    ITEM                                  QTY
    Item1                               1.000
    Item2                               3.000
    --blank row
    --blank row
    Item3                               1.000
    Item4                               2.000
    --blank rowAnd the solution:
    SELECT       CASE
              WHEN c.n = 1  THEN  t.item
           END          AS item_col
    ,       CASE
               WHEN c.n = 1  THEN  t.qty
           END          AS qty
    FROM       testabc  t
              SELECT     ROWNUM     AS n
              FROM     all_objects
              WHERE     ROWNUM     <= 10     -- If you know an upper bound
           )          c
    WHERE       c.n     <= t.qty
    ORDER BY  t.item
    ,            c.n
    ;Now, it turns out there are only some items which need these extra rows, but I'm not sure if it's possible to only include extra rows for certain items or not...
    Here's my new sample data:
    CREATE TABLE     testabc1
    (     s     CHAR(1)
    ,     item     CHAR(25)
    ,     qty     NUMBER(13,4)
    INSERT INTO     testabc1
    VALUES ('*','Item1',1);
    INSERT INTO     testabc1
    VALUES ('','Item2',3);
    INSERT INTO     testabc1
    VALUES ('*','Item3',3);
    INSERT INTO     testabc1
    VALUES ('*','Item4',2);And my new desired results: (any row with an asterisk gets extra rows, if the qty is greater than 1)
    S ITEM                                  QTY
    * Item1                               1.000
      Item2                               3.000
    * Item3                               3.000
    --blank row
    --blank row
    * Item4                               2.000
    --blank rowEdited by: user11033437 on Jan 3, 2012 9:27 AM (fixed missing asterisk in desired results)

    Hi,
    Here's a slightly simpler way:
    SELECT       CASE
              WHEN c.n = 1  THEN  t.item
           END          AS item_col
    ,       CASE
               WHEN c.n = 1  THEN  t.qty
           END          AS qty
    FROM       testabc1  t
              SELECT     ROWNUM     AS n
              FROM     all_objects
              WHERE     ROWNUM     <= 10     -- If you know an upper bound
           )          c
    WHERE       c.n     <= CASE
                       WHEN  t.s  = '*'
                       THEN  t.qty
                     ELSE  1
                 END
    ORDER BY  t.item
    ,            c.n
    ;This is just like the previous solution, except that the WHERE clause, which was originally
    WHERE       c.n     <= t.qtyis now
    WHERE       c.n     <= CASE ... END
    user11033437 wrote:... And my new desired results: (any row with an asterisk gets extra rows, if the qty is greater than 1)
    S ITEM                                  QTY
    * Item1                               1.000
    Item2                               3.000
    Item3                               3.000
    --blank row
    --blank row
    * Item4                               2.000
    --blank row
    S should be '*' on the output row where item='Item3', right?
    I'm sure you know how to get the s column in the output, but, since I've already tried it:
    SELECT       CASE
              WHEN c.n = 1  THEN  '*'
           END                AS s
    ,       CASE
              WHEN c.n = 1  THEN  t.item
           END          AS item_col
    ,       CASE
               WHEN c.n = 1  THEN  t.qty
           END          AS qty
    FROM       testabc1  t
              SELECT     ROWNUM     AS n
              FROM     all_objects
              WHERE     ROWNUM     <= 10     -- If you know an upper bound
           )          c
    WHERE       c.n     <= CASE
                       WHEN  t.s  = '*'
                       THEN  t.qty
                     ELSE  1
                 END
    ORDER BY  t.item
    ,            c.n
    ;Edited by: Frank Kulash on Jan 3, 2012 11:11 AM

  • Selecting top 10 rows based on one column.

    Hi,
    I need to display the top 10 records for each distinct value of a column. 

    USE Northwind;
    -- Solution 1
    SELECT S.SupplierID, S.CompanyName, CA.ProductID, CA.UnitPrice
    FROM dbo.Suppliers AS S
      CROSS APPLY
        (SELECT TOP (10) *
         FROM dbo.Products AS P
         WHERE P.SupplierID = S.SupplierID
         ORDER BY UnitPrice DESC, ProductID DESC) AS CA
    ORDER BY S.SupplierID, CA.UnitPrice DESC, CA.ProductID DESC;
    -- Solution 2
    WITH C AS
      SELECT S.SupplierID, S.CompanyName, P.ProductID, P.UnitPrice,
        ROW_NUMBER() OVER(
          PARTITION BY P.SupplierID
          ORDER BY P.UnitPrice DESC, P.ProductID DESC) AS RowNum
      FROM dbo.Suppliers AS S
        JOIN dbo.Products AS P
          ON P.SupplierID = S.SupplierID
    SELECT SupplierID, CompanyName, ProductID, UnitPrice
    FROM C
    WHERE RowNum <= 10
    ORDER BY SupplierID, ProductID DESC, UnitPrice DESC;
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Count the rows which differes a column value

    msg deleted
    Edited by: user11253970 on Jul 14, 2009 11:33 AM

    Perhaps this
    with a as (
         SELECT cert_no, count(distinct RACE_CODE) RACE_CODES   FROM subscriber
         group by cert_no having count(distinct RACE_CODE) > 0 )
    b as (  
         SELECT cert_no, count(distinct RACE_CODE) RACE_CODES FROM med_subscriber
         group by cert_no having count(distinct RACE_CODE) > 0 )
    c as (
         select cert_no, count(distinct RACE_CODE) RACE_CODES from den_subscriber
         group by cert_no having count(distinct RACE_CODE) > 0 )
    select  cert_no, a.race_codes + b.race_codes||' (in med_subscriber and subscriber tables)'
            ||' , '||  c.race_codes ||' (in den_subscriber table).'  col1
    from a , b ,  c
    where a.cert_no = b.cert_no
    and a.cert_no = c.cert_no
      note: not tested for your data.
    SS

  • Is it possible to Lock just one column value in a row?

    Is it possible to Lock just one column value in a row
    A Java Developer has just asked me if it is possible to Lock just one column value in a row in Oracle
    select ename from emp where empno=7369 for update;
    EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    7369 SMITH      CLERK           7902 17-DEC-80        800                    20
    will lock the entire row with empno=7369.
    But is it possible to lock one column value from this row, like SAL=800 ?
    Edited by: J.Kiechle on Jan 8, 2009 10:45 PM

    J.Kiechle wrote:
    Is it possible to Lock just one column value in a rowNo. Locking granularity is a row.

  • When I import a text file(comma separated )into a numbers spread sheet all the data goes into one column. Why does the text not go into separate columns based on the commas.

    When I import a text file(comma separated) into a numbers spreadsheet all the data goes into one column instead of individual columns based on the comma separators.  Excel allows you to do this during the import..  Is there a way to accomplish this in numbers without opening it in Excel and the importing into Numbers.

    Your user info says iPad. This is the OS X Numbers forum. Assuming you are using OS X… Be sure the file is named with a .csv suffix.
    (I don't have an iPad, so I don't know the iOS answer.)

  • Unique row based on two columns and single column

    Dear Members,
    I have a table which contains duplicate rows, for which a query should be able to fetch the unique row from the table. Here the unique is not based on one column, but it should be on two columns and also check for uniqueness on one column.
    create table addr ( firstname varchar2(10), lastname varchar2(10), area varchar2(3));
    insert into addr values('bob', 'james', '1');
    insert into addr values('bob', 'james', '1');
    insert into addr values('harry', 'bert', '1');
    insert into addr values('jimmy', 'bert', '1');
    insert into addr values('sam', 'mac', '1');
    insert into addr values('sam', 'knight', '1');
    insert into addr values('tom', 'sand', '1');
    insert into addr values('cat', 'mud', '1');
    The output of query should contain 3 rows.
    bob - james
    harry - bert or jimmy - bert [ either one of them, but not both ]
    sam - mac or sam - knight [ either one of them, but not both ]
    tom - sand
    cat - mud
    SELECT firstname, lastname as total from addr WHERE area = '1' GROUP by firstname,lastname; This does not take of single column duplication..
    Any suggestions..

    SQL> with t_data
    as
    select 'bob' as firstname, 'james' as lastname, '1' as area from dual union all
    select 'bob', 'james', '1' from dual union all
    select 'harry', 'bert', '1' from dual union all
    select 'jimmy', 'bert', '1' from dual union all
    select 'sam', 'mac', '1' from dual union all
    select 'sam', 'knight', '1' from dual union all
    select 'tom', 'sand', '1' from dual union all
    select 'cat', 'mud', '1' from dual
    SELECT
            firstname,
            lastname,
            area
    FROM
                    SELECT
                            t.*,
                            row_number() over(partition BY firstname order by 1) rn,
                            row_number() over(partition BY lastname order by 1) rn1
                    FROM
                            t_data t
    WHERE
            rn     = 1
    AND rn1 =1 ; 
    FIRSTNAME       LASTNAME        AREA
    bob             james           1
    cat             mud             1
    jimmy           bert            1
    sam             knight          1
    tom             sand            1
    SQL>

  • How to restrict a table with its set of data based on a column value in it?

    Hi,
    I have a scenario in which I have to show a set of data of a pivot table by restricting data based on a column value. I am creating BIP report whose source is from BIA ie.RPD. Based on a column value I want to restrict the data being displayed in the table. Since I also want the hidden data in the first table to be displayed in another table in the same report I cannot restrict the data at the query level i.e at RPD or at BIA. For this reason I used
    <?xdofx:if saw3_ = 1?>
    the pivot table
    <?end if?>
    But it does not restrict any data.
    Also I tried using the if condition inside the table before the row level looping happens. But no good show even then.
    How can I forgo this problem?
    Regards,
    The MM

    Hi,
    See : http://download.oracle.com/docs/cd/E12096_01/books/PubUser/T421739T481157.htm#4535373 regarding column and row.
    Regards,
    Colectionaru

Maybe you are looking for