Reports...critical query problem

Dear All,
want to generate a report in reports 6i..the output is as below...
SRNO SALARY COMM DIFF_SALARY
1 5000 50 4500
2 4400 100 4400
3 4400 400 4000
4 4000 500 3500
actually the diff of (salary-comm) should be displayed in the salary column in next line. For understanding i hv shown the output in a separate column.
Iam usingForms 6i so i can't use the lastest functions of Oracle9i.
How to do this..please help out

Regardless of version of Forms/Reports you are using, if the DB version you are usion is at least 9, use the LAG function in your query.
http://www.oracle-base.com/articles/misc/LagLeadAnalyticFunctions.php

Similar Messages

  • Report SQL query problem

    Hi!
    I want to create a report with the script i copied at the bottom of this message. For some reason i get the following error:
    Error: Unable to describe SQL statement. Please correct it (WWV-13010)
    (WWV-)
    ORA-01001: invalid cursor (WWV-11230)
    ORA-00937: not a single-group group function (WWV-11230)
    Critical Error in wwerr_api_error.get_errors! SQL Error Message: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-01001: invalid cursor (WWV-)
    Does anybody have a clue where this is coming from? It seems to me that there are no diffucult un-SQL like things in the script.
    Thanks in advance!
    SELECT rse.name||', '||rse.initials||' '||rse.prefix "Medewerker"
    ,dpt.name "Afdeling"
    ,sum(round(act.duration *24,2)) "Aantal uren"
    ,count(distinct(sht.begin_date)) "Aantal dagen"
    ,count(distinct(ill.begin_time)) "Aantal keer"
    FROM ros.ros_departments@ROSPROD dpt
    ,ros.ros_scenarios@ROSPROD sco
    ,ros.ros_activity_types@ROSPROD aty
    ,ros.ros_activities@ROSPROD act
    ,ros.ros_duties@ROSPROD dty
    ,ros.ros_illnesses@ROSPROD ill
    ,ros.ros_shifts@ROSPROD sht
    ,ros.ros_resources@ROSPROD rse
    WHERE rse.id = sht.rse_id
    AND sht.name = 'Z'
    AND sht.begin_date <= sysdate
    AND ill.rse_id = rse.id
    AND trunc(sht.begin_date) BETWEEN trunc(ill.begin_time) AND trunc(nvl(ill.end_time,sysdate))
    AND dty.id = sht.dty_id
    AND decode(sign(dty.begin_time)
    ,-1, sht.begin_date + 1
    ,sht.begin_date)
    >= to_date('10-01-2000 00:00','dd-mm-yyyy hh24:mi')
    AND decode(sign(dty.begin_time)
    ,-1,sht.begin_date + 1
    ,sht.begin_date)
    <= to_date('10-01-2001 23:59','dd-mm-yyyy hh24:mi')
    AND sht.begin_date >= to_date('10-01-2000 00:00','dd-mm-yyyy hh24:mi') - 1
    AND sht.begin_date <= to_date('10-01-2001 23:59','dd-mm-yyyy hh24:mi') + 1
    AND act.dty_id = dty.id
    AND aty.id = act.ate_id
    AND aty.name = 'Ziek'
    AND sco.sce_rsr_id = sht.sce_id
    AND sco.status = 'PUBLISHED' -- <> 'TRIAL' en 'PLAN'
    AND dpt.id = sco.dpt_id
    AND dpt.name NOT IN ('BEEK/VKL', 'BEEK/VLA','EELDE/VKL','EELDE/VLA','ROTTERDAM/VKL','ROTTERDAM/VLA','SIM','STO','RCN','XSurvey')
    AND rse.name = :MDWPARAM
    AND dpt.name = :AFDPARAM
    GROUP BY rse.name||', '||rse.initials||' '||rse.prefix ,dpt.name
    ORDER BY 2,1

    Hi,
    Please run this sql statement in the SQL session. This way you will get the line number where the problem is happening.
    The error seems to be because the column in the select is not in the group by clause.
    Thanks,
    Sharmila

  • XL Reporter Query problem

    I have a query with sbo:
    SELECT T0.DocNum, T0.ItemCode,t0.duedate,T0.PlannedQty, T0.OriginNum as Sale-Order, T0.U_Doc_Remarks,t2.numatcard  FROM OWOR T0 left join OITM T1 ON t0.itemcode = T1.ITEMCODE left join ordr t2 on t0.originnum = t2.docnum where T0.OriginNum = '[%0]'
    but in XL Reporter, How do I set up?  OWOR_OriginNum Equal SO_DocNum and OWOR_OriginNum as a param

    XL Reporter does not support SQL. All its meta data have been predefined in the system. You may not have left join option at all.
    Try some other tools such as Crystal Report or Query PLD.
    Thanks,
    Gordon

  • Unable to create report. Query produced too many results

    Hi All,
    Does someone knows how to avoid the message "Unable to create report. Query produced too many results" in Grid Report Type in PerformancePoint 2010. When the mdx query returns large amount of data, this message appears. Is there a way to get all
    the large amount in the grid anyway?
    I have set the data Source query time-out under Central Administration - Manager Service applications - PerformancePoint Service Application - PerformancePoint Service Application Settings at 3600 seconds.
    Here Event Viewer log error at the server:
    1. An exception occurred while running a report.  The following details may help you to diagnose the problem:
    Error Message: Unable to create report. Query produced too many results.
            <br>
            <br>
            Contact the administrator for more details.
    Dashboard Name:
    Dashboard Item name:
    Report Location: {3592a959-7c50-0d1d-9185-361d2bd5428b}
    Request Duration: 6,220.93 ms
    User: INTRANET\spsdshadmin
    Parameters:
    Exception Message: Unable to create report. Query produced too many results.
    Inner Exception Message:
    Stack Trace:    at Microsoft.PerformancePoint.Scorecards.Server.PmServer.ExecuteAnalyticReportWithParameters(RepositoryLocation analyticReportViewLocation, BIDataContainer biDataContainer)
       at Microsoft.PerformancePoint.Analytics.ServerRendering.OLAPBase.OlapViewBaseControl.ExtractReportViewData()
       at Microsoft.PerformancePoint.Analytics.ServerRendering.OLAPBase.OlapViewBaseControl.CreateRenderedView(StringBuilder sd)
       at Microsoft.PerformancePoint.Scorecards.ServerRendering.NavigableControl.RenderControl(HtmlTextWriter writer)
    PerformancePoint Services error code 20604.
    2. Unable to create report. Query produced too many results.
    Microsoft.PerformancePoint.Scorecards.BpmException: Unable to create report. Query produced too many results.
       at Microsoft.PerformancePoint.Scorecards.Server.Analytics.AnalyticQueryManager.ExecuteReport(AnalyticReportState reportState, DataSource dataSource)
       at Microsoft.PerformancePoint.Scorecards.Server.PmServer.ExecuteAnalyticReportBase(RepositoryLocation analyticReportViewLocation, BIDataContainer biDataContainer, String formattingDimensionName)
       at Microsoft.PerformancePoint.Scorecards.Server.PmServer.ExecuteAnalyticReportWithParameters(RepositoryLocation analyticReportViewLocation, BIDataContainer biDataContainer)
    PerformancePoint Services error code 20605.
    Thanks in advance for your help.

    Hello,
    I would like you to try the following to adjust your readerquotas.
    Change the values of the parameters listed below to a larger value. We recommend that you double the value and then run the query to check whether the issue is resolved. To do this, follow these steps:
    On the SharePoint 2010 server, open the Web.config file. The file is located in the following folder:
    \Program Files\Microsoft Office Servers\14.0\Web Services\PpsMonitoringServer\
    Locate and change the the below values from 8192 to 16384.
    Open the Client.config file. The file is located in the following folder:
    \Program Files\Microsoft Office Servers\14.0\WebClients\PpsMonitoringServer\
    Locate and change the below values from 8192 to 16384.
    After you have made the changes, restart Internet Information Services (IIS) on the SharePoint 2010 server.
    <readerQuotas
    maxStringContentLength="2147483647"
    maxNameTableCharCount="2147483647"
    maxBytesPerRead="2147483647"
    maxArrayLength="2147483647"
                  maxDepth="2147483647"
    />
    Thanks
    Heidi Tr - MSFT
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Difference: SAP BW Report iview - Query iView - URL iView

    Hi,
    I want to show BW reports on the portal. Can anybody suggest me the different ways of doing it ? And also let me know about checklist of steps that need to be performed.
    Can anybody tell me the difference between showing BW reports through URL iviews, showing reports through Query iView and showing reports through SAP BW Report iView ?
    Which one can i use for showing BW reports taking into consideration the implementation of SSO between the two? I tried the URL iView (using the Web URL of reports generated by BW) but it asks for Username/password. Is that the problem with SSO. How can i check if SSO parameters have been set or not. I have imported the verify.der to BW System and added that to ACL. Is there anything else which is required?
    Thanks in advance.
    Rgds,
    MA

    Hi Manoj,
    I feel BW report iview will solve your problem. You can create a query sting in BW query designer and give the same in BW query  string text area while creating BW report iview.
    In the case of an url iview you are just giving a URL link of the BW report (this will ask for username/password).
    But, in the case of a BW report iview you can view the required query as an iview (user mapping can be successfully done in this case) You should give fully qualified domain name in Was server option while creating the system.
    While using the logon ticket Login id of both the system (ie BW and Portal) should be the same.
    Refer the link for SSO using logon ticket)
    User Mapping-based Single Sign On
    Regards,
    Vinod

  • Embedding a report designer query into a template - errors out

    In a template i want to include the report designer query, with the web item type - report, when i drag the report item into the template and try to edit it, it takes me to the report designer, there I'm able to open my report designer query - then when i go to - menu - transfer to web apllication designer - it takes me back to WAD but errors out saying it encountered a problem. Did anyone come across this issue? And how did you overcoem this? Any help or pointer would be appreciated and rewarded.
    Please find the error log below:
    3:45:25 PM.686 ########## END  ##########
    3:45:25 PM.686 ########## --> com.sap.bi.et.wad.BexWebApplicationDesigner.Launch.Main ##########
    3:45:25 PM.686: For Info: WAD Start. Revision: 7005.5.1100.277
    GetSystemInformation
    SUNI Const: 1.602272
    CommunicationFactory.GetSystemInformation (Setting Conn 1)): 1.602272
    CommunicationFactory.GetSystemInformation (Setting Conn 2)): 7.110082
    CommunicationFactory.GetSystemInformation (Setting init Propties)): 7.110082
    CommunicationFactory.GetSystemInformation (SUNI.FUNCTION_EXISTS)): 7.710934
    RSR_XLS_RFCtrc: 8.51207
    CommunicationFactory.GetSystemInformation (RSR_XLS_NET_INTERFACE)): 18.02556
    CommunicationFactory.GetSystemInformation (XML Stuff)): 20.0284
    CommunicationFactory.GetSystemInformation (Prop Stuff)): 20.0284
    CommunicationFactory.GetSystemInformation (Version)): 20.0284
    CommunicationFactory.ObtainSystemInformationandCheckVersion (GetSysInfo)): 20.128542
    BExTextPool.New1: 0.300426
    BExTextPool.New2: 0.400568
    BExTextPool.New3: 0.400568
    BExTextPool.New2: 0.400568
    CommunicationFactory.ObtainSystemInformationandCheckVersion (CheckAfterLogin)): 1.00142
    CommunicationFactory.LogOnUsingComConnection (ObtainSystemInfo)): 21.129962
    CommunicationFactory.LogOnUsingComConnection (MainConnectionChangedEvent)): 0
    CommunicationFactory.LogOn: 21.730814
    3:45:41 PM.458: Connected. System: BID
    <?xml version="1.0" encoding="utf-16"?>
    <I_T_SEARCH_ATTR xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
    <?xml version="1.0" encoding="utf-16"?>
    <I_T_SEARCH_ATTR xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
    RSR_XLS_RFCtrc: 0.700994
    BExThemes.LoadFromBackend: 2.50355
    BExThemes.LoadFromBackend: 0
    BExThemes.LoadFromBackend: 0
    Vert
    BExThemes.LoadFromBackend: 0
    <?xml version="1.0" encoding="utf-16"?>
    <I_T_SEARCH_ATTR xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
    BExThemes.LoadFromBackend: 0
    Vert
    BExThemes.LoadFromBackend: 0
    3:47:41 PM.198 ########## END com.sap.bi.et.wad.BexWebApplicationDesigner.Launch.Main ##########
    3:47:41 PM.198 ########## --> com.sap.bi.et.wad.RDHost.WADRDHostFactory.MaintainItem ##########
    -EXCEPTION-START- 3:47:41 PM.198: External exception in Report Designer (execution) ---
    Exception Message: Specified cast is not valid.
    Exception    at com.sap.bi.et.ReportDesigner.RDbReportDesigner.getCookies()
       at com.sap.bi.et.ReportDesigner.RDbReportDesigner.RunFromWAD()
       at com.sap.bi.et.wad.RDHost.WADRDHostFactory.MaintainItem(XmlElement iItemTagNode, XmlElement iLibItemTagNode, IWADHostServicesProvider iServicesProvider, Boolean iIsLibItem)
    Full Stack:
         at com.sap.bi.et.wad.Debug.WriteTraceToFile(Level, String, Exception)
         at com.sap.bi.et.wad.Trace.Exception(Exception, String)
         at com.sap.bi.et.wad.RDHost.WADRDHostFactory.MaintainItem(XmlElement, XmlElement, IWADHostServicesProvider, Boolean)
         at com.sap.bi.et.wad.rdcontrolhost.WADHostFactory.MaintainItem(XmlElement, XmlElement, IWADHostServicesProvider, Boolean)
         at com.sap.bi.et.wad.wiz.WADsF4GUIServices.CallCustomItemDialog(XmlElement, Form)
         at com.sap.bi.et.wad.man.WADfrmMainWindow.mnuCTXTEditTagCustom_Click(Object, EventArgs)
         at System.Windows.Forms.MenuItem.OnClick(EventArgs)
         at System.Windows.Forms.MenuItemData.Execute()
         at System.Windows.Forms.Command.Invoke()
         at System.Windows.Forms.Control.WmCommand(Message&)
         at System.Windows.Forms.Control.WndProc(Message&)
         at System.Windows.Forms.ScrollableControl.WndProc(Message&)
         at System.Windows.Forms.ContainerControl.WndProc(Message&)
         at System.Windows.Forms.Form.WndProc(Message&)
         at System.Windows.Forms.ControlNativeWindow.OnMessage(Message&)
         at System.Windows.Forms.ControlNativeWindow.WndProc(Message&)
         at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
         at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&)
         at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32)
         at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32, ApplicationContext)
         at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32, ApplicationContext)
         at System.Windows.Forms.Application.Run(Form)
         at com.sap.bi.et.wad.BexWebApplicationDesigner.Launch.Main()
    -EXCEPTION-END----

    Hi Voodi,
    I have the same problem too. Worked  fine in SP 9 . Now we are in SP11 with FEP also in SP11 revision 277.Did you resolve the issue if so how?
    Thanks,
    Karthik

  • Oracle Report Server wierd problem

    Hi All,
    I am facing very wierd problem with oracle report server.
    I am using Oracle Report Server 10g R1. The problem I am facing is as under:
    There is custom parameter form where user enters report filter criteria and press a button to create the report.
    The problem is that report is giving output some times and sometimes it gives no output at all. Both the times, the parameters passed by user are same. The report executions are done for both runs one after other. We have tried to look in report server trace file but could not find anything. When report server fails to give any data in the report, at the same time, we have tried to execute the report query on SQL prompt and it did return data.
    Can any one give any hint where the problem could be ?
    Thanks,
    Ramchandra Jetwani

    Hi,
    When i used to get only one page the options like facing, continuous facing are disabled. And displays only single page.
    These options are enabled only when there are multiple pages in pdf.
    One more thing i found that it happens when I first view the report as pdf it displays
    all the pages, then i change the display format to csv and again when i change
    the format to pdf the problem starts.
    And when I will restart the report server service, it works fine again until i wont view it in CSV format.
    Message was edited by:
    Yogesh

  • SQL+-MULTI TABLE QUERY PROBLEM

    HAI ALL,
    ANY SUGGESTION PLEASE?
    SUB: SQL+-MULTI TABLE QUERY PROBLEM
    SQL+ QUERY GIVEN:
    SELECT PATIENT_NUM, PATIENT_NAME, HMTLY_TEST_NAME, HMTLY_RBC_VALUE,
    HMTLY_RBC_NORMAL_VALUE, DLC_TEST_NAME, DLC_POLYMORPHS_VALUE,
    DLC_POLYMORPHS_NORMAL_VALUE FROM PATIENTS_MASTER1, HAEMATOLOGY1,
    DIFFERENTIAL_LEUCOCYTE_COUNT1
    WHERE PATIENT_NUM = HMTLY_PATIENT_NUM AND PATIENT_NUM = DLC_PATIENT_NUM AND PATIENT_NUM
    = &PATIENT_NUM;
    RESULT GOT:
    &PATIENT_NUM =1
    no rows selected
    &PATIENT_NUM=2
    no rows selected
    &PATIENT_NUM=3
    PATIENT_NUM 3
    PATIENT_NAME KKKK
    HMTLY_TEST_NAME HAEMATOLOGY
    HMTLY_RBC_VALUE 4
    HMTLY_RBC_NORMAL 4.6-6.0
    DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE     60
    DLC_POLYMORPHS_NORMAL_VALUE     40-65
    ACTUAL WILL BE:
    &PATIENT_NUM=1
    PATIENT_NUM 1
    PATIENT_NAME BBBB
    HMTLY_TEST_NAME HAEMATOLOGY
    HMTLY_RBC_VALUE 5
    HMTLY_RBC_NORMAL 4.6-6.0
    &PATIENT_NUM=2
    PATIENT_NUM 2
    PATIENT_NAME GGGG
    DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE     42
    DLC_POLYMORPHS_NORMAL_VALUE     40-65
    &PATIENT_NUM=3
    PATIENT_NUM 3
    PATIENT_NAME KKKK
    HMTLY_TEST_NAME HAEMATOLOGY
    HMTLY_RBC_VALUE 4
    HMTLY_RBC_NORMAL 4.6-6.0
    DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE     60
    DLC_POLYMORPHS_NORMAL_VALUE     40-65
    4 TABLES FOR CLINICAL LAB FOR INPUT DATA AND GET REPORT ONLY FOR TESTS MADE FOR PARTICULAR
    PATIENT.
    TABLE1:PATIENTS_MASTER1
    COLUMNS:PATIENT_NUM, PATIENT_NAME,
    VALUES:
    PATIENT_NUM
    1
    2
    3
    4
    PATIENT_NAME
    BBBB
    GGGG
    KKKK
    PPPP
    TABLE2:TESTS_MASTER1
    COLUMNS:TEST_NUM, TEST_NAME
    VALUES:
    TEST_NUM
    1
    2
    TEST_NAME
    HAEMATOLOGY
    DIFFERENTIAL LEUCOCYTE COUNT
    TABLE3:HAEMATOLOGY1
    COLUMNS:
    HMTLY_NUM,HMTLY_PATIENT_NUM,HMTLY_TEST_NAME,HMTLY_RBC_VALUE,HMTLY_RBC_NORMAL_VALUE     
    VALUES:
    HMTLY_NUM
    1
    2
    HMTLY_PATIENT_NUM
    1
    3
    MTLY_TEST_NAME
    HAEMATOLOGY
    HAEMATOLOGY
    HMTLY_RBC_VALUE
    5
    4
    HMTLY_RBC_NORMAL_VALUE
    4.6-6.0
    4.6-6.0
    TABLE4:DIFFERENTIAL_LEUCOCYTE_COUNT1
    COLUMNS:DLC_NUM,DLC_PATIENT_NUM,DLC_TEST_NAME,DLC_POLYMORPHS_VALUE,DLC_POLYMORPHS_
    NORMAL_VALUE,
    VALUES:
    DLC_NUM
    1
    2
    DLC_PATIENT_NUM
    2
    3
    DLC_TEST_NAME
    DIFFERENTIAL LEUCOCYTE COUNT
    DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE
    42
    60
    DLC_POLYMORPHS_NORMAL_VALUE
    40-65
    40-65
    THANKS
    RCS
    E-MAIL:[email protected]
    --------

    I think you want an OUTER JOIN
    SELECT PATIENT_NUM, PATIENT_NAME, HMTLY_TEST_NAME, HMTLY_RBC_VALUE,
    HMTLY_RBC_NORMAL_VALUE, DLC_TEST_NAME, DLC_POLYMORPHS_VALUE,
    DLC_POLYMORPHS_NORMAL_VALUE
    FROM PATIENTS_MASTER1, HAEMATOLOGY1,  DIFFERENTIAL_LEUCOCYTE_COUNT1
    WHERE PATIENT_NUM = HMTLY_PATIENT_NUM (+)
    AND PATIENT_NUM = DLC_PATIENT_NUM (+)
    AND PATIENT_NUM = &PATIENT_NUM;Edited by: shoblock on Nov 5, 2008 12:17 PM
    outer join marks became stupid emoticons or something. attempting to fix

  • 10g Dev Preview -- sub query problem

    I'm not sure if this is the place to report bugs or problems with the 10g developer preview. But here goes.
    I have some code that used to work. The idea is to find "task" objects that are not assigned to anyone, ie, have no "task assignment" records pointing to them. This code used to work. It creates an expression that when queried returns all Task objects that are not in the subQuery which fetches task assignments.
    ExpressionBuilder eb = new ExpressionBuilder();
    ReportQuery queryAssigned = new ReportQuery(TaskAssignment.class, new ExpressionBuilder());
    ReportQuery queryAssigned = new ReportQuery(TaskAssignment.class, new ExpressionBuilder());
    queryAssigned.addAttribute("ID", eb.get("task").get("ID"))
    return eb.get("ID").notIn(eb.subQuery(queryAssigned));
    When I use TOPLink 10g, however, I get the following error:
    [junit] Query: ReadAllQuery(com.marketsoft.workflow.Task)
    [junit] Local Exception Stack:
    [junit] Exception [TOPLINK-6015] (Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041116)): oracle.toplink.ex
    ceptions.QueryException
    [junit] Exception Description: Invalid query key [task] in expression.
    [junit] Query: ReadAllQuery(com.marketsoft.workflow.Task)
    [junit] at oracle.toplink.exceptions.QueryException.invalidQueryKeyInExpression(QueryException.java:491)
    [junit] at oracle.toplink.internal.expressions.QueryKeyExpression.validateNode(QueryKeyExpression.java:555)
    [junit] at oracle.toplink.expressions.Expression.normalize(Expression.java:2587)
    [junit] at oracle.toplink.internal.expressions.DataExpression.normalize(DataExpression.java:349)
    [junit] at oracle.toplink.internal.expressions.QueryKeyExpression.normalize(QueryKeyExpression.java:369)
    [junit] at oracle.toplink.internal.expressions.QueryKeyExpression.normalize(QueryKeyExpression.java:356)
    [junit] at oracle.toplink.internal.expressions.DataExpression.normalize(DataExpression.java:343)
    [junit] at oracle.toplink.internal.expressions.QueryKeyExpression.normalize(QueryKeyExpression.java:369)
    [junit] at oracle.toplink.internal.expressions.QueryKeyExpression.normalize(QueryKeyExpression.java:356)
    [junit] at oracle.toplink.internal.expressions.SQLSelectStatement.normalize(SQLSelectStatement.java:951)
    [junit] at oracle.toplink.internal.expressions.SubSelectExpression.normalizeSubSelect(SubSelectExpression.java:123)
    [junit] at oracle.toplink.internal.expressions.ExpressionNormalizer.normalizeSubSelects(ExpressionNormalizer.java:82)
    [junit] at oracle.toplink.internal.expressions.SQLSelectStatement.normalize(SQLSelectStatement.java:982)
    [junit] at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.buildNormalSelectStatement(ExpressionQuery
    Mechanism.java:223)
    [junit] at oracle.toplink.internal.queryframework.ExpressionQueryMechanism.prepareCursorSelectAllRows(ExpressionQuery
    Mechanism.java:587)
    [junit] at oracle.toplink.queryframework.CursorPolicy.prepare(CursorPolicy.java:137)
    [junit] at oracle.toplink.queryframework.CursoredStreamPolicy.prepare(CursoredStreamPolicy.java:93)
    [junit] at oracle.toplink.queryframework.ReadAllQuery.prepare(ReadAllQuery.java:571)
    [junit] at oracle.toplink.queryframework.DatabaseQuery.checkPrepare(DatabaseQuery.java:367)
    [junit] at oracle.toplink.queryframework.ObjectLevelReadQuery.checkPrepare(ObjectLevelReadQuery.java:506)
    [junit] at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:537)
    [junit] at oracle.toplink.queryframework.ReadAllQuery.execute(ReadAllQuery.java:408)
    [junit] at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1977)
    [junit] at oracle.toplink.publicinterface.Session.executeQuery(Session.java:973)
    This maybe isn't that surprising. I see that the unbound ExpressionBuilders might be causing problems. However, which I switch to something a little bit more like what I see in the examples:
    ExpressionBuilder eb = new ExpressionBuilder();
    ExpressionBuilder assignBuilder = new ExpressionBuilder();
    ReportQuery queryAssigned = new ReportQuery(TaskAssignment.class, assignBuilder);
    queryAssigned.addAttribute("ID", assignBuilder.get("task").get("ID"));
    queryAssigned.useDistinct();
    return eb.get("ID").notIn(eb.subQuery(queryAssigned));
    In this case, it seems to generate messed up SQL where the table name goes missing:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041116)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00903: invalid table name
    Error Code: 903
    Call:SELECT COUNT(*) FROM TASKS t0 WHERE ((t0.ID NOT IN (SELECT DISTINCT t1.ID FROM )) AND (t0.ITEMTYPE = ?))
         bind => [Task]
    Query:ReportQuery(com.marketsoft.workflow.Task)
    Local Exception Stack:

    Charles,
    I couldn't reproduce your problem. I used an employee example in which Employee has 1:m relationship with PhoneNumber. My code and sql are as follows:
         ReadAllQuery query = new ReadAllQuery(Employee.class);
         ExpressionBuilder emp = new ExpressionBuilder(Employee.class);
         ExpressionBuilder phone = new ExpressionBuilder();
         ReportQuery subquery = new ReportQuery(PhoneNumber.class, phone);
         subquery.addAttribute("id", phone.get("owner").get("id"));
         subquery.useDistinct();
         Expression expression = emp.get("id").notIn(subquery);
         query.setSelectionCriteria(expression);
    Vector employees = (Vector)getSession().executeQuery(query);
    SELECT t0.VERSION, t1.EMP_ID, t0.L_NAME, t0.F_NAME, t1.SALARY, t0.EMP_ID, t0.GENDER, t0.END_DATE, t0.START_DATE, t0.MANAGER_ID, t0.START_TIME, t0.END_TIME, t0.ADDR_ID FROM EMPLOYEE t0, SALARY t1 WHERE ((t0.EMP_ID NOT IN (SELECT DISTINCT t2.EMP_ID FROM PHONE t4, SALARY t3, EMPLOYEE t2 WHERE ((t2.EMP_ID = t4.EMP_ID) AND (t3.EMP_ID = t2.EMP_ID)))) AND (t1.EMP_ID = t0.EMP_ID))
    Shanno

  • Critical performance problem upon bulk load of groups

    All (including product development),
    I think there are missing indexes in wwsec_flat$ and wwsec_sys_priv$. Anyway, I'd like assistance on fixing the critical performance problems I see, properly. Read on...
    During and after bulk load of a few (about 500) users and groups from an external database, it becomes evident that there's a performance problem somewhere. Many of the calls to wwsec_api.addGroupToList took several minutes to finish. Afterwards the machine went 100% CPU just from logging in with the portal30 user (which happens to be group owner for all the groups).
    Running SQL trace points in the directions of the following SQL statement:
    SELECT ID,PARENT_ID,NAME,TITLE_ID,TITLEIMAGE_ID,ROLLOVERIMAGE_ID,
    DESCRIPTION_ID,LAYOUT_ID,STYLE_ID,PAGE_TYPE,CREATED_BY,CREATED_ON,
    LAST_MODIFIED_BY,LAST_MODIFIED_ON,PUBLISHED_ON,HAS_BANNER,HAS_FOOTER,
    EXPOSURE,SHOW_CHILDREN,IS_PUBLIC,INHERIT_PRIV,IS_READY,EXECUTE_MODE,
    CACHE_MODE,CACHE_EXPIRES,TEMPLATE FROM
    WWPOB_PAGE$ WHERE ID = :b1
    I checked the existing indexes, and see that the following ones are missing (I'm about to test with these, but have not yet done so):
    CREATE UNIQUE INDEX "PORTAL30"."WWSEC_FLAT_IX_GROUP_ID"
    ON "PORTAL30"."WWSEC_FLAT$"("GROUP_ID")
    TABLESPACE "PORTAL" PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 160K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING
    CREATE UNIQUE INDEX "PORTAL30"."WWSEC_FLAT_IX_PERSON_ID"
    ON "PORTAL30"."WWSEC_FLAT$"("PERSON_ID")
    TABLESPACE "PORTAL" PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 160K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING
    CREATE UNIQUE INDEX "PORTAL30"."WWSEC_SYS_PRIV_IX_PATCH1"
    ON "PORTAL30"."WWSEC_SYS_PRIV$"("OWNER", "GRANTEE_GROUP_ID",
    "GRANTEE_TYPE", "OWNER", "NAME", "OBJECT_TYPE_NAME")
    TABLESPACE "PORTAL" PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 80K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING
    Note that when I deleted the newly inserted groups, the CPU consumption immediately went down from 100% to some 2-3%.
    This behaviour has been observed on a Sun Solaris system, but I think it's the same on NT (I have observed it during the bulk load on my NT laptop, but so far have not had the time to test further.).
    Also note: In the call to addGroupToList, I set owner to true for all groups.
    Also note: During loading of the groups, I logged a few errors, all of the same type ("PORTAL30.WWSEC_API", line 2075), as follows:
    Error: Problem calling addGroupToList for child group'Marketing' (8030), list 'NO_OSL_Usenet'(8017). Reason: java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "PORTAL30.WWSEC_API", line 2075
    Please help. If you like, I may supply the tables and the java program that I use. It's fully reproducable.
    Thanks,
    Erik Hagen (you may call me on +47 90631013)
    null

    YES!
    I have now tested with insertion of the missing indexes. It seems the call to addGroupToList takes just as long time as before, but the result is much better: WITH THE INDEXES DEFINED, THERE IS NO LONGER A PERFORMANCE PROBLEM!! The index definitions that I used are listed below (I added these to the ones that are there in Portal 3.0.8, but I guess some of those could have been deleted).
    About the info at http://technet.oracle.com:89/ubb/Forum70/HTML/000894.html: Yes! Thanks! Very interesting, and I guess you found the cause for the error messages and maybe also for the performance problem during bulk load (I'll look into it as soon as possible anbd report what I find.).
    Note: I have made a pretty foolproof and automated installation script (or actually, it's part of my Java program), that will let anybody interested recreate the problem. Mail your interest to [email protected].
    ============================================
    CREATE INDEX "PORTAL30"."LDAP_WWSEC_PERS_IX1"
    ON "PORTAL30"."WWSEC_PERSON$"("MANAGER")
    TABLESPACE "PORTAL" PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 32K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING;
    CREATE INDEX PORTAL30.LDAP_WWSEC_PERS_IX2
    ON PORTAL30.WWSEC_PERSON$('ORGANIZATION')
    TABLESPACE PORTAL PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 32K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING;
    CREATE INDEX PORTAL30.LDAP_WWSEC_PERS_PK
    ON PORTAL30.WWSEC_PERSON$('ID')
    TABLESPACE PORTAL PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 32K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING;
    CREATE INDEX PORTAL30.LDAP_WWSEC_PERS_UK
    ON PORTAL30.WWSEC_PERSON$('USER_NAME')
    TABLESPACE PORTAL PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 32K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING;
    CREATE INDEX PORTAL30.LDAP_WWWSEC_FLAT_UK
    ON PORTAL30.WWSEC_FLAT$("GROUP_ID", "PERSON_ID",
    "SPONSORING_MEMBER_ID")
    TABLESPACE PORTAL PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 256K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 0 FREELISTS 1);
    CREATE INDEX PORTAL30.LDAP_WWWSEC_FLAT_PK
    ON PORTAL30.WWSEC_FLAT$("ID")
    TABLESPACE PORTAL PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 256K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 0 FREELISTS 1);
    CREATE INDEX PORTAL30.LDAP_WWWSEC_FLAT_IX5
    ON PORTAL30.WWSEC_FLAT$("GROUP_ID", "PERSON_ID")
    TABLESPACE PORTAL PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 256K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 0 FREELISTS 1);
    CREATE INDEX PORTAL30.LDAP_WWWSEC_FLAT_IX4
    ON PORTAL30.WWSEC_FLAT$("SPONSORING_MEMBER_ID")
    TABLESPACE PORTAL PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 256K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 0 FREELISTS 1);
    CREATE INDEX PORTAL30.LDAP_WWWSEC_FLAT_IX3
    ON PORTAL30.WWSEC_FLAT$("GROUP_ID")
    TABLESPACE PORTAL PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 256K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 0 FREELISTS 1);
    CREATE INDEX PORTAL30.LDAP_WWWSEC_FLAT_IX2
    ON PORTAL30.WWSEC_FLAT$("PERSON_ID")
    TABLESPACE PORTAL PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 256K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 0 FREELISTS 1);
    CREATE INDEX "PORTAL30"."LDAP_WWSEC_SYSP_IX1"
    ON "PORTAL30"."WWSEC_SYS_PRIV$"("GRANTEE_GROUP_ID")
    TABLESPACE "PORTAL" PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 56K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING;
    CREATE INDEX "PORTAL30"."LDAP_WWSEC_SYSP_IX2"
    ON "PORTAL30"."WWSEC_SYS_PRIV$"("GRANTEE_USER_ID")
    TABLESPACE "PORTAL" PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 56K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING;
    CREATE INDEX "PORTAL30"."LDAP_WWSEC_SYSP_IX3"
    ON "PORTAL30"."WWSEC_SYS_PRIV$"("OBJECT_TYPE_NAME", "NAME")
    TABLESPACE "PORTAL" PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 56K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING;
    CREATE INDEX "PORTAL30"."LDAP_WWSEC_SYSP_PK"
    ON "PORTAL30"."WWSEC_SYS_PRIV$"("ID")
    TABLESPACE "PORTAL" PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 56K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING;
    CREATE INDEX "PORTAL30"."LDAP_WWSEC_SYSP_UK"
    ON "PORTAL30"."WWSEC_SYS_PRIV$"("OBJECT_TYPE_NAME",
    "NAME", "OWNER", "GRANTEE_TYPE", "GRANTEE_GROUP_ID",
    "GRANTEE_USER_ID")
    TABLESPACE "PORTAL" PCTFREE 10 INITRANS 2 MAXTRANS 255
    STORAGE ( INITIAL 32K NEXT 88K MINEXTENTS 1 MAXEXTENTS 4096
    PCTINCREASE 1 FREELISTS 1)
    LOGGING;
    ==================================
    Thanks,
    Erik Hagen
    null

  • Report Using Query

    Hi Gurus,
    In Lead Transaction, Details Tab there is field called Campaign, i req. the table name for that field bec. i have to generate the report using Query?

    Hi Milind,
    Create a new Transport Request.
    Now Go to RSA1->Transport  connections, select your query and drag to the Right hand side.
    Now select all the query elements for that query and click on the Truck (Transport button), It will ask you for the transport Request. Provide the Transport Request Number you have just created.
    Once done, just to be sure, check the Transport requests elements in SE09. Check if all the query elements have been included in the report.
    Now you will be able to modify the query in Query designer. If still not able to, then you must missed some of the query elements. Again check this in Transport Connection.
    Regards,
    Pratap Sone

  • Report painter performance problem...

    I have a client which runs a report group consists of 14 reports... When we  run this program... It takes about 20 minutes to get results... I was assigned to optimize this report...
    This is what I've done so far
    (this is a SAP generated program)...
    1. I've checked the tables that the program are using... (a customized table with more than 20,000 entries and many others)
    2. I've created secondary indexes  to the main customized table with (20,000) entries - It improves the performance a bit(results about 18 minutes)...
    3. I divided the report group by 4... 3 reports each report group... It greatly improves the performance... (but this is not what the client wants)...
    4. I've read an article about report group performance that it is a bug. 
    (sap support recognized the fact that we are dealing with a bug in the sap standard functionality)
    http://it.toolbox.com/blogs/sap-on-db2/sap-report-painter-performance-problem-26000
    Anyone have the same problem as mine?
    Edited by: christopher mancuyas on Sep 8, 2008 9:32 AM
    Edited by: christopher mancuyas on Sep 9, 2008 5:39 AM

    Report painter/Writer always creates a prerformance issue.i never preffred them since i have a option with Zreport
    now you can do only one thing put more checks on selection-screen for filtering the data.i think thats the only way.
    Amit.

  • Error while executing report in query designer

    Dear Folks,
    I am geting following error while executing report in query designer.
    Error:500 E
    an exception raised because of 0analysis pattern.
    Hence,i am unable to execute any report.
    Need help.
    Thanks

    Hi Kitu G,
    I think this is something to do with the bex web 0ANALYSIS* objects not being installed in your BW system.
    I would try and do the following:
    - Goto RSA1 > BI Content > BEx Web Template (BTMP)
    - Then double-click on Select Object.
    - Highlight all objects that start with 0ANALYSIS_PATTERN
    - Click on Transfer Selections, and then Install.
    If you can't do the above in prd, do it in DEV, then transport the objects to prd.
    After all this, try re-running your queries.
    Any questions/clarification just let me know
    Cheers.
    Darwin

  • How do I report a security problem to Firefox?

    Here's the problem: <br />
    Wednesday morning my Mac at home got infected by malware which I believe is usually called the "Google redirect virus". My Mac at home has been upgraded to OSX 10.6.7 and I believe I was using Firefox 3.6.13 (it automatically upgraded tonight). I haven't been able to find any useful information on line about this malware. <br />
    The behavior after infection was that every time I tried to use Google my request would get redirected. If I entered www.google.com in the address bar, the URL would get changed to www.google.com/FuneralHomes/<something> and the browser would try to go there and a "Under Construction" error message or a no-such-page message would be returned. This started happening after I did a Google search and was checking various links in Firefox, but once it started in Firefox I got the same behavior in Safari even without using Safari to look at any links. And it continued to happen in Safari even after I did a "Reset Safari..." <br />
    When I got infected I was using a non-adminstrator account and I was not asked to download anything nor was I prompted for a password. <br />
    I searched on "Google redirect Mac virus" using my (so far) untouched work computer and found several suggestions but no solutions. Apparently this is a PC problem that's been around a few years, but there were some Mac reports from last year. So last night I checked the DNS addresses in my
    Network preferences, looked at /etc/hosts, and removed the only plug-in from the Library:Internet Plug-ins of the infected account, even though it was a Picasa plug-in that predated this infection. None of those seemed to be the problem. I also scanned my disk with an up-to-date "Norton AntiVirus" which
    I got from work some time ago, but it found no viruses. <br />
    What really puzzles me is that the problem gradually went away while I was checking it last night. At first, when I entered www.google.com the browser would still show the redirected address in the prompt that comes up and it had the Legacy.com logo on the left instead of the Google one but it would actually go to the Google website (unless I'm being spoofed). Then at a later attempt, only the wrong logo persisted. Then at an even later attempt the logo got fixed and everything looked fine and appeared to behave correctly. <br />
    Frankly, that's a little scary. It's as if a really smart trojan got
    installed and was covering its tracks while it set up a man-in-the-middle attack (please advise if I'm misusing the jargon). If I'm being too paranoid, great, but I'd still like to know how such behavior could be induced on my machine just by linking to a website. Can anyone help?
    ''moderator- fixed the leading space formatting errors in this posting''

    Thanks, the-edmeister, but the only relevant post I found was from GB Colburn on bleepingcomputer.com, wherein he reported a similar problem about a year ago. I've found a few similar threads in the last year or so (by searching "Google redirect mac virus" in Google) but they are all about the same: someone reports the problem, responders have various random suggestions, the problem seems to go away by itself (at least sometimes), and there's nothing conclusive either good or bad.
    Without myself being as knowledgeable as GB Colburn, it doesn't look to me like the problem is in the DNS system or the router. It acts more like some malware in the automatic completion in the address bar of the browser or maybe in the history system, but I can't figure out how an infection in one browser could affect another browser. And I *really* can't figure out how it could be self-healing.
    It's really frustrating that none of the major parties involved in this—Firefox, Google, Safari (Apple), Verizon (my internet provider)—even have a process for reporting a security issue. At least not one that I, an ordinary semi-naive user, can find.

  • Combine two reports in query designer using key figure with sap exit

    Hi experts,
    i want to combine two reports in query designer using key figure with sap exit
    in the report 1 key figure calculation based on the open on key date(0P_DATE_OPEN)
    to calculate due and not due in two columns
    in report 2 key figure calculate in the time zones using given in variable Grid Width (0DPM_BV0) like due in 1 to 30 days, 31 to 60 days...the due amount based on the open on key date(0P_DATE_OPEN)
    to calculate in 1-30, 31-60, 61-90, 91-120, 121-150 and >150 days in 6 columns
    now i have requirement like this
    not due, 1-30, 31-60, >60, due,1-30, 31-60, >60 in 8 columns
    or
    not due, due, 1-30, 31-60, 61-90, 91-120, 121-150 and >150 in 8 col
    thank you

    Hi Dirk,
    you perhaps know my requirement,
    for the management to make used in one report,
    we have in reporting finacials Ehp3.
    Vendor Due Date Analysis - which show due, not due
    Vendor Overdue Analysis - show only due and analysis in time grid frame
    i want to combine in one report that show NOT DUE, DUE, DUE time frames in grid.
    krish...

Maybe you are looking for