Multiple schemas in query builder

Hi,
I have seen variations of this question returning a couple of times in the forum, but no answer has come forward so far. So let's try again...
In APEX 4.1 (maybe also in earlier versions) there is a drop-down at the top-right of the query-builder tool to select a different schema.
The problem is, that it only shows the "parsing" schema. So the user the workspace is associated with.
I have taken all of the following steps, that i would expect to make the other schemas show up:
- associate my second scheme, SCHEMA_2, to the workspace SPACE_1
- grant the "parsing" schema, SCHEMA_1, select access to all objects in SCHEMA_2
And I have tested the following things:
- in "SQL Commands" run a query that selects objects from SCHEMA_2, using "select * from SCHEMA_2.TEST_TABLE;". This works
- in query builder, select the "SQL" option and insert the same query and click "run". Results in "Please enter a valid query to see results"
- create an application with a "SQL report" page, and insert the same query. Results in "Query cannot be parsed, please check the syntax of your query. (ORA-00942: table or view does not exist)"
My toughts on this issue:
- A different user is used in query builder and the application builder?
- the "SQL commands" uses the "parsing" schema, as expected
So, what's wrong?

Is using more then one schema in the query builder such an uncommon requirement?
Or did this message pass by unnoticed?

Similar Messages

  • Multiple Schema select Query problem

    Hi everyone,
    when I tried to execute a select query as following,
    select A.field1, B.field2 from S1.table1 A, S2.table2 B
    in a session bean, it gives an exception as follows
    " An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction"
    Can anyone pls help me in this regard.
    Thanking you
    D. Suresh Kumar

    This is the query i thought of executing
    SELECT * FROM SCH2.AP_TRANSACTION_EPS A, TRANSACTION_TYPES B WHERE C_FUND_CODE = '" + fundCode + "'AND D_TRADE_DATE = to_date('" + date + "','yyyy-mm-dd') AND A.C_TRANS_CODE = B.C_TRANS_CODE " + " AND B.C_TRANS_TYPE = '" + transType + "' ";
    where "fundCode", "date","transType" are java variables.
    The error message is
    [8/1/03 12:38:49:688 IST] 491a6a5 TransactionIm E WTRN0062E: An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction.
    [8/1/03 12:38:49:750 IST] 491a6a5 ConnectO A CONM6014I: Received exception (IllegalStateException) in method (enlist). Issuing new exception (IllegalTransactionStateException). The original exception's stack trace was: java.lang.IllegalStateException
    Thanking you

  • Query Builder doesnt load the tables. Schema not loaded

    Hi all,
    One small issue i am facing.. I have made a connection to Oracle db using the user id given by my DBA.
    But when I try to open the query builder it doesnt load any tables.. cant see any tables.
    Findings:
    If on toad i run a query
    select * from table it returns me noting.
    But if i run it with SIEBEL
    Select * from SIEBEL.table it returns result.
    just prefixing it with SIEBEL gives me the result.
    Do i need to ask the DBA to give my user id the access to run queries without prefixing SIEBEL... what exactly shld i ask him to do
    OR is something we can do at the publisher end itself so that it strt loading required tables avalable for my user id?
    thanks a lot!!
    Dev

    From your description I'd conclude that your DBA has provided you database access via a user ID (schema), let's say USER1. If you have registered this database as JDBC / JNDI data source using this particular user, then you will always need to prefix your table names with 'SIEBEL.' as the database objects are stored in the SIEBEL schema, and not in the USER1 schema.
    You may question your DBA about the feasibility of setting up a logon trigger on the USER1 account so that it automatically switches the current schema to the SIEBEL one.
    alter session set current_schema = <your_schema_name>;
    Something similar was discussed in the following thread:
    how to switch schema in a logon trigger when in 3-tier (how to define case)

  • Query builder and multiple linked tables...

    Hi all,
    I have a database with a large table (50+ fields) and lots of tables (at
    least 10 tables) linked to the bigger one.
    I can link 7 or 8 tables using Query builder but after that, it gets slow
    and slower.
    I can't link other tables since it appear to hang.
    How can I solve this?
    Here is a sample of the large table (articles):
    - id_art
    - code_art
    - material_id_art (fk)
    - color_id_art (fk)
    - finishing_id_art /fk)
    - and so on... with other fields set as foreign keys.
    The color table is:
    - id_col
    - colid_col
    - name_col
    - language_col
    The table view is:
    id_col colid_col name_col language_col
    1 1 rosso it
    2 1 red uk
    3 1 rojo es
    The other tables follow the same color table specification.
    I would like to obtain all articles with color_id_art field equal to the
    color.colid_col field AND color.language_col equal to a session variable
    (language). This session variable contains 'it', 'uk', or 'es', depending
    on user selection on other pages.
    I can use query builder to do something similar with few tables but when
    the linked tables are 10 or more the query builder began to slow down too
    much and is totally unusable.
    Is there a way to create such a query manually?
    I'm not a SQl programmer so, I have not all the knowledge to do this.
    Can anyone point me in the right direction or point me to some tutorial
    about such a problem?
    I thank you in advance.
    tony

    Ciao Tony,
    Well, the main table is 4000+ records
    I´ve heard of other users having similar issues with this (or more) amount of data, what´s not surprising, because every time you´re making a change to your query, the Query Builder tries to refresh the browser
    I think that the problem is related to too much inner joins and too many WHERE clauses with AND condition
    maybe this might add to the problem, but I´m pretty convinced that the major bottleneck is the substantial amount of records your main table has.
    Günter, can I ask you how would you manage a multilingual product catalog where the main table (products) has lots of linked details tables (color, finishing, structure...) to be translated on a number of languages?
    this is indeed a little tricky by nature, however I think that storing e.g. all the international color names in a table is too complicated, when you could simply...
    a) check the currently running language session variable
    b) define a PHP if/else condition which will "virtually" translate the stored "id_col" values, example:
    if ($_session['language'] == "uk") {
    $pattern = array("1", "2", "3", "4");
    $replace = array("red", "blue", "black"', "green");
    $colors = str_replace($pattern, $replace, $row_queryname['columnname']);
    else {
    $pattern = array("1", "2", "3", "4");
    $replace = array("rosso", "blu", "nero"', "verde");
    $colors = str_replace($pattern, $replace, $row_queryname['columnname']);
    3. later in your page "echo" the alias variable $colors, which should return different results depending on the currently active language session variable
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • CM14 BI Publisher - modifying an existing Data Model, the Graphic View in Query Builder does not display

    I am trying to edit the default forms/reports that come with CM14, trying to edit the data model, data set, (to get to the old Infomaker style graphic view) , the Query model does not display (error the list of tables is too long..) Oracle tell me the limit is 60,  there are not 60 tables referenced in any CM report.
    Does this Query builder view work at all on any report?
    (bigger question, we are moving from CM12, should we move to CM13 which works with infomaker?)
    Thanks,
    Paul L

    Kurt, thanks for your replies.
    A couple of notes/clarifications.
    1.     You are correct that BI works better in Firefox--I have observed issues with the BI display when using IE.  I would recommend using Firefox too.
    2.     You are correct about the way to get to the Query Builder to see a graphical view of data tables.  There are basically two issues with this that I mentioned, but will re-iterate:
    a.  If you have an EXISTING query in the data set, then click the "Query Builder" button, this will remove the existing query that's there, it will NOT display the existing query in the query builder.  Query Builder works only to create a NEW query from scratch.
    b.  Query builder is limited to selecting 60 fields max in your query.  If you are creating a large report with many tables, you may find that 60 fields is not enough.  For that you will have to work in the SQL edit screen rather than using the query builder.
    I would impress on anyone developing CM14 reports that they become familiar with the database schema and relationships to avoid problems when developing your BI reports.  You should be able to find the tables and joins documentation in the knowledgebase.

  • Problem of Query Builder

    Hi ,
    I am using SQL Developer 1.1.0.23. In this I was trying to use Query Builder. In this I am facing one problem. In our company, we are provided with the view_only schema which are having access to all the objects.
    Now while using Query Builder, I want to use the table of the other schema. But Query builder allow only tables owned by the schema with which we are logged in. This is making it virtually useless if we need to create the query like
    Select a.col1,
    b.co1
    from schema1.table_name1 a,
    schema2.table_name2 b;
    Can we created such query with Query Builder, or do we have any work around for this ???
    Regards
    Martand Joshi

    This is correct. There is a bug logged for this, but at this stage the query builder does not support read only access.
    Sue

  • Parsing Error when using query builder

    I have a query with a subquery in the WHERE statement witn multiple fields listed in the select statement.
    For example, the subquery starts with "AND (center, jobid) IN SELECT center, jobid FROM ........
    The query runs fine and gives me the correct data
    However when I click on the Query builder option, I receive the following error
    "Text is not a valid, single SELECT statement.
    Parsing error:
    Failed to parse SQL query.
    Invalid Select Statement.
    Unexpected token "from" at line13, pos 1.
    Query Builder Disabled
    I believe this to be a problem with the query builder, Am I correct?

    Query Builder is a visual environment targeted at novice/intermediate users. Some advanced and/or hard to visualize language features are not supported. The improved error messaging coming in 3.1 would indicate this is 'unsupported' rather than 'not a valid, single SELECT statement.' For example, (using scott/tiger):
    Text contains unsupported syntax.
    Parsing error:
    Failed to parse SQL query.
    Invalid SELECT statement.
    Unexpected token "," at line 4, pos 16.
    Query Builder disabled.
    select distinct d.dname
    from dept d, emp e
    where d.deptno = e.deptno
      and (e.deptno, e.job) in
    (select x.deptno, x.job
    from emp x
    where x.deptno > 10
       and x.job NOT IN ('MANAGER', 'PRESIDENT')
    I don't know what your real query is, but refactoring to use join on derived table or table expression (or, as Gary said, separate IN clauses) rather than '(a, b) IN' will allow Query Builder to display it.
    derived table: select distinct d.dname
    from dept d, emp e,
    (select x.deptno, x.job
    from emp x
    where x.deptno > 10
       and x.job NOT IN ('MANAGER', 'PRESIDENT')
    ) filter
    where d.deptno = e.deptno
      and e.deptno = filter.deptno
      and e.job = filter.job
    table expression: with filter as (select x.deptno, x.job
    from emp x
    where x.deptno > 10
       and x.job NOT IN ('MANAGER', 'PRESIDENT')
    select distinct d.dname
    from dept d, emp e, filter
    where d.deptno = e.deptno
      and e.deptno = filter.deptno
      and e.job = filter.jobBrian Jeffries
    SQL Developer Team

  • Validate a XML file against multiple schema files

    Hello everybody!
    How can I validate a XML file against multiple schema files?
    I have the following XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <bulkCmConfigDataFile xmlns:es="SpecificAttributes.3.0.xsd"
                             xmlns:xn="genericNrm.xsd"
    xmlns="configData.xsd">
    <fileHeader fileFormatVersion="32.615 V4.2" vendorName=""/>
    <configData dnPrefix="Undefined">
    <xn:SubNetwork id="3G">
    <xn:SubNetwork id="RNC01">
    <xn:MeContext id="RNC01">
    <xn:VsDataContainer id="RNC01">
    <xn:attributes>
    <xn:vsDataType>vsDataMeContext</xn:vsDataType>
    <xn:vsDataFormatVersion>SpecificAttributes.3.0</xn:vsDataFormatVersion>
    <es:vsDataMeContext>
    <es:userLabel>RNC01</es:userLabel>
    <es:ipAddress>172.21.3.17</es:ipAddress>
    <es:neMIMversion>vF.5.0</es:neMIMversion>
    </es:vsDataMeContext>
                                  </xn:attributes>
    </xn:VsDataContainer>
    </xn:MeContext>
    </xn:SubNetwork>
    </xn:SubNetwork>
    </configData>
    <fileFooter dateTime="2006-11-24T11:56:07Z"/>
    </bulkCmConfigDataFile>
    I want to load this file into a table, validate it (against SpecificAttributes.3.0.xsd, genericNrm.xsd and configData.xsd) and query that table. How would the INSERT .. and the SELECT ... for userLabel attribute look like?
    Many thanks!

    Hi Peter,
    Please use the validateXML BPEL Property : This property validates incoming and outgoing XML documents. If set to true, the Oracle BPEL Process Manager applies schema validation for incoming and outgoing XML documents. This property is applicable to both durable and transient processes. The default value is false.
    Cheers
    A

  • Multiple schema, but instance doc does not have namespace

    Is it possible to successfully validate an instance document without namespaces against multiple schema with different namespaces?
    example:
    this is the normal xml which is valid with all the namespace:
    <MyRoot dateTime="040112061834" instanceIdentifier="NTNDEC13541" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://org.schema.ntn" xsi:schemaLocation="http://org.schema.ntn ntn.xsd" xmlns:cbc="http://org.schema.cbc cbc.xsd">
         <cbc:MessageVersion>040</cbc:MessageVersion>
         <cbc:SenderID>2344134</cbc:SenderID>
         <cbc:RecipientID>3485774</cbc:RecipientID>
         <cbc:TotalNumberOfDeclaration>1</cbc:TotalNumberOfDeclaration>
    </MyRoot>but I want to remove all namespace
    <MyRoot>
         <MessageVersion>040</MessageVersion>
         <SenderID>2344134</SenderID>
         <RecipientID>3485774</RecipientID>
         <TotalNumberOfDeclaration>1</TotalNumberOfDeclaration>
    </MyRoot>now is it possible to validate programmatically using sax the above xml against multiple schema? can i do it without any namespace at all??
    thanks

    Hi Larry, Thanks for your reply along with Muppet Mark, If I changed the color settings originally it was not my intension, I was simply just opening the next project to work on and viola’ “missing profiles”.
    Attachment (picture) 7 was my last setting for color prior to your email, and yes I was messing around with this last night comparing it to one of our old G4’s, so I can’t remember where it started out before I got my hands on it.
    Attachment (picture) 8 is my current settings based on your email recommendations.
    Attachment (picture) 6 is the message I receive when I open any files created prior to these changes I just made. However after I open and resave the file I no longer receive this (picture 6) message.
    My question is will my color be back to where it was before the problem started last week. In looking over one of the files I opened (I design/build transportation maps btw) most of the color is where I usually have it set however some colors were fractional as if they were converted from spot colors. SO I’m not sure what to do except go through all the known colors and make sure they are where I usually would set them, or do you have a better suggestion.
    Oh by the way – for all you guys that are helping lunch is on me at McDonalds on Michigan St in Grand Rapids, MI!!
    #7
    #8
    #6

  • Query Builder functionality

    Has anyone built a Query Builder Page in the apps that is similar to the standard APEX Query Builder?

    I haven't done exactly this, but remember doing a tabular form genarator (similar to the tabular form wizard in the builder) choosing tables, columns and field types. But that was using Apex 3.2, now that we have jQuery and dynamic actions in Apex 4.0, it should be much easier.
    If you looking for an approach, here's one
    <li>create a left side bar region with tables from schema: report or list based
    select table_name from user_tables<li>On click of the list entry, show a modal dialog of a report based on the columns of the selected table
    SELECT * FROM USER_TAB_COLS WHERE table_name = :<TABLE_NAME ITEM> Show images based on column type ("data_type" in user_tab_cols)
    Checkboxes return the column name for each row
    <li> Have a dynamic action that runs for each checkbox calling a PLSQL to update a collection adding the clicked column name to the the list.
    Refresh a updateable report region which is based on the collection , showing the column, sort order,group by options
    and JS code to move rows up or down (
    move_up code (pseudo code)
    this_row = $(this.triggeringElement).parents('tr:first);
    prev_row = this_row.prev();
    next_row = this_row.next();
    //move up
    prev_row.before(this_row);Then the SQL code generation would concatenate the application arrays containing the column names adding columns one row at a time and adding sort and order options. You would need to some custom PLSQL coding, looping throw each row adding predicates.

  • Using dimension attributes in the Query Builder Bean

    All...
    I am developing an HTML client based tool using the JSP tags. I wish to create a report that selects the appropriate dimension value based upon an attribute.
    But...
    Using the query builder I can not select dimension values based upon dimension attributes. Is this possible? The only use I have found for the attributes is when I am sorting my selected diemsnion values.
    Thanks in advance
    Dylan.

    1. Java Client QueryBuilder has support for selecting dimension members based on an attribute.
    To use this functionality, go to Dimensional Panel -> Conditions tab. Drill on Match group of conditions. The attribute condition appears as the last available condition, but only for dimensions that have attributes.
    To test this, use BIBDEMO schema supplied with BI Beans and look at conditions for Product dimension.
    2. If you wish to display dimension attributes and their values in the HTML client UI,
    here is how you can retrieve attributes and their values for a dimension:
    (e.g. for Product dimension in BIBDEMO)
    String dimensionID = "MDM!D_BIBDEMO.PRODUCT";
    String hierarchyID = null;
    MDDimension dimension = metadataManager.getDimensionByUniqueID(dimensionID);
    MDHierarchy hierarchy = dimension.getDefaultHierarchy();
    if (hierarchy != null)
    hierarchyID = hierarchy.getUniqueID();
    // Retrieve all the attributes for this dimension
    MDAttribute[] attributes = dimension.getAttributes();
    if (attributes != null && attributes.length > 0)
    String attributeID = null;
    AttributeListStep attrStep = null;
    Selection sel = null;
    MetadataMap map = new MetadataMap(new String[] {MetadataMap.METADATA_VALUE});
    for (int i=0; i<attributes.length; i++)
    // Get the unique ID for the attribute
    attributeID = attributes.getUniqueID();
    // Create and evaluate an AttributeListStep
    attrStep = new AttributeListStep(dimensionID, hierarchyID, attributeID);
    sel = new Selection(dimensionID);
    sel.setHierarchy(hierarchyID);
    sel.addStep(attrStep);
    // Evaluate the AttributeListStep and get the DataAccess
    DataAccess da = query.createQueryAccess().getDataAccess(sel, map);
    // Walk the DataAccess and get the attribute values
    if (da != null)
    int extent = da.getEdgeExtent(DataDirector.COLUMN_EDGE);
    for (int i=0; i<extent; i++)
    // Get the attribute value
    strValue = (String)da.getMemberMetadata(DataDirector.COLUMN_EDGE, 0, i, MetadataMap.METDATA_VALUE);
    // Add the value to a drop down or another UI element...

  • Query builder in Reports

    In the reports when I use query builder available in the reports for the same user/owner it works fine. If I will select/use any table from other schema it creates query for it but when I again try to go to query builder it shows me blank. This behaviour is same in reports 3 and 6i. Is this a bug or there is some configuration issue?
    e.g.
    Currently I am working in the scott login and opened the query builder to build the query. I have select table EMP and the its fields I have to select. Now the DEPT table is in another schema and scott has select privs of this table. I have select the DEPT table from that schema and pressed OK and the query is now in the query window but now if I want to modify the query and want to open query builder again and it is not possible at my machine. So I have to modify the query in the query window manually.
    I hope the above detail will help u in understanding the exact situation so if still not cleared then let me know.

    Hi Sikandar,
    Make sure you are on the latest patch (patch 10), and if it still reproduces you should contact Oracle Support.
    regards,
    Stewart

  • Create a query builder in oracle Apex

    Hi
    We have a request to create a query builder in oracle Apex particularly.But it provide the application builder and Utilities when we create the apex workspace.My question is any possibility are to make the application builder and utilizes as invisible
    regards
    apexuser

    hi scott,
    we no need to buid a report.we want generate a sql query using GUI drag and drop query builder.
    our suggestion is provide synonym for all objects and give to clinet,but in apex query builder only show view and table...
    it not show synonym thats the problem..
    simply we want oracle query browser.just want build a query.through synonym schema.
    we cerate a oracle user and provide synonym for live tables.then we provide the synonym user to client place,so they want build a query simpl.
    they dont have sql knowledge.
    regards
    apexuser

  • 1.5.4 Query Builder Bug?

    I was testing the Query Builder with SQL developer version 1.5.4. It seems to have problems when trying to add the same table twice to the query.
    Example was to use the employees table from HR schema to create a query showing employees and managers. When clicking the second time on the employees table then the query builder did just "hang" there indefinitly.
    Did I miss some important step like giving alias names to the tables?

    There's an accepted enhancement request for this at the Echange. Go vote to add weight for future implementation.
    Regards,
    K.

  • Query Builder Error

    I am trying to create a new test report in BI Publisher.
    When I was testing the connection in Admin/JDBC panel. It says Connection established Successfully. But When I try to open a query Builder , It throws me the following error.
    "Could not load schema information. Please make sure that this connection is active."
    Any thoughts ?
    p.s I am behind proxy. (Changed oc4j.cmd already).
    Thanks in Advance.

    Dear All:
    Well, I hope the solution below could solve your problem.
    1. Goto the Admin tab from your Oracle BI Publisher Enterprise.
    2. Goto the JDBC Connection, there you'll find some of your JDBC predefined connections.
    3. Click on the Data Source where you find these error.
    4. Replace the jdbc:oracle:thin:@HOST:PORT:SID with HOST, PORT, and SID (e.g. jdbc:oracle:thin:@localhost:1521:ORCL).
    5. Enter username and password from the schema (e.g. u:HR p:HR for HR Schema).
    6. Test the connection, make sure that it is successfully connected. Otherwise you should check the connection detail.
    7. Done. Back to your query builder.
    Regards,
    Adrian

Maybe you are looking for