Preview generated SQL

Hi,
Is there a way to view the SQL that would result from an Expression without actually executing the query via a session with logging turned on?
regards
George

Here is my Code:
ExpressionBuilder e = new ExpressionBuilder(MYClass.class);
ReportQuery q = new ReportQuery(e);
q.setReferenceClass(MYClass.class);
q.dontRetrievePrimaryKeys();
q.addAttribute(_MY_ATTR1);
q.addAttribute(_MY_ATTR2, e.get(_MYREF).get(_MY_ATTR2));
q.addSum(_OTHER_AGGREG_ATTRIB1);
q.addSum(_OTHER_AGGREG_ATTRIB2);
q.dontUseDistinct();
Expression exp = e.get(_MY_ATTR1).equal(myInputVal_for_attr1);
exp = exp.and(e.get(_MYREF).get(_MY_ATTR2).equal(myInputVal_for_attr2));
oracle.toplink.publicinterface.DatabaseRow dbRow = new oracle.toplink.publicinterface.DatabaseRow();
oracle.toplink.publicinterface.DatabaseSession dbSession = (oracle.toplink.publicinterface.DatabaseSession)MyAppServer.getTheServerSession();
q.prepareCall(dbSession, dbRow);
String sqlTrStr = q.getTranslatedSQLString(dbSession, dbRow);
Problem:
It works fine, but it includes ???? against all the given parameters.
Upon debugging, I found that the dbRow was not filled and the query(q) always generates SQL with ????, whereas q.getCall().getParameters() holds all the parameters.
Can any one please give me the final tip to get the custom SQl to solve this final step.
Thanks
A.T

