How to I break on a column in Answers query

I need to create a report that lists the top 20 sales for a store for a day. If the user chooses more than one store from the prompt, I need to display Top 20 sales for each store. However my query behaves such that when I choose more than one store , it gives me Top 20 sales across the 2 stores.
How can I get the query to break on Store and display 20 lines for each store ?
Any thoughts much appreciated.
Meenakshi

Kishore, Thank you for that extremely useful post.
However, another issue has surfaced. I also need to display the Rank of the Top 20 customers in each store. When I choose more than 1 store then I get 20 rows for each store, however the RANK function does not reset for each store. Is it possible to display the Rank with in each store i.e. 1 through 20 RANK for store 1 , then store 2 etc.
Thanks for your help
Meenakshi

Similar Messages

  • How to get list in single column in a query

    Hello.
    I wonder if there is a way of getting with one query (no pl/sql code) a whole list of columns with a separator between them.
    I know I can get that without the separators with a cursor expression:
    SQL> with test_table as (
      2  select 1 col1, 'a' col2 from dual
      3  union
      4  select 1 col1, 'b' col2 from dual
      5  union
      6  select 1 col1, 'c' col2 from dual
      7  union
      8  select 2 col1, 'a' col2 from dual
      9  union
    10  select 2 col1, 'c' col2 from dual
    11  union
    12  select 2 col1, 'd' col2 from dual
    13  union
    14  select 2 col1, 'z' col2 from dual
    15  )
    16  select col1, cursor (select b.col2 from test_table b where b.col1 = a.col1 order by b.col2) col2_list from test_table a
    17  group by col1
    18  /
          COL1 COL2_LIST
             1 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    C
    a
    b
    c
             2 CURSOR STATEMENT : 2
    CURSOR STATEMENT : 2
    C
    a
    c
    d
    zBut the output that I want is (using the separator ';'):
          COL1 COL2_LIST
             1 a;b;c
             2 a;c;d;zI do not know how to handle a cursor expression without using a pl/sql block of function. Can it be done using analytic functions?
    Thanks in advance.

    Like this...
    SQL> ed
    Wrote file afiedt.buf
      1  with test_table as (
      2    select 1 col1, 'a' col2 from dual union
      3    select 1 col1, 'b' col2 from dual union
      4    select 1 col1, 'c' col2 from dual union
      5    select 2 col1, 'a' col2 from dual union
      6    select 2 col1, 'c' col2 from dual union
      7    select 2 col1, 'd' col2 from dual union
      8    select 2 col1, 'z' col2 from dual)
      9  --
    10  select col1, ltrim(sys_connect_by_path(col2,','),',') as col2
    11  from
    12    (select col1, col2, row_number() over (partition by col1 order by col2) rn
    13    from test_table)
    14  where connect_by_isleaf = 1
    15  connect by col1 = prior col1
    16  and rn = prior rn+1
    17* start with rn = 1
    SQL> /
          COL1 COL2
             1 a,b,c
             2 a,c,d,z
    SQL>

  • How to get Average of a column in UNION query

    Hi All,
    I will try to explain the issue as much as I can and If you need clarification on any piece please let me know.
    So, I have a Union Query with two sets of Criteria.
    The first Criteria Brings the list of Buildings and a set of Measures for it. The second criteria does the same but with a different set of filters.
    No I use a UNION between these both criteria and present them in a Pivot view so that we only have one row per each building. The values in each of the criteria in the UNION query are Summed
    Ex:
    Building
    Metric 1
    Metric 2
    1
    20
    30
    1
    25
    35
    2
    40
    50
    2
    45
    55
    So as I show in the pivot the result is
    Building
    Metric 1
    Metric 2
    1
    45
    65
    2
    85
    105
    Now the issue is with the Grand Total.
    I want the Grand Total to be an Average of the Buildings. So for Metric 1 The Grand Total should be (45+85)/2 because we have two buildings so the answer should be 65.
    How can I get that.
    Bottom Line: Need an Average as the Grand Total when the Aggregation rule on the column is set to Sum.
    we use 11.1.6.10 version

    Hi VJ
    What you are asking is impossible in the pivot table itself as you are asking one part of the pivot table to aggregate via one method, and another to aggregate via another method, on the same column ..
    It can be done using a calculated item. For your example above you'd use the formula ( $1 + $2) / 2.
    .. But thats HIGHLY explicit, and would only work if you KNOW how many buildings will come back in the query.. EVERYTIME.
    Why not restructure the query to combine it into a single query using an combinations of filters with OR in between?

  • How to insert fragment into xml column generated from query

    I'm trying to generate xml from some relational data and then insert a sub node into an xml column. Here's some sample code that obviously doesn't work.  I'm trying to figure out the syntax where the ???? exist.
    /* create test tables*/
    DECLARE @person TABLE
    id int NOT NULL PRIMARY KEY CLUSTERED,
    info xml NULL
    DECLARE @roles TABLE
    id int NOT NULL,
    role_name varchar(20) NOT NULL,
    PRIMARY KEY
    id,
    role_name
    /* insert test values */
    INSERT INTO @person (id, info)
    VALUES (1, '<person><name><first_name>Joe</first_name><last_name>Smith</last_name></name></person>'),
    (2, '<person><name><first_name>Tim</first_name><last_name>Jones</last_name></name></person>');
    INSERT INTO @roles (id, role_name)
    VALUES
    (1,'Admin'),
    (1,'User'),
    (2,'Editor'),
    (2,'User');
    /* make sure that xml comes back correctly*/
    SELECT
    role_name AS name
    FROM @roles AS role
    WHERE id = 1 -- works for each id
    FOR XML AUTO, ROOT ('roles');
    UPDATE p
    SET info.modify('insert ???? as last into (/person)[1]')
    FROM @person p
    INNER JOIN @roles r
    ON p.id = r.id
    /* desired output in the info column for id = 1*/
    <person>
    <name>
    <first_name>Joe</first_name>
    <last_name>Smith</last_name>
    </name>
    <roles>
    <role name="Admin" />
    <role name="User" />
    </roles>
    </person>
    Any ideas?

    this?
    DECLARE @person TABLE
    id int NOT NULL PRIMARY KEY CLUSTERED,
    info xml NULL
    DECLARE @roles TABLE
    id int NOT NULL,
    role_name varchar(20) NOT NULL,
    PRIMARY KEY
    id,
    role_name
    /* insert test values */
    INSERT INTO @person (id, info)
    VALUES (1, '<person><name><first_name>Joe</first_name><last_name>Smith</last_name></name></person>'),
    (2, '<person><name><first_name>Tim</first_name><last_name>Jones</last_name></name></person>');
    INSERT INTO @roles (id, role_name)
    VALUES
    (1,'Admin'),
    (1,'User'),
    (2,'Editor'),
    (2,'User');
    /* make sure that xml comes back correctly*/
    SELECT
    role_name AS name
    FROM @roles AS role
    WHERE id = 1 -- works for each id
    FOR XML AUTO, ROOT ('roles');
    UPDATE p
    SET info.modify('insert sql:column("x") as last into (/person)[1]')
    FROM @person p
    CROSS APPLY(SELECT role_name FROM @roles WHERE id = p.id FOR XML PATH(''),ROOT('roles'),TYPE)r(x)
    select * from @person
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Sum of columns in union query

    hi, i am using oracle 10g database..
    how to get the sum of column in union query ?
         select * from (select 100 records from dual), (select 50 available from dual)
    union
    select * from (select 200 records from dual), (select 150 available from dual)
    display should be like
                     records         available
                      100               50
                      200               150
    total            300               200thanks ...

    Peter vd Zwan wrote:
    try this:Grouping by records will not produce correct results:
    SQL> with a as
      2  (
      3  select * from (select 100 records from dual), (select 50 available from dual)
      4  union
      5  select * from (select 100 records from dual), (select 100 available from dual)
      6  union
      7  select * from (select 200 records from dual), (select 150 available from dual)
      8  )
      9  select
    10    case when grouping(records) = 0 then null else 'total' end tot
    11    ,sum(records)   records
    12    ,sum(available) available
    13  from
    14    a
    15  group by
    16  rollup (records)
    17  ;
    TOT      RECORDS  AVAILABLE
                 200        150
                 200        150
    total        400        300
    SQL> select  case grouping(rownum)
      2     when 1 then 'Total'
      3   end display,
      4          sum(records) records,
      5          sum(available) available
      6    from  (
      7            select * from (select 100 records from dual), (select 50 available from dual)
      8           union
      9            select * from (select 100 records from dual), (select 100 available from dual)
    10           union
    11            select * from (select 200 records from dual), (select 150 available from dual)
    12          )
    13    group by rollup(rownum)
    14  /
    DISPL    RECORDS  AVAILABLE
                 100         50
                 100        100
                 200        150
    Total        400        300
    SQL> SY.

  • Hi, how can i break the value for a row and column once i have converted the image to the array?????​??

    Hi, I would like to know how can i break the value for a row and column once i have converted the image to the array. I wanted to make some modification on the element of the array at a certain position. how can i do that?
    At the moment (as per attachhment), the value of the new row and column will be inserted by the user. But now, I want to do some coding that will automatically insert the new value of the row and the column ( I will use the formula node for the programming). But the question now, I don't know how to split the row and the column. Is it the value of i in the 'for loop'? I've  tried to link the 'i' to the input of the 'replace subset array icon' , but i'm unable to do it as i got some error.
    Please help me!
    For your information, I'm using LABView 7.0.

    Hi,
    Thanks for your reply.Sorry for the confusion.
    I manage to change the array element by changing the row and column value. But, what i want is to allow the program to change the array element at a specified row and column value, where the new value is generated automatically by the program.
    Atatched is the diagram. I've detailed out the program . you may refer to the comments in the formula node. There are 2 arrays going into the loop. If a >3, then the program will switch to b, where if b =0, then the program will check on the value of the next element which is in the same row with b but in the next column. But if b =45, another set of checking will be done at a dufferent value of row and column.
    I hope that I have made the problem clear. Sorry if it is still confusing.
    Hope you can help me. Thank you!!!!
    Attachments:
    arrayrowncolumn2.JPG ‏64 KB

  • How to break the name column into first,middle,last

    hi,
    Having a column in a table called employee_name which is
    containing the names of employees like:-
    employee_name
    Syed Azhar Husain
    Also having another table having cloumns first_name,middle_name, last_name
    I just want to write the query that break my employee_name column into
    first name, middle name, last name and
    store into table columns first_name, middle_name, last_name respectively
    i.e. it should display like
    first_name middle_name last_name
    Syed Azhar husain
    I am using oracle9i database.
    Thanks in advance
    Azhar

    Dear Asuri,
    Thanks for quick reply,
    your query was working fine when there was one record into the table but when there was more then one record into the table it was giving error "ORA-01427: single-row subquery returns more than one row". So i did small modification in the query as below
    SELECT SUBSTR(' ' || name || ' ', INSTR(' ' || name || ' ' , ' ', 1, rn) +1,
    INSTR(' ' || name || ' ' , ' ', 1, rn + 1) - INSTR(' ' || name || ' ' , ' ', 1, rn) -1) name
    FROM test , (SELECT ROWNUM rn FROM all_objects
    WHERE ROWNUM <= ( SELECT distinct(LENGTH(name) - (LENGTH(REPLACE(name, ' ')))) / LENGTH(' ') + 1
    FROM test ))
    order by name
    so above query is working fine with more than one record but there is another problem as i am explaining blow
    Suppose there is table called "test" as follows
    SQL> select * from test;
    NAME
    Rajendra kumar jain
    syed azhar husain
    Chander Shekhar Kumar
    when i am putting above query it is giving result as follows
    NAME
    Chander
    Kumar
    Rajendra
    Shekhar
    azhar
    husain
    jain
    kumar
    syed
    my requirement is that for complete full name like 'syed azhar husain' it should give
    name
    fist name : syed
    middle name: azhar
    last name: husain
    first name: rejendra
    middle name: kumar
    last name: jain
    first name: chander
    middle name: shekhar
    last name: kumar

  • How to get tax break up of TDS using SQL query ?

    Hi all,
    We are developing a TDS report using SQL query
    Report will contain VendorCode,Date(ap inv date),Vendor name,
    Bill value,TDS Amount,
    Bill Value – 100.000,
    TDS (2%) - 2.000,
    TDS Surcharge(10% on TDS) - 0.2,
    TDS Cess(2%(TDS+TDS Surcharge)) - 0.044,
    TDS HeCess(1%(TDS+TDS Surcharge)) - 0.022.
    We have developed this report which displays upto
    VendorCode,Date(ap inv date),Vendor name,
    Bill value,TDS Amount.
    How to show tax break up of TDS in SQL query ?
    Thanks,
    With regards,
    Jeyakanthan.

    Hi gauraw,
    Thank for your reply.
    I modified the query , pasted the query
    as below in query generator,
    Select T0.DocNum,T0.DocDate,T0.CardCode as 'Ledger',T1.TaxbleAmnt As 'Bill value',T1.WTAmnt as 'TDSAmt',(TDSAmt * 0.1) as 'TDS_Surch',
    (((TDSAmt0.1) + TDSAmt)0.02)  as 'TDSCess',
    (((TDSAmt0.1) + TDSAmt)0.01)  as 'TDSHCess'
    FROM OPCH T0  INNER JOIN PCH5 T1 ON T0.DocEntry = T1.AbsEntry
    WHERE (T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]')
    on clicking execute its showing error message invalid column
    name 'TDSAmt'.
    With regards,
    Jeyakanthan

  • How to create a fixed-width column within an APEX 4 interactive report?

    This thread is a follow-up to {message:id=9191195}. Thanks fac586.
    Partial success: The following code provided by fac586 limits the column width of the Apex 4 interactive report column as long as the column data contains whitespace within a Firefox 3.6 browser:
    <pre class="jive-pre">
    <style type="text/css">
    th#T_DESCRIPTION {
    width: 300px;
    td[headers="T_DESCRIPTION"] {
    width: 300px;
    word-wrap: break-word;
    </style>
    </pre>
    Notes:
    1. The code above is put into the HTML header section for the page.
    2. T_DESCRIPTION is defined as VARCHAR2(2000).
    3. The code above works within the Firefox 3.6.12 browser but does not work within the Internet Explorer 7.0.5730.13 browser.
    I tried adding "float: left;":
    <pre class="jive-pre">
    <style type="text/css">
    th#T_DESCRIPTION {
    width: 300px;
    td[headers="T_DESCRIPTION"] {
    width: 300px;
    word-wrap: break-word;
    <font color="red"> float: left;</font>
    </style>
    </pre>
    Notes:
    1. "float: left;" does not require whitespace and successfully splits the column between characters in lieu of whitespace.
    2. "float: left;" shrinks the cell height and allows the page background to show through... couldn't determine how to fix this.
    3. The code above works within the Firefox 3.6.12 browser but does not work within the Internet Explorer 7.0.5730.13 browser.
    I've done some more research, but I still haven't discovered how to create a fixed-width column within an APEX 4 interactive report that displays properly within an Internet Explorer 7 browser.
    Any ideas and help will be appreciated.

    Thanks for your help with this!
    <pre class="jive-pre">
    what theme are you using?
    </pre>
    A customized version of theme 15.
    <pre class="jive-pre">
    Floating a table cell makes no sense (to me anyway).
    </pre>
    You are correct. I was just trying a different approach ... trying to think out of the box.
    <pre class="jive-pre">
    Think you'll need to create an example on apex.oracle.com with sample data
    if there are any further problems.
    </pre>
    Great suggestion! The code your provided works in the Firefox 3.6.12 browser, but still doesn't work within my Internet Explorer 7.0.5730.13 browser.
    UPDATE:
    I have recreated the problem at apex.oracle.com, you can use the following information to check it out:
    URL: http://apex.oracle.com/pls/apex/f?p=43543:100::::::
    Workspace: IR_FIXED_WIDTH_COLS
    Username: GUEST
    Password: Thx4help
    Application: 43543 - CM_RANDY_SD
    Note: Table name is TEST_DATA
    The following code provided by fac586 works in both Firefox 3.6 and IE7 using default theme "21. Scarlet" at apex.oracle.com; however, it doesn't work when I use a copy of our customized theme "101. Light Blue":
    <pre class="jive-pre">
    <style type="text/css">
    .apexir_WORKSHEET_DATA {
    th#T_DESCRIPTION {
    width: 300px;
    max-width: 300px;
    td[headers="T_DESCRIPTION"] {
    max-width: 300px;
    word-wrap: break-word;
    </style>
    <!--[if lt IE 8]>
    <style type="text/css">
    /* IE is broken */
    th#T_DESCRIPTION,
    td[headers="T_DESCRIPTION"] {
    width: 300px;
    </style>
    <![endif]-->
    </pre>
    Any idea what in the theme could be causing the fixed width column to be ignored in IE 7?
    Edited by: CM Randy SD on Dec 7, 2010 11:22 AM

  • How do you break the cycles in "connect by nocycles" query.

    I looked at the documentation of the oracle hierarchical queries to see if there is a deterministic way of breaking the cycles.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/queries003.htm
    I understand that plain connect by query fails if there are cycles in the data, this can be over come by using the nocycles clause. But how does oracle handle the cycles if it finds one, is there a deterministic way of breaking the cycles, or is random? If it is deterministic, Is there a sophisticated algorithm you use to break the cycles?
    My sample query is as shown below:
    SELECT ename "Employee", CONNECT_BY_ISCYCLE "Cycle",
    LEVEL, SYS_CONNECT_BY_PATH(ename, ’/’) "Path"
    FROM scott.emp
    WHERE level <= 3 AND deptno = 10
    START WITH ename = ’KING’
    CONNECT BY NOCYCLE PRIOR empno = mgr AND LEVEL <= 4;
    Thanks,
    Paul

    Hi, Paul,
    849708 wrote:
    Thanks for the very detailed explanation Frank.
    It is interesting that the cycles are not broken at the time of the creation of the hierarchies, but at the time of the traversal.The relationship is only defined in the CONNECT BY clause of a query. When you create and populate tables, you don't indicate in any way that certain columns will be used in a CONNECT BY clause. You're free to use any columns you want when you write the query. You can use different columns and different relationships in different queries.
    This leads me to one more question:
    Lets say there are multiple routes from a given ancestor node to a decedent node, what would be the value of PATH pseudo column. Does it consider the shortest path or the longest path? If the two routes are of the same length? which would be used?The same node can appear more than once as a descendant of the same ancestor. All paths that satisfy the CONNECT BY clause (and the WHERE clause, if there is one) will be included. For example, the following query shows how Prince William is related to one of his ancestors, Anna Sophie (1700-1780):
    SELECT     LEVEL
    ,     SYS_CONNECT_BY_PATH (name, ' \ ')     AS path
    FROM     royal
    WHERE     name     = 'Anna Sophie of Schwarzburg-Rudolstadt'
    START WITH     name     = 'William of Wales'
    CONNECT BY     id     IN (PRIOR mother_id, PRIOR father_id)
    ;The genealogy table I used showed 8 different line of descent, ranging from 10 to 12 generations:
    LEVEL PATH
       11  \ William of Wales \ Charles, Prince of Wales \ Elizabeth II \ George
           VI \ George V \ Edward VII \ Victoria \ Victoria of Saxe-Coburg-Saalf
          eld \ Franz Frederick of Saxe-Coburg-Saalfeld \ Ernst Frederick of Sax
          e-Coburg-Saalfeld \ Anna Sophie of Schwarzburg-Rudolstadt
       12  \ William of Wales \ Charles, Prince of Wales \ Elizabeth II \ George
           VI \ George V \ Edward VII \ Albert of Saxe-Coburg and Gotha \ Louise
           of Saxe-Gotha-Altenburg \ Louise Charlotte of Mecklenburg \ Frederick
           Francis I of Mecklenburg \ Charlotte Sophie of Saxe-Coburg-Saalfeld \
           Anna Sophie of Schwarzburg-Rudolstadt
       11  \ William of Wales \ Charles, Prince of Wales \ Elizabeth II \ George
           VI \ George V \ Edward VII \ Albert of Saxe-Coburg and Gotha \ Ernest
           I, Duke of Saxe-Coburg and Gotha \ Franz Frederick of Saxe-Coburg-Saa
          lfeld \ Ernst Frederick of Saxe-Coburg-Saalfeld \ Anna Sophie of Schwa
          rzburg-Rudolstadt
       11  \ William of Wales \ Charles, Prince of Wales \ Elizabeth II \ George
           VI \ George V \ Alexandra of Denmark \ Louise of Hesse-Kassel \ Louis
          e Charlotte of Denmark \ Sophia Frederica of Mechlenburg-Schw. \ Charl
          otte Sophie of Saxe-Coburg-Saalfeld \ Anna Sophie of Schwarzburg-Rudol
          stadt
       11  \ William of Wales \ Charles, Prince of Wales \ Philip, Duke of Edinb
          urgh \ Alice of Battenberg \ Montbatten, Victoria \ Alice, Duchess of
          Hesse \ Victoria \ Victoria of Saxe-Coburg-Saalfeld \ Franz Frederick
          of Saxe-Coburg-Saalfeld \ Ernst Frederick of Saxe-Coburg-Saalfeld \ An
          na Sophie of Schwarzburg-Rudolstadt
       12  \ William of Wales \ Charles, Prince of Wales \ Philip, Duke of Edinb
          urgh \ Alice of Battenberg \ Montbatten, Victoria \ Alice, Duchess of
          Hesse \ Albert of Saxe-Coburg and Gotha \ Louise of Saxe-Gotha-Altenbu
          rg \ Louise Charlotte of Mecklenburg \ Frederick Francis I of Mecklenb
          urg \ Charlotte Sophie of Saxe-Coburg-Saalfeld \ Anna Sophie of Schwar
          zburg-Rudolstadt
       11  \ William of Wales \ Charles, Prince of Wales \ Philip, Duke of Edinb
          urgh \ Alice of Battenberg \ Montbatten, Victoria \ Alice, Duchess of
          Hesse \ Albert of Saxe-Coburg and Gotha \ Ernest I, Duke of Saxe-Cobur
          g and Gotha \ Franz Frederick of Saxe-Coburg-Saalfeld \ Ernst Frederic
          k of Saxe-Coburg-Saalfeld \ Anna Sophie of Schwarzburg-Rudolstadt
       10  \ William of Wales \ Charles, Prince of Wales \ Philip, Duke of Edinb
          urgh \ Andrew of Greece and Denmark \ George I of Greece \ Louise of H
          esse-Kassel \ Louise Charlotte of Denmark \ Sophia Frederica of Mechle
          nburg-Schw. \ Charlotte Sophie of Saxe-Coburg-Saalfeld \ Anna Sophie o
          f Schwarzburg-RudolstadtBy the way, SYS_CONNECT_BY_PATH is a function, not a pseudo-column. Pseudo-columns don't take arguments.
    I could have tested all this myself, but currently I do not have access to the database. Is there a publicly available database (through ssh) which I can use in the mean time :)You can download Oracle Express Edition.
    http://www.oracle.com/technetwork/database/express-edition/downloads/index.html
    It's free if all you're using it for is learning.
    You can also get a free workspace in an Oracle-hosted database at apex.oracle.com.
    Edited by: Frank Kulash on Apr 4, 2011 6:51 PM

  • How to line break in an SQL Report

    I have a simple SQL report with many columns that make the window very wide and the use has to scroll horizontally quite a lot.
    How can I make the line break after some column?
    Can someone give me a live example for that?

    Custom report template then is your answer.. Without seeing your initial report it would be hard to give you the code fully. However, if you open the standard report template for your theme, you could save it as a new template and edit it accordingly. You would find the column you wish to break on and create a new <tr> .. </tr> under the <td> definition..
    Thank you,
    Tony Miller
    Webster, TX

  • Export to Excel via web query (page breaks on every column?)

    The problem that I'm having is when a query is sent out via the reporting agent or whenever I export a web query to excel there are page breaks put on every column of the query. This becomes quite cumbersome whenever an end user or myself wants to print out a query.
    I have already transported the packages included in the  "How to Enhance Web Printing" and tested much of the functionality in BWD with no success.
    Can anyone shed some light on how to adjust the page breaks or format when exporting a web query to excel or when sending a query out via the reporting agent?
    Thanks,
    Chad
    BW Version 3.5  Support Package 18

    The problem that I'm having is when a query is sent out via the reporting agent or whenever I export a web query to excel there are page breaks put on every column of the query. This becomes quite cumbersome whenever an end user or myself wants to print out a query.
    I have already transported the packages included in the  "How to Enhance Web Printing" and tested much of the functionality in BWD with no success.
    Can anyone shed some light on how to adjust the page breaks or format when exporting a web query to excel or when sending a query out via the reporting agent?
    Thanks,
    Chad
    BW Version 3.5  Support Package 18

  • How to Select data using same column name from 3 remote database

    Hi,
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.
    Ex.
    SELECT *
    a.name, b.status, SUM(b.qty) qantity, MAX(b.date) date_as_of
    FROM
    *((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)a,*
    *(table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)b)*
    WHERE b.dept = 'finance'
    AND a.position = 'admin'
    AND a.latest = 'Y' AND (b.status <> 'TRM') AND b.qty > 0;
    GROUP BY a.name, b.status ;
    NOTE: the bold statements is just an example of what I want to do but I always gets an error beacause of ambiguous columns.
    Thanks in advnce. :)
    Edited by: user12994685 on Jan 4, 2011 9:42 PM

    user12994685 wrote:
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.Invalid. This does not make sense and breaks all scope resolution rules. And whether this is in a single database, or uses tables across databases, is irrelevant.
    Each object must be uniquely identified. So you cannot do this:
    select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a3 objects cannot share the same alias. Example:
    SQL> select * from (dual, dual) d;
    select * from (dual, dual) d
    ERROR at line 1:
    ORA-00907: missing right parenthesisYou need to combine the objects - using a join or union or similar. So it will need to be done as follows:
    SQL> select * from (select * from dual d1, dual d2) d;
    select * from (select * from dual d1, dual d2) d
    ERROR at line 1:
    ORA-00918: column ambiguously definedHowever, we need to have unique column names in a SQL projection - so the join of the tables need to project a unique set of columns. Thus:
    SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
    DUM DUM
    X   X
    SQL> I suggest that you look closely at what scope is and how it applies in the SQL language - and ignore whether the objects referenced are local or remote as it has no impact to fundamentals of scope resolution.

  • Breaking line in column header

    Hi,everybody
    How can I break the line in column header for two lines?
    Regards,
    Michael

    Hi michael,
    As per my knowledge the webdynpro accomodates the text you given as column header.I did so many experiments on this in my previous developement.There is no option to break the column header.See one thing if the number of columns are more in your table and the headers are too large and if you restrict the table size then this might will break the column header because of  table width.I am not sure.But there is no options to control this by the developer.This is totally the results of my experiments.If you acheive this please give me the procedure.
    Thanks and regards
    venkatakalyan K

  • How do I switch from one column to another in a simple 3-column document?  Seems lame, but I can't find the answer in "help"...

    How do I switch from one column to the next, skip around?  Tab key doesn't seem to do itl.  I can't find any "help" in "help".  Help.  Please.  Thank you.

    Hi Karen,
    It is simple.
    Columns fill with text as the text becomes enough to spill over from the previous column. Below is an example. I have used a huge (6" botom margin setting to shorten the page to a reasonable length for a screen shot, and turned on Show layout and Show invisibles so the column boundaries and invisible characters can be seen. Here there's no text in column 3 as there is only enough text to fill column 1 and part of column 2.
    As more text is added, it eventually fills column 2 and flows into column 3:
    You can force the text into the next column by inserting a column break. Here, a column break has repalced the paragraph break in column 2 (after 'fascilisi."):
    Regards,
    Barry

Maybe you are looking for

  • Source Files deteled from the folders

    Hi all, I'm new in Adobe Premiere Pro CS4, and I really need help to recover a couple of files or at leas try to understand what I did wrong. I started a new project  from an exiting project file, to suite my project I cleared from the time line and

  • I can't see my photo or image in a large size (zoom)

    I have Photo's Album in Facebook; when I want to look in a large size one by one, I can't to do it

  • How can i get the pageFlowscope value below the region

    Hi, I have included a region inside a fragment at starting position. While loading the fragment through task flow, region is excuting inside that region am setting the pageflowscope variable and am trying to get that in my main fragment(below the reg

  • Iphoto 09 displays nothing

    After a transfer of Iphoto library (Ilife 06) from my G5, Iphoto09 does not display the whole picture when clicking on the miniature. The row of miniatures is displayed at the top of the screen, but the screen is black eslsewhere. It seems that the p

  • How to change the Workflow Business Objects

    Hi, How to change the Workflow Business Objects. I need to add custom code to the Method. can I create only custom method or I need to copy the existing object to Custom object . Thanks Niranjan