Nested SQL Query in CR10 not working

Hi
I have a SQL query See below but crashing CR
SELECT     ax_Staff.ax_Name, ax_Staff.ax_Reference_Number, ax_Licence.Rn_Descriptor, ax_Licence.ax_Expiry_Date, ax_Department.ax_Name AS Department
FROM         ax_Staff INNER JOIN
                      ax_Department ON ax_Staff.ax_Department_Id = ax_Department.ax_Department_Id LEFT OUTER JOIN
                      ax_Licence ON ax_Staff.ax_Staff_Id = ax_Licence.ax_Staff_Id
Where ax_Staff.ax_Reference_Number not in (SELECT     ax_Staff.ax_Reference_Number
FROM         ax_Staff INNER JOIN
                      ax_Licence ON ax_Staff.ax_Staff_Id = ax_Licence.ax_Staff_Id
WHERE     (ax_Licence.Rn_Descriptor LIKE 'Driving Licence - Rider (R)'))
ORDER BY Department, ax_Staff.ax_Name
The query is working on MS SQL server 2005 and giving results as I want, but I have problem to recreate this in CR.Can anybody help how to creat the report???? where Looking for list of Staff who has no Particular Licence
Sample of the report:
GH1: Administarion
GH2:  Peter Brown StaffID 4442 --- THIS Group IS OK to be on the list
GH2:     John Smith StaffID 4444 -
THIS whole GROUP NEEDS TO BE SUPPRESED or EXCLUDED
Details:  Driving Licence Car (C)
  Details: Driving Licence Rider (R)   --this record passed condition
  Details: Driving Licence HR  (HR)                        
GH2:  Julia Ng StaffID 4446 --- THIS Group IS OK to be on the list
Details:  Driving Licence C
I have 3 tables
Department
Staff
Licence

Hi Sastry,
Connection to the database is trough Pivotal, I have tried ODBC connection as well but same error
The instruction at "0x005d53e0" refereced memory at "0x00000014'. The memory could not be "read".
With ODBC I have always compilation error saying
Query Engine Error: '42000:[Microsoft][ODBC SQL Server Driver][SQL server] Incorrect syntax near the keyword 'SELECT'. '.
but even the simple select statment is showing the error.
Do you think the error is with Drivers???
Regards
Stefan