Similar Messages

  • Crash while generating SQL from offline DB

    Hi,
    I just got the following exception from the JDeveloper 10.1.3.0.2.223 preview version while trying to generate SQL from an offline database.
    Stack trace:
    java.lang.ArrayIndexOutOfBoundsException: 1
         at oracle.jdeveloper.offlinedb.handler.GenerateSQLHandler.copySchemaObjects(GenerateSQLHandler.java:424)
         at oracle.jdeveloper.offlinedb.handler.GenerateSQLHandler.handleReconcileSQL(GenerateSQLHandler.java:245)
         at oracle.jdeveloper.offlinedb.handler.GenerateSQLHandler.handleReconcileSQL(GenerateSQLHandler.java:217)
         at oracle.jdeveloper.offlinedb.wizard.GenerateWizard.invokeGenerateWizard(GenerateWizard.java:176)
         at oracle.jdeveloper.dbmodeler.diagram.registry.RDatabaseDiagramComponent$DDLReceiver.onCheckedCmdUIEvent(RDatabaseDiagramComponent.java:335)
         at oracle.bm.diagrammer.cmdUI.CmdUIReceiver$Checked.onCmdUIEvent(CmdUIReceiver.java:97)
         at oracle.bm.diagrammer.BaseDiagram$1.onCmdUIEvent(BaseDiagram.java:337)
         at oracle.bm.addinUtil.IDEAppContext.handledElseWhere(IDEAppContext.java:1816)
         at oracle.bm.addinUtil.IDEAppContext.onCmdUI(IDEAppContext.java:1744)
         at oracle.bm.addinUtil.IDEAppContext.handleEvent(IDEAppContext.java:3863)
         at oracle.ide.IdeAction.performAction(IdeAction.java:661)
         at oracle.ide.IdeAction$2.run(IdeAction.java:889)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Has anybody else experienced this problem too?
    Vahan Harput
    [email protected]

    Hi Lisa,
    My complete DDL:
    CREATE TABLE "GENRE"
    "GENRE" NVARCHAR2 (100) NOT NULL
    CREATE TABLE "MEDIA"
    "ID" NUMBER NOT NULL,
    "TYPE" CHARACTER (1)
    CREATE TABLE "MOVIE"
    "ID" NUMBER,
    "NAME" NVARCHAR2 (1000),
    "GENRE" NVARCHAR2 (100) NOT NULL,
    "MEDIA_ID" NUMBER NOT NULL
    ALTER TABLE "GENRE"
    ADD CONSTRAINT "GENRE_PK" PRIMARY KEY
    "GENRE"
    ENABLE
    ALTER TABLE "MEDIA"
    ADD CONSTRAINT "MEDIA_PK" PRIMARY KEY
    "ID"
    ENABLE
    ALTER TABLE "MOVIE"
    ADD CONSTRAINT "MOVIE_FK_GENRE" FOREIGN KEY
    "GENRE"
    REFERENCES "GENRE"
    "GENRE"
    ) ENABLE
    ALTER TABLE "MOVIE"
    ADD CONSTRAINT "MOVIE_FK_MEDIA" FOREIGN KEY
    "MEDIA_ID"
    REFERENCES "MEDIA"
    "ID"
    ) ENABLE
    CREATE SEQUENCE "MEDIA_SEQ" INCREMENT BY 1 START WITH 1 ;
    CREATE SEQUENCE "MOVIE_SEQ" INCREMENT BY 1 START WITH 1 ;
    Regards,
    Vahan Harput

  • Error: while generating SQL.java.rmi.ServerException:

    Hi:
    I tried the JGuru's "MusicStore" example. HOwever at Task 6 and 7 I am getting the following error:
    Error: while generating SQL.java.rmi.ServerException:
    RemoteException occured in server thread; nested exception is:
    * java.rmi.RemoteException: Error connecting to database;
    nested exception is:
    * SQL Exception: Failed to start database 'MusicStoreDB', see
    the next exception for details.
    Please make sure the database name/user/password is valid
    and the J2ee server and database are running.
    However when i check my database it is running perfectly:
    E:\>%j2ee_home%\bin\cloudscape -start
    Sun Feb 16 12:48:11 PST 2003: [RmiJdbc] Starting Cloudscape RmiJdbc Server Version
    Sun Feb 16 12:48:14 PST 2003: [RmiJdbc] COM.cloudscape.core.JDBCDriver registered i
    Sun Feb 16 12:48:14 PST 2003: [RmiJdbc] Binding RmiJdbcServer...
    Sun Feb 16 12:48:14 PST 2003: [RmiJdbc] No installation of RMI Security Manager...
    Sun Feb 16 12:48:14 PST 2003: [RmiJdbc] RmiJdbcServer bound in rmi registry
    Server:
    J2EE server listen port: 1050
    Naming service started:1050
    Binding DataSource, name = jdbc/DB2, url = jdbc:cloudscape:rmi:CloudscapeDB;crea
    te=true
    Binding DataSource, name = jdbc/Cloudscape, url = jdbc:cloudscape:rmi:Cloudscape
    DB;create=true
    Binding DataSource, name = jdbc/InventoryDB, url = jdbc:cloudscape:rmi:Cloudscap
    eDB;create=true
    Binding DataSource, name = jdbc/DB1, url = jdbc:cloudscape:rmi:CloudscapeDB;crea
    te=true
    Binding DataSource, name = jdbc/MusicStore, url = jdbc:cloudscape:rmi:MusicStore
    DB;create=false
    Binding DataSource, name = jdbc/XACloudscape, url = jdbc/XACloudscape__xa
    Binding DataSource, name = jdbc/XACloudscape__xa, dataSource = COM.cloudscape.co
    re.RemoteXaDataSource@1d88db7
    Starting JMS service...
    Initialization complete - waiting for client requests
    Binding: < JMS Destination : jms/Topic , javax.jms.Topic >
    Binding: < JMS Destination : jms/Queue , javax.jms.Queue >
    Binding: < JMS Cnx Factory : TopicConnectionFactory , Topic , No properties >
    Binding: < JMS Cnx Factory : QueueConnectionFactory , Queue , No properties >
    Binding: < JMS Cnx Factory : jms/QueueConnectionFactory , Queue , No properties
    >
    Binding: < JMS Cnx Factory : jms/TopicConnectionFactory , Topic , No properties
    >
    Starting web service at port: 8000
    Starting secure web service at port: 7000
    J2EE SDK/1.3.1
    Starting web service at port: 9191
    J2EE SDK/1.3.1
    J2EE server startup complete.
    Can anyone suggest me a way out..plz

    what type of persistent u r using also post ur query if bmp and check with another example with cmp.

  • Weird behavior: PLSQL-generated SQL Report Region

    I am trying to tune my PLSQL-generated SQL Report Region. I put in some code to write the resulting query to a table. I turn it on, run the page, and then turn it off and look at the SQL. Instead of getting one query for each time I load the page, I get five. Trying to find out a bit more about why, I concatenate :APP_USER and to_char(sysdate, 'hh:mi:ss') to the resulting SQL. What I find is that four of the entries in the table have my ApEx dev username, and all of these writes are 3 seconds before the SQL generated under the app username is written!
    It probably goes without saying, but in all of the writes under my dev username, there are no session values and so any PLSQL if statements that depend on a session value act as if the session values are null. Also, any place I have :APP_ID show up as 4000 in those writes instead of the app number that shows up under my app username.
    Do you follow this?
    Well, on a hunch I copied the whole region back on to the page and disabled the original. This time, no writes with the dev username, only one select statement as originally expected.
    Is that wierd or what?
    Bill

    Scott, Your last comment - that was it. I should've paid more attention to the time. The minutes must have been off. I made sure to log out of the dev environment before I ran the page, but the writes under my dev login were occurring when I saved the region. I still don't see why that process causes four identical writes, but it's not that important.
    Thanks! Now I can to working on the real problem - improving my SQL.
    Bill

  • Generating SQL in a PL/SQL progam ( getting the values of a value)

    Hi,
    We're using Oracle 11.1.
    I want to generate sql to do the following
    something like
    fld_pos(i) = 'MPI';Where fld_pos is part of a varray.
    The basic procedire is below.
    PROCEDURE get_oldest_mpi (
          pin_fld0 VARCHAR2
        , pin_fld1 VARCHAR2
        , pin_fld2 VARCHAR2
        , pin_fld3 VARCHAR2
        , pin_fld4 VARCHAR2
        , pin_fld5 VARCHAR2
        , pin_fld6 VARCHAR2
        , pin_fld7 VARCHAR2
        , pin_fld8 VARCHAR2
        , pin_fld9 VARCHAR2
        , pin_fld10 VARCHAR2
        , pin_fld11 VARCHAR2
        , pin_fld12 VARCHAR2
        , pin_fld13 VARCHAR2
    IS
         TYPE fld IS VARRAY(14) OF VARCHAR2(50);
         fld_pos fld;
         v_sql_stmt VARCHAR2(1000);
         mpi_pos  number;
    BEGIN
    --load the pin_fld vars into an array so they can be processed in a loop
        FOR i IN 1..fld_pos.COUNT
        LOOP
        fld_pos(i) := 'pin_fld'||i;
        END LOOP;
    --see if the variable pin_fld'x' = the word 'MPI'
        FOR i IN 1..fld_pos.COUNT
        LOOP
        IF  fld_pos(i) = 'MPI' then    -- I know this statement is wrong. This is where I need help.
          mpi_pos :=i;
        END IF;
        END LOOP;
    .I know that 'fld_pos(i)' equals 'pin_fld||i .
    So how do I get to the value in the value for this? How can generate the SQL to get the expression I need?
    Thanks,

    Hi,
    It's still an awkward procedure, but
    CREATE OR REPLACE PROCEDURE get_oldest_mpi (
      pin_fld0     VARCHAR2,
      pin_fld1     VARCHAR2,
      pin_fld2     VARCHAR2,
      pin_fld3     VARCHAR2,
      pin_fld4     VARCHAR2,
      pin_fld5     VARCHAR2,
      pin_fld6     VARCHAR2,
      pin_fld7     VARCHAR2,
      pin_fld8     VARCHAR2,
      pin_fld9     VARCHAR2,
      pin_fld10    VARCHAR2,
      pin_fld11    VARCHAR2,
      pin_fld12    VARCHAR2,
      pin_fld13    VARCHAR2
    ) IS
      TYPE fld IS VARRAY (14) OF VARCHAR2 (50);
      fld_pos      fld
                     := fld (pin_fld0,
                             pin_fld1,
                             pin_fld2,
                             pin_fld3,
                             pin_fld4,
                             pin_fld5,
                             pin_fld6,
                             pin_fld7,
                             pin_fld8,
                             pin_fld9,
                             pin_fld10,
                             pin_fld11,
                             pin_fld12,
                             pin_fld13
      v_sql_stmt   VARCHAR2 (1000);
      mpi_pos      NUMBER;
    BEGIN
      --see if the variable pin_fld'x' = the word 'MPI'
      FOR i IN 1 .. fld_pos.COUNT LOOP
        IF fld_pos (i) = 'MPI' THEN
          mpi_pos := i;
        END IF;
      END LOOP;
    END;
    /Regards
    Peter

  • OBIEE generated SQL differs if it's a Physical Table or Select Table...

    Hi!
    I have some tables defined in the Physical Layer, which some are Physical Tables and others are OBIEE "views" (tables created with a Select clause).
    My problem is that the difference in the generated SQL for the same table, differs (as expected) whether it is a Physical Table or a "Select Table". And this difference originates problems in the returned data. When it a Physical Table, the final report returns the correct data, but when it is a Select Table it returns incorrect/incomplete data. The report joins this table with another table from a different Database (it is a join between Sybase IQ and SQL Server).
    This is the generated SQL in the log:
    -- Physical Table generated SQL
    select T182880."sbl_cust_acct_row_id" as c1,
    T182880."sbl_cust_acct_ext_key" as c2,
    T182880."sbl_cust_source_sys" as c3
    from
    "SGC_X_KEY_ACCOUNT" T182880
    order by c2, c3
    -- "Select Table" generated SQL
    select
         sbl_cust_acct_ext_key,
         ltrim(rtrim(sbl_cust_source_sys)) as sbl_cust_source_sys,
         sbl_cust_acct_row_id,
         sbl_cust_acct_camp_contact_row_id,
         ods_date,
         ods_batch_no,
         ods_timestamp
    from dbo.SGC_X_KEY_ACCOUNT
    As you may notice, the main difference is the use of Aliases (which I think that it has no influence in the report result) and the use of "Order By" (which I start to think that it its the main cause to return the correct data).
    Don't forget that OBIEE server is joining the data from this table, with data from another table from a differente database. Therefore, the join is made in memory (OBIEE Engine). Maybe in the OBIEE Engine the Order by is essential to guarantee a correct join...but then again, I have some other tables in the Physical Layer that are defined as "Select" and the generated SQL uses the aliases and the Order by clause...
    In order to solve my problem, I had to transform the "Select Table" into a "Physical Table". The reason it was defined as a "Select Table" was because it had a restriction in the Where Clause (which I eliminated already, althouth the performance wil be worse).
    I'm confused. Help!
    Thanks.
    FPG

    Hi FPG,
    Not sure if this is a potential issue for you at all, but I know it caused me all kinds of headaches before I figured it out. Had to do with "Features" tab Values in the database object's settings in the Physical Layer:
    Different SQL generated for physical table query vs. view object query?
    Mine had to do with SQL from View objects not being submitted as I would expect, sounds like yours has more to do with "Order By"? I believe I remembered seeing some Order By and Group By settings in the "Features" list. You might make a copy of your RPD and experiement around with setting some of those if they aren't already selected and retesting your queries with the new DB settings.
    Jeremy

  • OBIEE 11g "WITH SAWITH0 AS" subquery factoring clause in the generated sql

    I've observed that the OBIEE 11g generates in the query log physical query using the WITH (sub-query factoring) clause to make the generated sql elegantly readable. This is great! Thanks for the developers. However I have some questions about this.
    __Background__
    Oracle Database' default behaviour is that if you have only one sub-query in the WITH section, it executes it as an in-line view and does not materialize it before the main sql is executed. If you have more than one, by default the database engine materializes all of them in the order of the definition. In some cases this can completely blow up the SGA and make the query never ending. To divert this behaviour you can apply two hints that work both in inline views and in sub-queries as well: /*+ MATERIALIZE */ and /*+ INLINE*/, however Analytics 11g does not seem to have hint capabilities at the logical table level, only at physical table level.
    If we go with the current defaults, developers not aware of this feature can bump into serious performance issues for the sake of some syntax candy at the generated sql level, I'm afraid.
    __Questions__
    * Is it possible to turn the Analytics server not to use WITH but use inline views instead?
    * Is there any way to sneak in some hints that would put the /*+ INLINE */ hint to the appropriate place in the generated sub-queries if needed
    * Does the Oracle Database have any initialization parameter that can influence this sub-query factoring behavior and divert from the default?

    The WITH statement is not added to make the query more elegant, it's added for performance reasons. If your queries take long to run then you may have a design issue. In a typical DWH DB SGA needs to be seriously increased since the queries ran are much larger and complex than on an OLTP DB. In any case you can disable the WITH statement in the Admin Tool by double clicking on your database object on the physical layer and going to the Features tab. The feature is called WITH_CLAUSE_SUPPORTED.

  • Why do I no longer get previews generated when importing with LR 3.4.1?

    Problem:  This week while Importing a batch of 900+ photos they all show up in the Library as gray boxes (no previews).  I can still see previews of all my previously imported photos and the new ones are visible normally when viewing them with other programs (e.g., Canon Zoombrowser, My Pictures).
    Also, when I close LR3 and select the Backup option I get the error 'Lightroom encountered an error when trying to read its preview cache and needs to quit - Lightroom will attempt to fix this problem next time it launches'.  After clicking on OK for the error pop-up window LR3 freezes up and does not close, it just spins with Lightroom (Not Responding) on the top of the window.
    Environment:  Windows Vista Home Premium, Lightroom 3.4.1, photos are Canon raw CR2 format from 40D and 7D DSLRs. The Catalog is on a 2 TB external USB drive tethered to my Lenova Thinkpad laptop.
    I have over 40,000 photos in my catalog, most from the same cameras, and I REALLY don't want to start over or have to regenerate that many previews.
    Tried importing using both Copy and Copy as DNG with the same result - no previews in Library.
    Tried importing them from the memory card via a USB card reader and via a USB memory stick after moving them from the memory card to a different laptop - same result.
    Tried manually selecting a few photos and rendering new standard previews, LR3 starts the rendering per the status box in the upper left corner, but no progress toward generating a preview is made while in Library mode.  It just sits there.
    I can see the photos in Develop mode when I select one to view AND, it seems to stay there when I move back to Library.
    But, when I attempt to close LR3 (with the above error/crash) and restart it, the previews generated in Develop mode are gone.
    Is there a relatively simple solution for this?  I had not run into this while using prior levels of LR3.
    Thanks a bunch!!!
    Jim

    Rlrood wrote:
    Jay,
    I googled my problem and to my great surprise received a solution. It seems that the monitor profile I was using (the monitor default) was corrupted. I changed the profile to an earlier one I had created using Spyder 3 and the problem went away. The previews appeared. Of course, now my screen has a slightly pinkish cast, but as the days go by I'm learning to live with it:)  (I stopped using the profile because of the pink cast).
    Hope this helps.
    Thanks..  I'll try to generate a new profile tomorrow, but not sure that's related.  I've seen similar issues with previews on a Macbook Pro, which has a totally different profile.  I don't know the underpinnings of LR to that degree, but in my case, simply moving to the page of images in Library almost instantly changes the gray version of the thumbnail to a "picture".
    Jay S.

  • How to examine the generated SQL statement in Receiver JDBC Adapter

    I have been searching this forum how to display te generated sql statement (by the jdbc receiver adapter).
    The only suggestion is to use RWB, but I was unable to find any details about how to do so.
    Any help is appreciated

    Hi,
    To add, u can see the SQL Statements in Audit log of RWB.
    Select Message Monitoring-> Adapter Engine. choose ur entry and click on Details option button, u can see the SQL Statements in Audit Log.
    Regards,
    Sudharshan
    Message was edited by:
            Sudharshan Aravamudan

  • Unable to generate SQL trace file on a 10.2.0.1.0 database

    Hello,
    I am unable to generate SQL trace files on a 10.2.0.1.0 database (OS is Win2003 server 64 bits).
    First I tried the way I used to do it on older databases (8i and 9i) :
    execute dbms_system.set_sql_trace_in_session(sid, serial#, true);
    I got no error, but no file was created in the user dump dest directory.
    Then I've been searching and I've tried other things :
    - I changed the user_dump_dest parameter
    - I changed the tracefiles_public parameter value to "true", by modifying the init.ora file
    - I tried another package :
    exec dbms_monitor.session_trace_enable(139)
    Nothing worked, I can't create any trace file...
    Does anyone have an idea about this issue ?
    thank you for you help !
    Antoine

    Hello,
    thank you all for replying.
    I have 2 instances on this machine, and I've just realized that with the other one I have no problem to generate sql trace files as usual.
    But why the hell is it impossible on the first instance ? What difference between the 2 instances can explain this ?
    This is pretty weird...
    Otherwise I am experiencing serious performance problems on the instance where I can't creat trace files, there must be something wrong with it, but I can't figure it out
    regards,
    Antoine

  • Generate SQL Insert Statement using EXPORTED dmp file

    Dear DBAs,
    Kindly inform me that is it possible to generate SQL script file using the exported file dmp,
    I am looking for some option in import utility that generates script without import any rows in the database
    Secondly is there any other way to check the validity of exported dmp file data validity without importing it back into the database.
    Regards,
    Asif

    Hi Satish,
    Yes you are correct the insert into statements won't be avaliable using either the indexfile or the show parameter.I had given these two options as per his 1st post requirement where he had mentioned
    >
    it possible to generate SQL script file using the exported file dmp,I am looking for some option in import utility that generates script without import any rows in the database
    >
    So, i thought he needed to see whats all objects are in the .dmp
    Apologies for my 2nd post.
    Anand

  • Can we change/Modify BI server generated Sql query and run to fetch data

    Hi,
    My client is saying that there is an option to modify bi server generated sql query to fetch data from source.
    question:As a request is made in presentation services, A dynamic sql query is generated and fetches data from source. all this is loggedin Nqlquery log..well can we change/modify the sql query generated and run modified sql query to fetch data from source. ., if so how? if not why?
    Thanks in advance
    Edited by: user10794468 on Jun 16, 2009 6:29 PM
    Edited by: user10794468 on Aug 12, 2009 6:58 PM

    Thank you so much for your reply..
    ..Can we also modify sql query generated by bi server to fetech data. the query's which we see in query log file..

  • OBIEE 11g additional table in the generated sql

    Hi gurus,
    In OBIEE 11g RPD, we have a fact table whose source table is consisted by table A, B, C. Table A joins to table C while table B joins to tables C. And in the content tab, table C is used to filter out some records . If we select a column of A(The aggregation rule of this column is SUM) in the answers only, then table A, B, C are in the generated sql. If we remove the aggregation rule of this column, then there're only table A, C in the generated sql. We're wondering why this happened, but can't figure out.
    In this case, the relationship between table B and C is many to one. So additional table B in the generated sql may cause wrong sum. And we need the aggregation rule to sum the number. On the other hand, we can't remove the join between table B and C, since other reports need the join.
    Could anyone please provide a solution to remove the additional table B in the generated sql?
    Thanks & regards!
    shell

    Are you using in one report data from tables A, B, C at the same time? If not:
    1) Try separating the logical schema by:
    - Create an alias table for A and B in the physical layer. Then join these 2 tables. No create another Alias table for B (with a slightly different name) and one Alias table for C. Join these 2 tables (B+ and C)
    - Then put everything in your BMM and presentation layer.
    - Test your results. Take into account that if you are working with data in tables A and B you have to use the "fact table" B but if you use data in table C, use instead fact table from table B+.
    Your logical schema would be like A-->B B+-->C
    J.

  • Generated SQL does not have fully qualified columnnames

    Hi,
    I'm trying to run a JDO query which results in:
    [code=-5001, state=42703]
    java.sql.SQLException: [SQL5001] Column qualifier or table CUSTOMER
    undefined.
    The model is basically like this:
    Class Order has a 1-1 relation with Class CustomerRole which in turn has a
    n-1 relation with Class Customer
    Class Order and CustomerRole are both mapped to table SCHEMA1.ORDER (the
    ORDER table contains the FK to the CUSTOMER table)
    Class Customer is mapped to table SCHEMA2.CUSTOMER
    I perform a query using an Extend of class Order.
    I add the following filter to the query:
    "this.CustomerRole.Customer != null"
    (CustomerRole is the name of the relation between Order and CustomerRole,
    while Customer is the name of the relation between CustomerRole and
    Customer)
    When I execute this query, I get the following message:
    kodo.util.DataStoreException: [SQL5001] Column qualifier or table CUSTOMER
    undefined. {SELECT t0.ID, t2.CUSTID, t3.ADDRESS, t4.COUNTRY,
    t4.COUNTRYNAME, t2.NAME FROM SCHEMA1.ORDER t0 INNER JOIN SCHEMA1.ORDER t1
    ON t0.ID = t1.ID LEFT OUTER JOIN SCHEMA2.CUSTOMER t2 ON t1.CUSTID =
    t2.CUSTID LEFT OUTER JOIN SCHEMA2.CUSTOMER t3 ON t2.CUSTID = t3.CUSTID
    LEFT OUTER JOIN SCHEMA1.COUNTRY t4 ON t3.COUNTRY = t4.COUNTRY WHERE (0 <
    (SELECT COUNT(*) FROM SCHEMA2.CUSTOMER WHERE CUSTOMER.CUSTID =
    t1.CUSTID))} [code=-5001, state=42703]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: [SQL5001] Column qualifier or
    table CUSTOMER undefined. {SELECT t0.ID, t2.CUSTID, t3.ADDRESS,
    t4.COUNTRY, t4.COUNTRYNAME, t2.NAME FROM SCHEMA1.ORDER t0 INNER JOIN
    SCHEMA1.ORDER t1 ON t0.ID = t1.ID LEFT OUTER JOIN SCHEMA2.CUSTOMER t2 ON
    t1.CUSTID = t2.CUSTID LEFT OUTER JOIN SCHEMA2.CUSTOMER t3 ON t2.CUSTID =
    t3.CUSTID LEFT OUTER JOIN SCHEMA1.COUNTRY t4 ON t3.COUNTRY = t4.COUNTRY
    WHERE (0 < (SELECT COUNT(*) FROM SCHEMA2.CUSTOMER WHERE CUSTOMER.CUSTID =
    t1.CUSTID))} [code=-5001, state=42703]
    java.sql.SQLException: [SQL5001] Column qualifier or table CUSTOMER
    undefined.
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:63)
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:51)
         at
    kodo.jdbc.runtime.AbstractSelectResultObjectProvider.handleCheckedException(AbstractSelectResultObjectProvider.java:150)
         at com.solarmetric.rop.WindowResultList.<init>(WindowResultList.java:57)
         at
    kodo.jdbc.runtime.JDBCFetchConfigurationImpl.newResultList(JDBCFetchConfigurationImpl.java:135)
         at
    kodo.runtime.CopyOnWriteFetchConfiguration.newResultList(CopyOnWriteFetchConfiguration.java:159)
         at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:750)
         at kodo.query.AbstractQuery.execute(AbstractQuery.java:633)
         at TestApp.<init>(TestApp.java:67)
         at TestApp.main(TestApp.java:135)
    The problem is the last part of the query where it selects from
    SCHEMA2.CUSTOMER while the Where part refers to just CUSTOMER (without
    schema qualifier).
    Are there any ideas to solve this? Is there a way to force columnnames
    always being fully qualified in generated SQL statements?
    Thanks,
    Regards,
    Alexander

    Unfortunately, this is a bug that has to be fixed on our end. We'll
    make sure a fix is in the next 3.1 release. Thanks for the report!

  • How to see generated SQL when execute JPQL query using entity manager?

    I want to see generated SQL query in console or in a log file. How do I do that?
    I'm using GlassFish if it matters

    If you want to see SQL query that is generated from JPQL in GlassFish console you should do following:
    Log on admin console.
    Select 'Application Server' from tree, then select Logging tab and Log Levels sub-tab.
    Log level for 'Persistence' must be set to FINE or level with more verbosity.

