Displaying result as columns

Hi,
I want to display the results of a query as the column names. How can i do this in report?

Can I assume you have two tables, one for column names and one for data? If so, you can create two separate repeating frames and align them manually on layout.

Similar Messages

  • Display data in column structure

    Hi all,
    I have statements like below:
    select distinct COL0 from aws_dbsum2
    select distinct COL2 from aws_dbsum2
    select distinct COL3 from aws_dbsum2
    select distinct COL4 from aws_dbsum2
    select distinct COL5 from aws_dbsum2
    select distinct COL6 from aws_dbsum2
    select distinct COL7 from aws_dbsum2
    select distinct COL8 from aws_dbsum2
    select distinct COL9 from aws_dbsum2
    select distinct COL10 from aws_dbsum2
    select distinct COL11 from aws_dbsum2
    select distinct COL12 from aws_dbsum2
    select distinct COL13 from aws_dbsum2
    /I am getting results..
    But i want to display results in column structure(all distinct value) like:
    when i use union i am getting duplicates...
    Col0    col1         col2 
    1       Norway     TV
    2       Germany    DVD
    3       China         Tube
    4       USA          thanks in advance
    Australia
    Edited by: Onenessboy on Sep 15, 2011 2:11 AM
    Edited by: BluShadow on 15-Sep-2011 13:47
    fixed code tag

    Hello
    There may be a simpler way but this is what I came up with. No matter what, you're going to have to access the table multiple times...
    WITH source_data AS
    (   SELECT 'Jive rocks' col1, 'Value 2' col2, 'Bananna' col3 from dual union all
        SELECT 'Jive rocks' col1, 'Badminton' col2, 'Bananna' col3 from dual union all
        SELECT 'Jive rocks' col1, 'Billiards' col2, 'Apple' col3 from dual union all
        SELECT 'Civet' col1, 'Coffee' col2, 'Bananna' col3 from dual union all
        SELECT 'Civet' col1, 'Badminton' col2, 'Pineapple' col3 from dual
    unpivot AS
    (   SELECT
            column_name,
            value,
            ROW_NUMBER() OVER (PARTITION BY column_name ORDER BY value) rn
        FROM
            (   SELECT
                    'COL1'  column_name,
                    col1    value
                FROM
                    source_data
                UNION
                SELECT
                    'COL2'  column_name,
                    col2    value
                FROM
                    source_data
                UNION
                SELECT
                    'COL3'  column_name,
                    col3    value
                FROM
                    source_data
    --select * from unpivot
    SELECT
        MAX
        (   CASE
                WHEN column_name = 'COL1' THEN
                    value
            END
        ) col1,
        MAX
        (   CASE
                WHEN column_name = 'COL2' THEN
                    value
            END
        ) col2,
        MAX
        (   CASE
                WHEN column_name = 'COL3' THEN
                    value
            END
        ) col3
    FROM
        unpivot  
    GROUP BY
        rn
    ORDER BY
        rnHTH
    David
    Edited by: Bravid on Sep 15, 2011 11:36 AM
    Edited by: Bravid on Sep 15, 2011 11:37 AM
    apparently mon-key is a spam word, and just for the record, I was not attempting to pro-mote my mon-key ten-nis dis-count bus-iness

  • Display results of MySQL query from AMFPHP by ArrayCollection in AS3 (Flash CS4)

    Hi, i am using Flash CS4 (AS3) + AMFPHP + MySQL to do own flash frontend for Wordpress CMS.  Everything is going fine but i`ve got one problem. Problem with properly display of result of query in AS3 by using ArrayCollection.
    When i check my service in "amfphp/browser/" in web browser i`ve got this (with all needed data):
    (mx.collections::ArrayCollection)#0
    filterFunction = (null)
    length = 2
    list = (mx.collections::ArrayList)#1  
    length = 2     source = (Array)#2
    That is the reason that i suppose that service work fine.  Problem is when i try to display result in AS3. In actionscript i have got this:
    function getNewsListHandler(result:Object):void{
    trace(result);
    This function displays: [object Object].
    I know that "result" is an ArrayCollection type but i don`t know how to get rows and columns from this. I know that my data is there but i have no idea how to get it.
    Clarify: I don`t know how to get to Arrays and simple data variables which are in ArrayCollection.
    Could anyone help me with that problem. I would be gratefull
    P.S. I tried also change query type in service.PHP for mysql_fetch_query but in that case i`ve got only one row (not all data).

    Thanks for fast reply,
    arr_coll:ArrayCollection = new ArrayCollection ({col1:"data1",col2:"data2"}, {col1:"data3",col2:"data4"});
    you would get the data like
    var resultstr:String = arr_coll[1][1].col2;
    trace(resultstr);
    //results in data4
    could you explain me how it was happen (arr_coll[1][1].col2)? It`s not clear to me. I thought in this case rather something like this :
    var resultstr:String = arr_coll[1]['col2'];
    It should give me "data4". I know it wasn`t but i don`t understand ArrayCollection in level which is needed to use your advice in my case. Could you clarify "arr_coll[1][1].col2" a bit?
    What would it look like when you would have something like this:
    arr_coll:ArrayCollection = new ArrayCollection ({col1:"data1",col2:"data2"}, {col1:"data3",col2:"data4"},{col1:"data5",col2:"data6"},{col1:"data7",col2:"data8"});
    and you would want know f.e. position in ArrayCollection of  "data6". How would you code this? arr_coll[1][2].col2?

  • How to display result of database query in JFrame?

    How to display result of oracle database query in JFrame?
    This is part of my code:
    String username, password;
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              OracleConnection conn = DriverManager.getConnection(String url, String username, String password);
    Statement s= conn.createStatement();
    ResultSet q= s.executeQuery("SELECT A, B, C FROM TABLE X");
    Forget what url, username & password are. Is there any problem with my code?
    What should be next if I want to display result of the query in a table in JFrame?Thx !

    How to create JTable with unknown no. of rows? How to get no. of rows of a query?
    I saw the demo of creating JTable on java.sun.com but the the table has a certain no. of rows which is not applicable to my case.
    Suppose the result of query is a table with 3 attributes so there are 3 columns in the table.
    R contains the result of the query.
    Should it be something like this if I want to create JTable of the query?
    How to make n rows of {R.getString(1),R.getString(2),R.getString(3)};?
    public SimpleTableDemo() {
    super(new GridLayout(1,0));
    String[] columnNames = {"A",
    "B",
    "C",
    while (R.next())
    // content of a row
    Object[][] data = {R.getString(1),R.getString(2),R.getString(3)};
    I can't run it because I still can't debug my code which is said before.
    Thx!

  • Display result Group wise

    Hello experts,
    Update type is key in report.
    It has two values. 1000 & 2000.
    I want to display result after displaying all the values of 1000.
    same for 2000 values.
    Ex:
    1000    ICICI     100
               HDFC   200
               SBI      300
    Result             600
    2000    ICICI     150
               HDFC   250
               SBI      350
    Result             750
    Thank You.
    KV

    Hi KV,
      keep update type and necessary other fields in rows ...
    and values in columns ....
    as the update type is outer most field u need to keep display on the next field in the rows ....
    if u keep display of result for outer most one then it will show after the last value...
    u need to keep resuls row display off for update type and keep result row display for the next field in rows... then u can get the indivudal update type result displays...as u showed...
    Regards
    vamsi

  • How to display oracle BOLB column data forms

    Hello Francois ,
    I also want to display a BLOB column value on Oracle front-end (but this is oracle form 6i version)
    I tried your below method but i was not able to make it work....
    it displays the other details wen quired but not the blob data column
    please help --- urget solution required
    <<<<<<<
    Create a block based on the table you have the BLOB image, then use an Image Item based on that BLOB column. All you have to do, then is an execute_query() instruction to populate the Image Item.
    Francois

    I'm not convince that the null pointer exception is coming from the database. Rather, whatever you wrote to package the result might be at fault. Regardless, typically, to avoid the web container swallowing an exception is to catch it yourself. Your database call will need to catch the exception and repackage it for the JSP. A bad style would be to use scriptlet and catch the exception, but it could be useful for debugging.

  • How to display record in column mode?

    Hi,
    I have difficulty in displaying record in column mode.
    Example: I have CALENDAR table with column DATECOL
    CALENDAR
    DATECOL DATE
    Data in CALENDAR table is follow : 1/1/06, 2/1/06, 3/1/06, 4/1/06, 5/1/06, 6/1/06
    How to create SELECT statement so result will be follow:
    DATECOL 1 2 3 4 5 6
    Any advise from you ?
    Regards

    Hi,
    Try this:
    DECLARE
    z_result VARCHAR2(2000) := ' ';
    CURSOR c1 IS
    SELECT DATECOL
    FROM CALENDAR;
    BEGIN
    FOR i IN c1 LOOP
    z_result := z_result || TO_CHAR(i.DATECOL,'DD') || ' ';
    END LOOP;
    DBMS_OUTPUT.ENABLE;
    DBMS_OUTPUT.PUT_LINE('DATECOL ' || z_result);
    END;
    Peter D.

  • SAP Bex: Not Enough cells to display result

    Hi,
    In BW 3,5 Analyzer, if user typed some values next to the reported columns and then tried to drill down on columns say characteristics profit center, the system used to display a message with options like below:
    ''SAP Bex: Not enough cells to display result
    -TO extend the result areas to the right:
    0 Overwirte the existing cells
    0 insert cells next to the results area
    0 insert entire columns''
    After upgrading the query to 7.0, the Analyzer does not pop-up this information and it simply overwrites the existing cells.
    Can you please advise, if there are some settings in BI 7.0 which can enable pop-up of this information window with above options?
    Please suggest.
    Best Regards,
    UR

    Hi,
    Try setting the cells which are not to be overwritten as formulas and refreshing them which may not overwrite those cells.
    Thanks,
    Arun

  • Problem in displaying the TaxRate columns .

    Hi Experts,
                            I am having a problem in displaying the 'TaxRate', in this Query there are some different Taxrate's columns  like-  ' 'Basic Excise Duty BED@10 %',  ' Education ces@2% ' , 'Secondary Education Cess @1%',    etc.   only  4 -5  tax's value should display  at a  time  and rest of  the TaxRate's  columns whose value is NULL  should not display.
    So, I want to display only those TaxRate's  columns whose  value  is not NULL  and If there is  no value for any taxrate's column  in the data, then it should Display only 'Excempt' column.
    This is my query...
    SELECT DISTINCT OSTA.Code , ORPC.DocNum AS 'Debit Note No.', ORPC.CardName AS 'Name', ORPC.CardCode AS 'code', ORPC.NumAtCard AS 'Supplier Ref.'  ,
                          RPC1.Dscription AS 'Description of Goods', ORPC.Address, RPC1.Quantity, RPC1.Price AS 'Rate', RPC1.LineTotal AS 'Amount', ORPC.DocDate,
                              (SELECT DISTINCT TaxRate
                                FROM          RPC4
                                WHERE      (staType = - 90) AND (StaCode = 'BED@10') AND (DocEntry = RPC1.DocEntry)) AS 'Basic Excise Duty BED@10 %',
                             (SELECT DISTINCT TaxRate
                                FROM          RPC4 AS RPC4_8
                                WHERE      (staType = - 60) AND (DocEntry = RPC1.DocEntry)) AS 'Education Cess @2%',
                             (SELECT DISTINCT TaxRate
                                FROM          RPC4 AS RPC4_7
                                WHERE      (staType = - 55) AND (DocEntry = RPC1.DocEntry)) AS 'Secondary Education Cess @1%',
                             (SELECT DISTINCT TaxRate
                                FROM          RPC4 AS RPC4_6
                                WHERE      (staType = 4) AND (StaCode = 'CST2') AND (DocEntry = RPC1.DocEntry)) AS 'Central Sales Tax(CST)',
                             (SELECT DISTINCT TaxRate
                                FROM          RPC4 AS RPC4_5
                                WHERE      (staType = 1) AND (StaCode = 'VAT4') AND (DocEntry = RPC1.DocEntry)) AS 'Input VAT@5%',
                              (SELECT DISTINCT TaxRate
                                FROM          RPC4 AS RPC4_4
                                WHERE      (staType = 1) AND (TaxRate = 12.500000) AND (StaCode = 'VAT12.5') AND (DocEntry = RPC1.DocEntry)) AS 'VAT12.5%',
                           (SELECT DISTINCT TaxRate
                                FROM          RPC4 AS RPC4_3
                                WHERE      (staType = 18) AND (StaCode = 'Add2') AND (DocEntry = RPC1.DocEntry)) AS 'ADD Tax 1%',
                                  (SELECT DISTINCT TaxRate
                                FROM          RPC4 AS RPC4_2
                                WHERE      (staType = 7) AND (DocEntry = RPC1.DocEntry)) AS 'Excempt'
    FROM         OSTA INNER JOIN
                          RPC4 AS RPC4_1 ON OSTA.Code = RPC4_1.StaCode CROSS JOIN
                          ORPC INNER JOIN
                          RPC1 ON ORPC.DocEntry = RPC1.DocEntry
    WHERE     (OSTA.Code IN ('BED@10','eCess 2%','HeCess 1%','CST')) AND (ORPC.CardCode = 'V00308') AND (ORPC.DocNum = '9220004')
    Kindly help me to solve this problem
    Regards
    Rahul

    Hi rahul,
    Try this:
    SELECT DISTINCT T0.DocNum AS 'Debit Note No.', T0.CardName AS 'Name', T0.CardCode AS 'code', T0.NumAtCard AS 'Supplier Ref.'
         ,T1.Dscription AS 'Description of Goods', T0.Address, T1.Quantity, T1.Price AS 'Rate', T1.LineTotal AS 'Amount', T0.DocDate,
         (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0)FROM RPC4 WHERE RPC4.StaType = -90 AND RPC4.DocEntry = T0.DocEntry) AS 'Basic Excise Duty BED@10 %',
         (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = -60 AND RPC4.DocEntry = T0.DocEntry) AS 'Education Cess @2%',
         (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = -55 AND RPC4.DocEntry = T0.DocEntry) AS 'Secondary Education Cess @1%',
         (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 4  AND RPC4.StaCode = 'CST2' AND RPC4.DocEntry = T0.DocEntry) AS 'Central Sales Tax(CST)',
         (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 1  AND RPC4.StaCode = 'VAT4'AND RPC4.DocEntry = T0.DocEntry) AS 'Input VAT@5%',
         (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 1 AND RPC4.StaCode = 'VAT12.5'AND RPC4.DocEntry = T0.DocEntry) AS  'VAT12.5%',
         (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 18 AND RPC4.StaCode = 'Add2'AND RPC4.DocEntry = T0.DocEntry) AS   'ADD Tax 1%',
         (SELECT DISTINCT ISNULL (SUM(RPC4.TaxRate),0) FROM RPC4 WHERE RPC4.StaType = 7 AND RPC4.DocEntry = T0.DocEntry) AS  'Excempt'
    FROM ORPC T0
         INNER JOIN RPC1 T1 ON T0.DocEntry = T1.DocEntry
    WHERE  (T0.CardCode = 'V00308') AND (T0.DocNum = '9220004')
    FOR BROWSE
    Thanks,
    Neetu

  • How can I display all the columns on the screen without scrolling from side to side?

    My clinic software has many columns. How can I display all the columns without having to scroll from left to right all the time?

    If the software you are using doesn't offer the ability to increase or decrease document size, as many do, then the only way is to increase your screen resolution. If that's not possible, maybe you can decrease your font size?  If you can't do any of these, I think you're out of luck!

  • In the new Numbers, How can I get a 2D stacked column chart to display only 1 column?

    In the new Numbers, How can I get a 2D stacked column chart to display only 1 column?

    This is one of those things that I find really strange about Numbers 3. The control for what you want to do is not where anyone would expect to find it.
    Select the Chart
    Click on Edit Data References
    Look at the bottom left corner of the Numbers window. It should say "Plot Columns as Series" or "Plot Rows as Series"
    Click on it and change it to the other

  • Need help in displaying Rows to Columns

    Hi,
    I am facing problem in displaying Rows to Columns
    I am using pivot function:
    select *
    from
    (select vendor_name
    from tablea)
    pivot
    (count(vendor_name)
    for vendor_name in ('a,b,'c'));
    its working fine showing vendor_name and count
    but when i want to display the output as:(How to include the Salalry column in the query?)
    Name:{a b c}
    Sal Total:(400,600,800}
    Any help will be needful for me

    Not sure what you mean:
    select  *
      from  (select deptno,sal from emp)
      pivot(sum(sal) for deptno in (10,20,30))
            10         20         30
          8750      10875       9400
    SQL> SY.

  • How to configure search results web part to display results only after a query is generated from user?

    Hi All,
    I am crawling documents from a file server. I created a new content source and crawled the documents. All documents are crawled successfully.
    Then I went to my enterprise search center site collection and created a new result source. I have added the query to use above content source.
    After that, on a page I am trying to configure the search results web part to display documents using this result source. Now the problem is:
    It displays all the documents that are crawled without searching for anything. I mean first it should not display any results. If a user searches for something , then according to that search it should display results.
    Any idea how to do this in the web part? I am using SharePoint 2013 on premise enterprise edition. No code. Totally OOTB.

    Hi Mohan,
    What did you use for the Query text in the result source?
    I could reproduce this issue when I used Query text like: {searchTerms} Path:”http://sps2k13sp/sites/First/Shared%20Documents”
    Then I changed the Query to
    {?{searchTerms}
    Path:"http://sps2k13sp/sites/First/Shared%20Documents"}
    , then Search result web part didn’t return results without searching.
    So , check your result source, and use the Query like the above(adding "{?...}").
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Unable to display results of multiple query in grid in Oracle SQL Developer

    Hi, I am a newbie to this forum and couldn't find the Oracle SQL Developer forum so posting it here.
    My question: How to display multiple query results in grid in Oracle SQL Developer.
    Example:
    select * from Employee;
    select * from Department;
    - when I select both the queries and hit F5 in Oracle sql developer. By default it displays in output window.
    - How to display result of both the queries in Grid.
    Any thoughts on this would be really helpful.
    Thanks in advance.
    Harsh

    Hi Harsh,
    I'd say that the Results grid is designed to only show the results of 1 query at a time. I don't know/can't see how it would display multiple queries at a time.
    I would suggest either joining your tables to create a single query or opening another SQL Worksheet for one of the queries so that you can display the results side-by-side.
    Maybe you could explain what you're trying to do. Why are you trying to display multiple results in the same query grid?

  • How to simply display resulting text in a dialog Box

    Is there a way to simply display resulting text in a dialog Box - not a text edit document?
    Doug_

    Thanks that's very helpful
    What I am trying to to is to create a workflow that opens mail and displays iCal TO DO's that I have created throughout the day tagged with the word MAIL so they can be filtered.
    At the moment the ACTIONS are:
    Launch Mail
    Get New Mail
    Find TO DOs in iCal (Who's SUMMERY includes MAIL)
    I get iCal To Do's as a result
    But then...I can find no options to display the iCal Events that result.
    Putting in the Applescript you posted displays a blank dialog box. This tells me that there is no text in the result.
    Yet if I put a SPEAK TEXT in after find TO DOs it dutifully speaks my filtered TO DO's
    I thought I might just try a NEW MAIL MESSAGE action.
    This works great in the workflow. The content of the new mail is the filtered TO DOs.
    But if I save it as an application (the form I need it in), mail simply opens blank when it reached that part of the work flow.
    What would you recommend?
    Thank again for your help,
    Doug_
    Message was edited by: Douglas Suiter
    Message was edited by: Douglas Suiter
    Message was edited by: Douglas Suiter

Maybe you are looking for

  • Short Dump....itab

    Hai All, I have done an ALV Report Program, which while executing goes to the short dump and the error msg says: " You attempted to change, delete or create a line in the internal table "???", but no valid cursor exists for the table. Possible reason

  • Mouse Pointer Settings

    I have a HPG60-549DX Notebook.  Sometimes when the mouse cursor sits over certain things (but not all things) that can be opened, they open when I don't want them to.  I would prefer that things only open when I actually click on them.  I have gone i

  • From iPhoto 2 to iPhoto 6 in one leap?

    I've probably had iPhoto in my iMac for several years, but I've never tried to use it because of techphobia. Today, however, I decided to give it try, since I have always found David Pogue's books to be informative and easy to follow. Anyway, I soon

  • How to conf mile stone billing for contract sales

    Dear Gurus, I want to config sales of Residential flats through contract with mile stone billing.could u pls send the conf steps reg this senario. Steps 1.Contract agreement 2.sales order 3.Mile stone billing. These r the 3 steps in this process.I ho

  • Work flow Template

    Hi Experts,           My scenario is I need to create an Process code based on Function module and when the process code triggers it will automatically fetch the work flow template. So what are the import, export parameters are need to call the WF te