XMLtype column report query

I want to have a user input information into a text box and use the information to query my xmltype column (Oracle 11g) to extract data from a few of the tags and generate a report. From what I can tell APEX query builders for generating reports do not allow you to use xmltype columns. Is there another way to do this? I can write xml queries in SQL but I don’t know how to take the results and make a report in APEX. Does anyone know how to do this? Thanks!

Wrong forum.. queries using contains should be posted in the oracle text forum..

Similar Messages

  • Please guide to improve the performance of XML column reading query.

    Hi Experts,
    The below query is taking 45 seconds to return 170 records.
    Due to selecting XMLTYPE column in query.
    select *
    from RANGE where WSNO = 3
    order by PREFERENCE desc;
    The total number of records in the table is 1060.
    Even it's a very small table why it's taking 45 seconds.
    Can anybody please help me on how to get the output in 2 to 3 seconds.
    I want all the columns from the table.
    The problem only with REST column XMLTYPE.
    If I am not selecting this column I am getting output in 1 to 2 seconds.
    I am posting the execution plan and DDL for table and index.
    PLAN_TABLE_OUTPUT
    Plan hash value: 3593186720
    | SNO  | Operation                    | EMPNAME                   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                        |    31 | 23281 |    21   (5)| 00:00:01 |
    |   1 |  SORT ORDER BY               |                        |    31 | 23281 |    21   (5)| 00:00:01 |
    |   2 |   TABLE ACCESS BY INDEX ROWID | RANGE                 |    31 | 23281 |    20   (0)| 00:00:01 |
    |*  3 |    INDEX RANGE SCAN          | INDX_WSNO              |    31 |       |     1   (0)| 00:00:01 |
    Predicate Information (SNOentified by operation SNO):
       3 - access("WSNO"=3)
    CREATE TABLE RANGE
      SNO                              NUMBER,
      BUSNO                            NUMBER,
      EMPNAME                          NVARCHAR2(64),
      PREFERENCE                       NUMBER,
      TSNO                             NUMBER,
      MEMBER                          CHAR(1 CHAR) ,
      EQU                             CHAR(1 CHAR) ,
      REMAIL                          CHAR(1 CHAR) ,
      SSR                             CHAR(1 CHAR) ,
      SUB                             CHAR(1 CHAR) ,
      SPN                             CHAR(1 CHAR) ,
      SEMPNAME                        NVARCHAR2(128),
      FVL                             NUMBER(32),
      TVL                             NUMBER(32),
      ISD                             CHAR(1 CHAR),
      CHANGED                         NVARCHAR2(64),
      CDATE                           TIMESTAMP(6) ,
      UDBY                            NVARCHAR2(64),
      UDATE                           TIMESTAMP(6),
      LSTU                            CLOB,
      WSNO                            NUMBER,
      ASTN                            CHAR(1 CHAR),
      ASTNPL                          CHAR(1 CHAR),
      AVAF                            CHAR(1 CHAR),
      REST                            SYS.XMLTYPE
    TABLESPACE USERS
    PCTUSED    0
    PCTFREE    10
    INITRANS   11
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                NEXT             1M
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    XMLTYPE REST STORE AS CLOB
          ( TABLESPACE  USERS
            ENABLE      STORAGE IN ROW
            CHUNK       8192
            PCTVERSION  10
            NOCACHE
            INDEX       (
              TABLESPACE USERS
              STORAGE    (
                          INITIAL          64K
                          NEXT             1
                          MINEXTENTS       1
                          MAXEXTENTS       UNLIMITED
                          PCTINCREASE      0
                          BUFFER_POOL      DEFAULT
            STORAGE    (
                        INITIAL          64K
                        NEXT             1M
                        MINEXTENTS       1
                        MAXEXTENTS       UNLIMITED
                        PCTINCREASE      0
                        BUFFER_POOL      DEFAULT
      LOB (LSTU) STORE AS
          ( TABLESPACE  USERS
            ENABLE      STORAGE IN ROW
            CHUNK       8192
            RETENTION
            NOCACHE
            INDEX       (
              TABLESPACE USERS
              STORAGE    (
                          INITIAL          64K
                          NEXT             1
                          MINEXTENTS       1
                          MAXEXTENTS       UNLIMITED
                          PCTINCREASE      0
                          BUFFER_POOL      DEFAULT
            STORAGE    (
                        INITIAL          64K
                        NEXT             1M
                        MINEXTENTS       1
                        MAXEXTENTS       UNLIMITED
                        PCTINCREASE      0
                        BUFFER_POOL      DEFAULT
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE INDEX INDX_WSNO ON RANGE(WSNO);
    CREATE UNIQUE INDEX RULE_EMPNAME ON RANGE(BUSNO, EMPNAME);
    Please help me how to improve the performance of this query.
    Thanks.

    Can you try something like this and check if its faster? (this is just my guess as I dont have your data )
    SELECT SNO,
           BUSNO,
           EMPNAME,
           PREFERENCE,
           TSNO,
           MEMBER,
           EQU,
           REMAIL,
           SSR,
           SUB,
           SPN,
           SEMPNAME,
           FVL,
           TVL,
           ISD,
           CHANGED,
           CDATE,
           UDBY,
           UDATE,
           LSTU,
           WSNO,
           ASTN,
           ASTNPL,
           AVAF,
           xmltype.getclobval (rest) rest
      FROM RANGE
    WHERE wsno = 3
    order by PREFERENCE desc;
    Cheers,
    Manik.

  • Request: Report queries should treat a xmltype column as a xmlelement

    In the shared components you can define a report query for creating PDF reports for example.
    APEX will transform the results of the defined sql query to xml on runtime.
    Each column of the query becomes a xmlelement. The values of the column will be the text data of the xmlelement.
    In the current APEX versions a xmltype column in the sql query is not supported sadly enough.
    I would like to see that if a column is a xmltype that APEX treats its values as a xmlelement and not as text.
    This way it makes it possible to construct more meaningful xml structures using sqlx functions (xmlelement, xmlagg, etc...)
    For example:
    Report query
    select xmlelement("USER",xmlattributes(u.user_id as "ID")
    ,xmlelement("NAME",u.username)) users
    from all_users u
    where rownum < 3
    will now be transformed in
    <?xml version="1.0" encoding="UTF-8"?>
    <ROWSET>
    <ROW>
    <USERS>[unsupported data type]</USERS>
    </ROW>
    <ROW>
    <USERS>[unsupported data type]</USERS>
    </ROW>
    </ROWSET>
    It should be:
    <?xml version="1.0" encoding="UTF-8"?>
    <ROWSET>
    <ROW>
    <USERS>
    <USER ID="0">
    <NAME>SYS</NAME>
    </USER>
    </USERS>
    </ROW>
    <ROW>
    <USERS>
    <USER ID="5">
    <NAME>SYSTEM</NAME>
    </USER>
    </USERS>
    </ROW>
    </ROWSET>
    Or make it an option that it is possible to define a xml query instead of a sql query.
    APEX doesn't have transform the query results in to xml on runtime, because the result is already a xml.
    For example:
    XML query
    select sys_xmlagg (sys_xmlgen (xmlelement ("USERS"
    ,xmlelement ("USER"
    ,xmlattributes (u.user_id as "ID")
    ,xmlelement ("NAME"
    ,u.username)))))
    users
    from all_users u
    where rownum < 3
    results in:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <USERS>
    <USER ID="1">
    <NAME>SYS</NAME>
    </USER>
    </USERS>
    </ROW>
    <ROW>
    <USERS>
    <USER ID="5">
    <NAME>SYSTEM</NAME>
    </USER>
    </USERS>
    </ROW>
    </ROWSET>

    Thank you for a quick response, but I am really surprised/confused by your answer.
    User-agent already reports operating system. Adding the width/height of the device is not really any more private than that and is definitely not a personally identifiable information. What does it have to do with privacy?
    We are not asking to report any device capability that Javascript does not already have access to. So if somebody wanted to gather the information s/he could already gather it by making an Ajax request through Javascript. The only difference is: that won't help images or Responsive Web efforts in a clean way.
    Bottomline: this information is already available and is not of a Private Identifiable category. We just need to make it available in a manner in which it can be used for good.

  • Help on how to query 11g table with XMLType column

    To all,
    We have this table:
    DESC MESSAGE
    Name Null Type
    MESSAGE_ID NOT NULL NUMBER(38)
    REQUEST_UU_ID NOT NULL VARCHAR2(50)
    MESSAGE_TYPE_CD NOT NULL CHAR(3 CHAR)
    EMPLOYEE_NUM NOT NULL VARCHAR2(8)
    SEQUENCE_NUM VARCHAR2(20)
    REVERSAL_SEQUENCE_NUM VARCHAR2(20)
    TRANSACTION_TS TIMESTAMP(6)
    MESSAGE_CONTENT_TXT NOT NULL XMLTYPE()
    CREATE_BY_NM NOT NULL VARCHAR2(50 CHAR)
    CREATE_BY_TS NOT NULL TIMESTAMP(6)
    LAST_UPDATE_BY_NM NOT NULL VARCHAR2(50 CHAR)
    LAST_UPDATE_BY_TS NOT NULL TIMESTAMP(6)
    Given we have multiple columns and one is XMLType how do I query to find rows in the db that match this XPath
    Here is a fragment of XML that is held in MESSAGE_CONTENT_TXT XMLType column:
    <?xml version="1.0" encoding="UTF-8"?>
    <cfg-env:Envelope xmlns="http://www.co.com/schemas/CFX/" xmlns:cfg-env="http://www.co.com/schemas/cfg-env/" xmlns:cfg-hdr="http://www.co.com/schemas/cfg-hdr/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.co.com/schemas/cfg-env/" >
         <cfg-env:Header>
              <cfg-hdr:MessageHeader xmlns:cfg-hdr="http://www.co.com/schemas/cfg-hdr/" xmlns:cfg-env="http://www.co.com/schemas/cfg-env/" xmlns="http://www.co.com/schemas/CFX/">
                   <cfg-hdr:Service>
                        <cfg-hdr:ServiceName>process</cfg-hdr:ServiceName>
                        <cfg-hdr:MessageType>Request</cfg-hdr:MessageType>
                        <cfg-hdr:ServiceVersion>1</cfg-hdr:ServiceVersion>
                   </cfg-hdr:Service>
                   <cfg-hdr:From>
                        <cfg-hdr:PartyId>13-175-8724</cfg-hdr:PartyId>
                        <cfg-hdr:CostCenter>2009065</cfg-hdr:CostCenter>
                        <cfg-hdr:System>
                             <cfg-hdr:Application>[email protected]</cfg-hdr:Application>
                             <cfg-hdr:Version>1.0</cfg-hdr:Version>
                             <cfg-hdr:Channel>TLR</cfg-hdr:Channel>
                        </cfg-hdr:System>
                        <cfg-hdr:OrigReplyToQMgr>QMBKRD01</cfg-hdr:OrigReplyToQMgr>
                        <cfg-hdr:OrigReplyToQ>Q1</cfg-hdr:OrigReplyToQ>
                   </cfg-hdr:From>
                   <cfg-hdr:UserSession>
                        <cfg-hdr:SignonRole>User</cfg-hdr:SignonRole>
                        <cfg-hdr:LogonId>R099999</cfg-hdr:LogonId>
    I'm trying to find rows in the database that are /Envelope/Header/MessageHeader/UserSession/LogonId/R099999.
    Thanks for the assistance. I'm new to XML DB. I appreciate the help.
    Eric

    Hi Eric,
    You can use XMLExists, like this :
    select *
    from message t
    where xmlexists(
          'declare namespace env = "http://www.co.com/schemas/cfg-env/"; (: :)
           declare namespace hdr = "http://www.co.com/schemas/cfg-hdr/"; (: :)
           /env:Envelope/env:Header/hdr:MessageHeader/hdr:UserSession[hdr:LogonId=$id]'
           passing t.message_content_txt
                 , 'R099999' as "id"
    );

  • Report region with column link that opens a pdf doc based on report query

    Hello
    I'm building a report table that displays info about a customer - simple select - and, for each record, has associated column links based on report queries that receive ID as parameter. When clicked, it opens the report in pdf extension. My problem here is how to pass the ID as a parameter to that report query considering i'm using a report table and that there are no items in page 71...
    This is the report query i'm using:
    select initcap(a.customer) customer
    , initcap(a.address) address
    , initcap(a.rep) rep
    , (select initcap(b.city)
    from portal_records b
    where b.contrib=a.contrib
    and b.year=to_char(sysdate,'yyyy')) city
    , (to_char(a.datereg,'dd')||' de '||to_char(a.datereg,'Month')||' de '||to_char(a.datereg,'yyyy')) datereg
    from portal_authorizations_cve a
    where a.id=:P71_ID ???????????????
    I thank in advance all your replies!!

    Hello
    First of all, let me compliment your for your demo application... It's awesome!
    I've looked into your sample (page 15) and, as far as i see, it opens a document saved in a table's column. I don't want the file to be saved there but generated when the user clicks on that particular link... So i still have the problem of how to pass the right ID as a parameter considering there is no page item on that page...
    My javascript knowledge is little so i ask you: when clicking the link, is there any way of opening a window with the url f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=Authorization_CVE and the ID as a parameter?
    I thank in advance!

  • APEX 4.0 Report Query column limitation, 43 column maximum for the result!

    Hi there,
    I'm trying to generate report from Apex 4.0.1, but I got stucked with column limitation when I'm executing the report query.
    Case:
    Environment: oracle 11g, apex 4.0.1, oracle BI 11, windows xp
    Table: My test table is quite simple, by creating a sample table with 44 columns, the column name is random, i.e. column1..column44, column data type is varchar2 (20)
    report query:my report query is also simple, by "select * from testtable"
    Data: no data in my sample table
    Error: then I'll get the error: "HelpORA-06502: PL/SQL: numeric or value error: character string buffer too small"
    solution: If I shrink the table column from 44 to 43, then the report can be generated to xls, pdf, etc.
    Question: Is there any column limitation for Apex report query? I know there's a 32k row size limitation for varchar, but since there's no single data in my table, it shouldn't be the case.
    Does anybody get this issue before? Thanks for any generous input!! :)
    Horatio

    hi marko,
    Thanks for the reply, but i can't find the 45 column limitation from report query and report printing. any clue for this call?
    Regards
    Horatio

  • Problem query of XMLType column in XSQL servlet

    Hi all,
    I'm having trouble debugging the following error from a query on an XMLType column in an XSQL page query:
    <page xmlns:xsql="urn:oracle-xsql" connection="jdbc/DBConnection1DS">
    <xsql:query max-rows="1" null-indicator="no">
    SELECT extractValue(x.DOCBOOKS_DOC, '/book/part/title', 'xmlns="http://docbook.org/ns/docbook"') "BOOK TITLE"
    FROM DOCBOOKS_STORE x
    </xsql:query>
    </page>
    which returns the following error message:
    <page>
    <ERROR>
    oracle.xml.sql.OracleXMLSQLException: Character ' ' is not allowed in an XML tag name.
    </ERROR>
    </page>
    The SQL query works fine in the SQL Worksheet and SQL Plus, only when I stick it in an XSQL query. I've tested the XSQL Page environment with a query on Number Datatype column and no issues there either.
    Any suggestions, much appreciated. Thanks.
    George

    The XML SQL Utility creates XML tags named after your column aliases.
    You have aliased the column to a name containing a space: "BOOK TITLE"
    This error is telling you that the implied XML element whose name matches this column alias, which would be <BOOK TITLE> is not a legal name for an XML element since it has a space in it.
    You'll need to pick a column alias with no space in the name. For example, "BOOK_TITLE" and then in your XSLT stylesheet (or whatever downstream formatting tool you may be using) remove the underscore from the name and replace it with a space.

  • Report Query using a Named Column Report Layout fails to produce PDF

    I am testing FOP and the Shared Component Report Queries query with a Named Column Report Layout. The xsl file was built using Stylus Studio and worked fine with the saved XML data file in Stylus Studio.
    500 Internal Server Error
    500 Internal Server Error
    Servlet error: An exception occurred.
    The current application deployment descriptors do not allow for including it in this response.
    Please consult the application log for details.
    I assume this is a message from FOP. What do I do now?
    tia,
    Sam

    Sam,
    I would suggest to take APEX out of the picture first and see if you can get this to work directly with your FOP solution, i.e. generate the XML data and take your XSL file and then post it directly to the FOP JSP (or whichever rendering engine you use). If this works, the problem might be somewhere in your APEX configuration. If it doesn't work, then the problem is likely in your XSL or XML structure. Here's how you can setup a static HTML page to post your XML and XSL to FOP:
    http://marcsewtz.blogspot.com/2008/06/heres-another-posting-on-pdf-printing.html
    Regards,
    Marc

  • Update query for XMLTYPE column

    Hello everyone,
    I have inserted xml data into XMLTYPE column of my table,xml data is something like this
    <Data type="FYI">                         
    <ID xmlns="http://orcl.com">T-1-1</ID>
    <Category>FRAME</Category>
    <ProductID>1</ProductID>
    <Name xmlns="http://orcl.com">Frame </Name>
    <Type>BASIC</Type>
    <Code>INSTALL</Code>
    <NodeID>1</NodeID>
    </Data>
    Now i need to update the values inside the <Data> element,like
    ID == T-2-2
    Category == IFRAME
    ProductID == 1.1
    Name == IFRAME
    We are using oracle 10g R2.
    Please help me out how to update. It would be very thankfull for your valuble suggestions
    Thanks in advance

    <Services>
    <DataService type="FRLY">
    <ID xmlns="http://www.openapplications.org/oagis/9">T-1-1-FRLY</ID>
    <CategoryCode>FRAME</CategoryCode>
    <ProductOfferingID>1</ProductOfferingID>
    <Name xmlns="http://www.openapplications.org/oagis/9">Frame Relay</Name>
    <SubType>FRLY - BASIC</SubType>
    <ActionCode>INSTALL</ActionCode>
    <NodeID>1</NodeID>
    <Contract>
    <ID xmlns="http://www.openapplications.org/oagis/9" schemeName="Networx Universal">00000</ID>
    <Category name="Contract Type">U</Category>
    </Contract>
    <Contract>
    <Type xmlns="http://www.openapplications.org/oagis/9">Routine</Type>
    </Contract>
    <CustomerParty>
    <Location/>
    </CustomerParty>
    <ProvisioningStatus type="BillingSetup">
    <Description xmlns="http://www.openapplications.org/oagis/9">C</Description>
    </ProvisioningStatus>
    <MileStone>
    <ID xmlns="http://www.openapplications.org/oagis/9">CWD</ID>
    <Date>2007-01-29</Date>
    </MileStone>
    <ActivityStatus>
    <Code xmlns="http://www.openapplications.org/oagis/9" name="DueDate"/>
    <EffectiveDateTime xmlns="http://www.openapplications.org/oagis/9">2007-01-29T00:00:00Z</EffectiveDateTime>
    </ActivityStatus>
    <AssociatedIDs>
    <ID xmlns="http://www.openapplications.org/oagis/9">1</ID>
    </AssociatedIDs>
    <AssociatedIDs>
    <TemporaryID schemeName="OPKEY">34908</TemporaryID>
    </AssociatedIDs>
    <Location>
    <ID xmlns="http://www.openapplications.org/oagis/9">T-510092</ID>
    </Location>
    <OrderID>RequestID</OrderID>
    <Accessory>
    <ActionCode>ADD</ActionCode>
    <Description xmlns="http://www.openapplications.org/oagis/9">IBM ESERVER-XSERIES306</Description>
    <CategoryCode>5</CategoryCode>
    <InstallVendorParty>
    <Name xmlns="http://www.openapplications.org/oagis/9">MCI</Name>
    </InstallVendorParty>
    </Accessory>
    <Circuit>
    <ID xmlns="http://www.openapplications.org/oagis/9">T-1-1-FRLY</ID>
    <AssociatedIDs/>
    </Circuit>
    </DataService>
    </Services>
    This was my xml which i have inserted into DB for the column XMLTYPE.Now i need to update few values in this whole file like values of
    ID under<DataService>
    Name under <DataService>
    ID under <Contract>
    Description under <ProvisioningStatus>
    i was using the UPDATEXML query to update those it's saying i row updated but when i extract it says null.
    Please help me out to solve this problem.
    Thanks in advance.

  • Reporting on XMLType columns

    Looking for a reporting tool that will allow business users troubleshooting data issue the capability of writing reports against tables that have data in XMLType columns without requiring that the users be able to fluently read XML. All help appreciated.
    Art

    Looking for a reporting tool that will allow business users troubleshooting data issue the capability of writing reports against tables that have data in XMLType columns without requiring that the users be able to fluently read XML. All help appreciated.
    Art

  • Items in project report(query) are listed under the "not assigned" (column)

    Hi All,
    Items in project reports (query) are listed under the "not assigned" (column name) Why it is so ?
    Start query : project reports & ask for period April 2008 (Period from/to). .
    You will see items listed under  Not assigned WBS Element (column name)
    If you choose for a period of April until June 2008 then you see more items under u201Cnot assignedu201D .
    Items should be under Assigned (column name) & not under the Not assigned (column name )
    Any suggestions highly appreciable.
    Thanks.

    Hi,
    How are you displaying the ITEM field in the BEx query designer? Is it displayed with "Key and Text"? If so and if the text is not loaded for this master, this may happen.
    Regards,
    Yogesh.

  • Basic question - querying xmltype column

    Hi,
    Sorry for the basic question but please could someone paste in a working 'select where' statement which will pick out only those rows containing an element with specified content.
    For example, how would I return n complete XML documents as query results for a situation where 'element_1' has text content 'apples'?
    This does not seem to work:
    SELECT x.xml_body.extract('/root_element/element_1/text()').getStringVal()
    FROM xmltable x
    WHERE x.xml_body.extract('/root_element/element_1/text()').getStringVal()='apples'

    Hi Paul,
    The query you have given works. I tried that query in the following format and it works.
    Query 1:
    SELECT x.xmlcol.extract(/Employee/Name/text()').getStringVal()
    FROM table_name x
    WHERE x.xmlcol.extract('/Employee/Name/text()').getStringVal()='Anu'
    Query 2:
    SELECT extractvalue(x.xmlcol,'//Name/text()')
    FROM table_name x
    WHERE extractvalue(x.xmlcol,'//Name/text()')='Srini'
    Both the queries work. The xml is of the following format
    <Employee company="Oracle">
    <Name>Anu</Name>
    <Department>OTN</Department>
    <Location>India</Location>
    </Employee>
    Can you please tell the database version on which you are working?
    For more information on XMLType you can refer the XMLDB Samples located at
    http://otn.oracle.com/sample_code/tech/xml/xmldb/content.html
    You can also refer to the XMLType Sample present at this location
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/9i_jdbc/content.html#xmltype
    to know how to work with XMLType columns.
    You can get back to us if you have any more doubts.
    Regards,
    Anupama Majety

  • Query slow in table having XMLTYPE column

    Hi,
    I've a table and a XMLTYPE column in it.
    table:
    a number
    b xmltype
    now when 1000 records are present and I do a select * form table it runs for 5-8 mins..
    if i put an index on a and do teh query using the index still it takes 5-6 secs to retrieve a single query.
    Is it normal ? I mean to say is it because of the clob it's taking time or I can tune it ?
    Thanks,
    Arun

    What sort of query are you running on it?
    As a rule, XMLTYPE and CLOB columns tend to be big. On the other hand they would normally be stored out of line, so I don't see why they should affect a full table scan.
    As is the usual case with performance questions, you must provide sufficient information for us to answer your question. Please read Rob Van Wijk's helpful guide on the sort of things we need to know (and incidentally how you can start to solve your problem yourself): [When your query takes too long|http://forums.oracle.com/forums/thread.jspa?threadID=501834&tstart=0]. Randolf Geist has knocked up a [HOW TO: Post a SQL statement tuning request  |http://forums.oracle.com/forums/thread.jspa?threadID=863295] which is a template of the helpful way to layout a tuning question. Also, read [his blog on the topic|http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html]
    You might also benefit from reading [Tom Kyte&#146;s advice on how to ask questions|http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html].
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Can I change column headings dynamically based on report query conditions ?

    Hi All,
    Is there a possibility in OBIEE to change the headings of the column dynamically depending on the conditions that i keep on the report query ?
    Assume that i am showing an emp table data of one department at a time.
    The column heading of employee name should be like <DEPT>_EMP,  Where <DEPT> is the department on which i was reporting..
    Example:
    Report query : Select * from emp where dept = 'PHYSICS'
    The column heading of employee name should be PHYSICS_EMP.
    Thanks in advance.

    Hello,
    did you try to create a column with the data of dept and put it in a column level of a pivot table?
    In the example that you gave, the column head would show 'PHYSICS' because it's the data filtered at your query. Them, you just edit this column and concatenate the '_EMP' string.

  • How do I reference columns in a report query from another report query?

    In Apex 3.1 it is possible to generate a report on more than one query. I have read that these queries can be correlated, but I cannot find how in the documentation.
    I go the Shared Components and create a new Report Query:
    select * from dept
    Then I click Add Query and I add:
    select * from emp
    How do I correlate these two queries (I want to join emp.deptno to dept.deptno) and have a nice hierarchicle XML-file.
    Is it possible in Apex 3.1?
    Dik Dral

    Dik,
    This type of query can't be build. The two queries are independent, you can't reference values in the first query from the second query. However you can reference page and application items - which won't help you all that much with this scenario though. You could also try combining the two queries into one, and then take care of the proper presentation in your template.
    Regards,
    Marc

Maybe you are looking for