Maybe you are looking for

  • How do I put my laptop music in the cloud

    Have new iPhone 5s and want to put my iTunes music on the cloud. The only music showing is purchased. Have an extensive music library on my Mac computer. How do I upload that music in tithe cloud?

  • Digital signature for flash projectors

    I have a client that would like me to digital sign my flash projector on windows and on a mac. Is there anyway to do this?  I haven't found any resources outside of a workflow for AIR development. any help is appreciated!  Thanks!

  • Prof Tax Error

    Dear Sap Guru, After the change in Prof Tax ,due to some error the Prof Tax for Resign Employees is getting counted even if the employee as left 3 months before the change is Prof Tax. Suppose the employee as left on 01/01/2008 at that time his prof

  • Ical one way sync??

    PHONE - 4S RUNNING IOS7 COMPUTER - IMAC RUNNING OS X Lion 10.7.5 I am getting very angry with iCal!  All my calenders are clouded and sync to my phone EXCEPT FOR ONE.  On this calender, I can create a new event on my mac and it will sync directly wit

  • Problem reading a network (Network Data Model)

    Hello, I'm trying to create a network for routing. I can create and write this network fine but can't read it. Currently I'm using the PL/SQL API but have also tryed the Java API (both present the same problem). The following PL/SQL gives the below e