Similar Messages

  • SQL Query Single Row not working

    My workflow contain a Query Single row activity. I have added a where clause in Arabic which is not working. If I remove the Arabic condition its working.
    Is there something to do with the server?
    My server is windows 2008 R2 Server.
    The same workflow is running perfectly on another identical environment.
    Thanks for any valuable suggestions,
    Nith

    Hi Sastry,
    Connection to the database is trough Pivotal, I have tried ODBC connection as well but same error
    The instruction at "0x005d53e0" refereced memory at "0x00000014'. The memory could not be "read".
    With ODBC I have always compilation error saying
    Query Engine Error: '42000:[Microsoft][ODBC SQL Server Driver][SQL server] Incorrect syntax near the keyword 'SELECT'. '.
    but even the simple select statment is showing the error.
    Do you think the error is with Drivers???
    Regards
    Stefan

  • ORA-29540: class oracle/xml/sql/query/OracleXMLStaticQuery does not exist

    I am getting below error when trying to generate xml. Browsing on google did not help me. I would appreciate if someone can provide the solution.
    SQL> select dbms_xmlquery.getxml('select * from dual', 2) from dual;
    ERROR:
    ORA-29540: class oracle/xml/sql/query/OracleXMLStaticQuery does not exist
    ORA-06512: at "SYS.DBMS_XMLQUERY", line 19
    ORA-06512: at "SYS.DBMS_XMLQUERY", line 271
    ORA-06512: at line 1

    Then it is probably not the case that you are affected by the issue described in Metalink document 185857.1, but if I were you I would check it anyway, since it might be the problem.

  • Query level filter not working in Webi report

    Hi All,
    I am using BOXI R3.1 (SP3), m facing one problem when refreshing Webi report on daily basis. I am using three query level filter as a prompt, but i checked one filter is not working then i need to reapply this filter and rest 2 filter is working fine.
    Can anyone suggest me why problem is coming?
    Regards,

    Hi,
    Prompts are interactive, and come from the query panel. Filters are not interactive, and are set on the report or block. There are also input controls, which are interactive filters
    1. Select the universe in the list of universes to open the Query Panel.
    2. Drag the Year object to the Result Objects pane.
    3. Drag the Number of Guests object to the Query Filters pane and create a report filter that restricts Number of Guests to greater than n.
    4. Click Combined Query.
    The Combined Query pane appears in the bottom left of the Query panel with the two queries joined by UNION.
    5. Click on the second query and remove the Year and Number of Guests objects.
    6. Drag the Reservation Year object to the Result Objects pane.
    7. Drag the Future Guests object to the Query Filters pane and create a report filter that restricts the future guests to greater than n.
    8. Click Run Query.
    Best Regards
    Naveen

  • Oracle 10.1.0.4.2 SQL Plus dbms_output.put_line not working

    I am using Oracle 10.1.0.4.2 SQL Plus, and dbms_output.put_line is not working. It returns the dbms_output ONLY from outside the procedure. I have dbms_output INSIDE my procedure, and none of it gets returned. Please help!
    Here is what I enter:
    set serveroutput on size 1000000;
    DECLARE
         x number:=0;
    begin
    DBMS_OUTPUT.ENABLE;
    c2reports.c2proc(x,'TEST');
    DBMS_OUTPUT.PUT_LINE('testX');
    END;
    testX
    There should be more besides the 'testX' that gets returned. The first line in my procedure has output code to print testY. Thanks in advance!

    This is the forum for the Oracle's SQL Developer (Not for general SQL/PLSQL questions). You should ask question like this in the PL/SQL forum

  • Oracle XSU: oracle.xml.sql.query.OracleXMLQuery is not recognized

    Hi, there!
    I've got a problem when tryed to use Oracle XSU (xml-sql utility to generate xml). My simple java application works fine using XSU. But when I created session stateless bean I've got an EJBException regarding this
    line:
    oracle.xml.sql.query.OracleXMLQuery qry = new oracle.xml.sql.query.OracleXMLQuery(conn, commandSQLStatement);
    It doesn't recognize OracleXMLQuery class as I've got in dump. So my classpath includes original location of that utility and Oracle parser.
    I really appreciate for any help.
    Thanks.
    strXML = qry.getXMLString();

    Patricia,
    Did you go through the link
    Re: XML SQL Utility
    You have to put xsu12.jar in the lib directory of the jdev.
    xsu12.jar is in the lib directory of the XDK installation.
    You can download XDK from
    http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_java.html
    Just download the XDK kit, get the xsu12.jar from the lib directory and put in the lib directory of the jdev.
    -- Arvind

  • Passing Mutivalue Constant Query Filter is not working

    Hi All,
    I am using Webi4.0.On the Query panel when I try to pass multiple values to a constant filter it does not work.For example if I try to apply State filter in my Query and if I select Constant as its type and type A,B then Webi takes only A in the query and not B.
    I know it a simple task but however it is not working.
    Any help on this will be appreciated.
    Thanks in advance.

    Hi Riddhi,
    Can you pls put scrrenshot how you are passing multiple value to filter.
    ~Anuj

  • SQL Query Issue - (inner not passing to outer query)

    Hello everyone:
    Here is my SQL query:
    SELECT RD.SITE,
      ROUND(
      (SELECT COUNT (DISTINCT PB.EMP_ID)
      FROM BOOK PB
      WHERE PB.EMP_ID IN
        (SELECT PB.EMP_ID FROM BOOK PB
      (SELECT COUNT (DISTINCT PB.EMP_ID)
      FROM BOOK PB
      WHERE PB.EMP_ID IN
        (SELECT PB.EMP_ID FROM BOOK PB
    WHERE MO.QUALIFIER > 4
      )* 100, 2) AS PERCENTAGE
    FROM BOOK PB
    LEFT JOIN POSITION MO
    ON PB.EMP_ID = PO.EMP_ID
    INNER JOIN PHYS_LOCATION RD
    ON MO.HOUSED         = RD.SITE_ID
    WHERE MO.ACTUAL_END IS NULL
    GROUP BY RD.SITE;Why am I getting the overall percentage for all Sites as opposed to each percentage calculating for each individual site. I grouped by RD.SITE, so I presumed it would calculate percentages for each site. What did I do wrong?
    Thank you for your assistance.

    AquaNX4 wrote:
    Hello everyone:
    Here is my SQL query:
    SELECT RD.SITE,
    ROUND(
    (SELECT COUNT (DISTINCT PB.EMP_ID)
    FROM BOOK PB
    WHERE PB.EMP_ID IN
    (SELECT PB.EMP_ID FROM BOOK PB
    (SELECT COUNT (DISTINCT PB.EMP_ID)
    FROM BOOK PB
    WHERE PB.EMP_ID IN
    (SELECT PB.EMP_ID FROM BOOK PB
    WHERE MO.QUALIFIER > 4
    )* 100, 2) AS PERCENTAGE
    FROM BOOK PB
    LEFT JOIN POSITION MO
    ON PB.EMP_ID = PO.EMP_ID
    INNER JOIN PHYS_LOCATION RD
    ON MO.HOUSED         = RD.SITE_ID
    WHERE MO.ACTUAL_END IS NULL
    GROUP BY RD.SITE;Why am I getting the overall percentage for all Sites as opposed to each percentage calculating for each individual site. I grouped by RD.SITE, so I presumed it would calculate percentages for each site. What did I do wrong?Because that is what you are requesting. Your scalar subquery to get the percentage is not restricted by the current site. Add filter columns to restrict the selected values for the computation
    Edited by: riedelme on May 8, 2013 7:26 AM

  • XMII Query Selected tags not working

    I am using a query template for tag list against a UDS PI server and the "Selected Tags" dos not seem to wok. It retuns all tags or masked ones even when the check box "Use Group.Mask .....'  is unchecked.
    The UDS does not have groups since the alias tool  doesn't seem to allow wildcarding accomadating future tags.
    Product Version: 11.5.3 b66
    Thanks, Ed (for Shari)

    Hi,
    As Jeremy said, 'Use Group or Mask for Tag selection' is used for Current, History, HistoryEvent, and Statistics query modes. For namespace query modes such as TagList/GroupList it will not work. Please find the below link for you help:
    http://help.sap.com/saphelp_xmii115/helpdata/en/index.htm
    Hope it helps!
    Best Regards,
    Kedar

  • Lightbox nested in Accordion panel is not working.

    I am attempting to nest a lightbox slideshow in an accordion panel with less than desired results. I can get the Lightbox to nest and I can arrange the buttons just fine .However, when I preview it my forward and back buttons appear in the upper left corner and they are all messed up. This is absolutly useless as it destroys the aesthetics. Any insights as to how to fix this (not work around, I can do that...) would be appreciated.
    Here are some screens:
    1) layout is fine. Note the advance arrows on left and right of layout.
    2) Layout seems to be fine in the preview. Thumbnails look good...
    3) The advance arrows are not where I placed them in the layout. They are overlapping in the upper left corner.

    Well, it's not recreating what I did becauseI don't see any images in your example. Did you populate the gallery?
    Anyhow:
    I created an accordion panel.
    The first top panel contains a price list with text only.
    Using the "+" I made a second panel and placed a "slideshow lightbox" widget
    I populated the widget with roughly 100 jpegs compressed to 50%  and edited my arrow keys placing them on the left and right which
    gave the results in the image above.
    This is repeatable on my end.

  • SQL Window Text Edits Not Working

    I've been using SQL Developer 1.5.1 for some time now and it has worked great. Just recently, I'm not able to do simple text edits in the SQL window. I run sql queries constantly and have had to go back to an older version of SQL Developer. I have no idea what I may have done to cause this.
    I can type in the sql window, but I cannot move my cursor to any part of the entered text. I cannot move to a new line [Enter key], or back space, or delete text. I can highlight text and delete it, but simple text edits do not work.
    Has anyone experienced this and if so, is there a known cause and/or fix?
    I have no idea on how to uninstall this version and reinstall it. I've tried deleting the files and re-running the zip, but my old settings are still present.
    Help?

    I had exactly the same problem and the Tools/Options/Accelerator/Load Preset fixed it. Thanks a lot!!!!
    Alex

  • Command the execute sql query and does not clean up data in Table

    Hi Team
    I have an SP, which writes source and target data to Temp Tables and runs except query to get mismatch details
    I am using Exec command to execute source query that writes data to Temp Table, once I execute query using Exec, data is written and immediately #temp table is cleaned, now I cannot use #temp table for comparition.
    Is there any way to execute sql query in SP without using EXEC and will hold the data in temp table.

    You need to create temp table before EXEC statement and rewrite your dynamic query also as below
    declare @source_Sql nvarchar(1000)
    ,@target_Sql nvarchar(1000)
    create table #TempTable1 (name nvarchar(10))
    create table #TempTable2 (name nvarchar(10))
    set @source_Sql = 'INSERT INTO #TempTable1 SELECT [Name] from Employee'
    set @target_Sql = 'INSERT INTO #TempTable2 SELECT [Name] from Employee2'
    EXEC (@source_Sql)   
    EXEC (@target_Sql)             
    select * from #TempTable1 
     Except 
    select * from #TempTable2

  • LOV in the Query Panel is not Working

    Hi Everyone,
    I dont see the LOV working in the Query Panel but it works in the table region, I am able to open the LOV and search some value and when i say ok it wont return any value... Do anyone have idea on that?
    Thanks

    Can anyone help me on this? Am really confused....
    Thanks..

  • Pl/sql Custom Authentication is not working. DADs.conf is fine.

    Hi All,
    We have configured authentication mode to customowa in the dads.conf. same configuration is working in one instance, while it is not working on other instance.
    Please advice me to find the solution.
    Error message from the error_log is as follows.
    mod_plsql: /imguat/mvt_cover_page.Instructions HTTP-403 ORA-0
    Enabled the debug on in plsql.conf
    the log file shows the following information.
    if (owa_custom.authorize = TRUE) then
    :authorized := 'yes';
    else
    :authorized := 'no';
    end if;
    :realm := owa.protection_realm;
    end; successfully executed
    <835614824 ms>(wpca.c,389) wpcaexe: function owa_custom.authorize returned no
    <835614824 ms>(wpca.c,391) wpcaexe: Auth Realm set to
    <835614824 ms>(wpcs.c, 77) Executed 'begin dbms_session.reset_package; end;' (rc=0)
    <835614824 ms>(wpca.c,215) wpcauth: authorize returned 0
    <835614824 ms>Custom auth failed without setting realm
    <835614824 ms>/imguat/MVT_Web_Style.Style2 HTTP-403 ORA-0
    Your help is highly appreciated.
    Regards
    Jaani.

    Hi All,
    We have configured authentication mode to customowa in the dads.conf. same configuration is working in one instance, while it is not working on other instance.
    Please advice me to find the solution.
    Error message from the error_log is as follows.
    mod_plsql: /imguat/mvt_cover_page.Instructions HTTP-403 ORA-0
    Enabled the debug on in plsql.conf
    the log file shows the following information.
    if (owa_custom.authorize = TRUE) then
    :authorized := 'yes';
    else
    :authorized := 'no';
    end if;
    :realm := owa.protection_realm;
    end; successfully executed
    <835614824 ms>(wpca.c,389) wpcaexe: function owa_custom.authorize returned no
    <835614824 ms>(wpca.c,391) wpcaexe: Auth Realm set to
    <835614824 ms>(wpcs.c, 77) Executed 'begin dbms_session.reset_package; end;' (rc=0)
    <835614824 ms>(wpca.c,215) wpcauth: authorize returned 0
    <835614824 ms>Custom auth failed without setting realm
    <835614824 ms>/imguat/MVT_Web_Style.Style2 HTTP-403 ORA-0
    Your help is highly appreciated.
    Regards
    Jaani.

  • Query remote table not working in PL/SQL

    I have a problem that is killing me to figure out. Basically we trying to query a remote table through PL/SQL and it comes back with invalid column name for the table. But the table exists in the remote database and has the column. The query works fine from the same database outside of PL/SQL, just not in PL/SQL. I'll setup a test case below.
    We have local database called DB1 and remote database called DB2. The table we are querying is called EMP.
    First we create database link:
    create database link DB2.WORLD connect to...
    Test the link:
    select ENAME from [email protected];
    ENAME
    SHAWN
    Works fine.
    Now we put this query inside a PL/SQL block:
    declare
    l_ename varchar2(20);
    begin
    select ename into l_ename from [email protected];
    end;
    This fails with the following error:
    select ename
    ERROR at line 274:
    ORA-06550: line 274, column 7:
    PL/SQL: ORA-00904: invalid column name
    ORA-06550: line 271, column 3:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 279, column 9:
    PL/SQL: ORA-00904: invalid column name
    ORA-06550: line 277, column 3:
    PL/SQL: SQL Statement ignored
    Now, I've tried changing how we select from the remote table, I've put the select statement in a cursor, tried creating a synonym which points to the remote table and selecting using the synonym in PL/SQL, it always returns the same error. But always works outside of PL/SQL.
    Now the user we are connecting to the remote database as, has select on the EMP table, through a role, along with 30 other tables, all the other tables are able to be selected through the database link, in PL/SQL, it's just this one table.
    Additionally I can go to another database, and create the same database link, and the query in PL/SQL works fine to the remote table. It's just this one table, from this one database, that doesn't work just in PL/SQL. Any ideas would be appreciated, I've exhausted everything.
    Also, creating a copy of the table using "create table as select * from..." we can select from the copy of the table using PL/SQL through the database link. The problem is this is a central warehouse table, and is used my multiple applications and updated constantly, so dropping a recreating this table is a last resort.
    Yes, this process did work, for over a year, then suddenly it stopped. Of course, no one made any changes to either database, that's always the case. I know the code didn't change though, it was still timestamped from a year ago.
    Thanks in advance.

    Could this be a variant on an old favourite, viz privileges being granted through roles. We cannot use objects in PL/SQL if our privileges are assigned through a role.
    Maybe what has changed is that instead of being granted privileges on EMP@DB2 directly the privileges have been re-organised so that your user has them granted through a role.
    Cheers, APC

Maybe you are looking for

  • SSRS Hide one data value label in chart legend

    Is it possible  to hide one value in the legend? I've got a stacked bar chart, but there's one value that I don't want to display in the Legend. Is it possible to hide this particular color and label in the legend? Thanks, Chris

  • File Not Compatible w/ This Version of Photoshop?

    I was working on a file last night, clicked save, walked away, and came back a few minutes later.  It appeared that the file saved; however, my computer was frozen.  I gave the system a forced restart and now I get a message saying that the file is n

  • Opening files with VB6 when files are in KM which is located on Producer

    Hello; Can anyone help me with this issue? I have a VB app that is looks for a file in KM on a Producer Portal then opens and saves it. The issue I am running into is a logon screen keeps popping up for the Producer server. Is there anyway around hav

  • Dual Monitor, Mac Mini

    Hi I have looked around and most places say buy this dual head 2 go thing but i dont want to spend loads, anyway. I have an old mac mini G4 with Raedon 9200 graphics card, and so can i get dual monitors working with my mac? I dont care how, anyway po

  • Local Copy of Third Party Data

    There has been a serious proformance issue with a web application we are releasing soon. The problem is that we are displaying some third party data ( stock rates of each day) taken from some other sites. This is making the application remarkably slo