Query Causes ASP Error

This query works great within MS Access itself but causes and
error when used in an ASP application ...
DateAdd("m",-2,EndDate()) >= Date()
Someone suggested there is a problem with the quote marks in
ASP. Would appreciate any help to resolve this. The original thread
is below. Thanks.
Newsgroup User has posted a message entitled Re: EndDate.
Message Posted on: Monday January 22,2007 05:01:27 PM
You use a DateAdd function to get this, something like
DateAdd("m",-2,EndDate()) >= Date()
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"Tiggerick" <[email protected]> wrote in
message
news:ep2nej$oar$[email protected]..
> Our current function is ... EndDate() >= Date() ...
which is used to
> screen out
> any results prior to today's date.
> We would like to modify this so that instead of today's
date we would use
> the
> date 2 months prior to today's date, so that, for
example the EndDate() on
> 1/22/07 would be 11/22/06.
> Would appreciate help on the format for this.
> Thanks in advance!
> Rick
>
You can view the message at
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=189&threadid=1235135&fo rumid=12.
Text
quote marks
Text

The quotes around m are the problem here. Double them up to
send as-is to
Access (""m"" instead of "m").
"Tiggerick" <[email protected]> wrote in
message
news:er00oi$duu$[email protected]..
> Here is the complete SQL statement that is causing a
problem. Dreamweaver
> is
> showing the m inside the quotes in black if that means
anything ...
>
> Recordset1.Source = "SELECT * FROM Events WHERE
EventType = '" +
> Replace(Recordset1__MMColParam, "'", "''") + "' AND
EndDate >=
> DateAdd("m", -2,
> Date()) ORDER BY StartDate ASC"
>

Similar Messages

  • Derby db named query causes parse error when using derby db MONTH function

    Hi all!
    I'm trying to create an application using the persistance api and beans binding. I have created my database and entity classes.
    My problem is creating a named query that uses some of the functionality from the derby database (which is embedded in the application).
    I have a named query:
    @NamedQuery(name = "Vehicles.findbymotmonth", query = "SELECT v FROM Vehicles v WHERE MONTH(v.lastmotdate) = :monthnumber") The actual query works fine when I send it directly to the db (with the parameter filled in) but causes an exception when used as a named query:
    Local Exception Stack:
    Exception [TOPLINK-8025] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.EJBQLException
    Exception Description: Syntax error parsing the query [Vehicles.findbymotmonth: SELECT v FROM Vehicles v WHERE MONTH(v.lastmotdate) = :monthnumber], line 1, column 32: unexpected token [MONTH].
    Internal Exception: line 1:32: unexpected token: MONTH
            at oracle.toplink.essentials.exceptions.EJBQLException.unexpectedToken(EJBQLException.java:389)
    ... I've tried looking for solutions online but it seems evryone just writes up the original java db application example provided by sun and no one has tried doing more than "select c from customers c".
    I'm using the netbeans ide (6.5).
    Please tell me there is a simple solution to this and the persistance API can handle complex queries!
    Thanks in advance.

    one solution: assume the toplink library to be so full of bugs as to be unusable and switch to the hibernate persistance manager where it works fine.
    Edited by: pointer2null on Feb 17, 2009 11:02 AM

  • Parameter form works on web but submit query causes url error

    we have been able to both run the report on the web server with parameters preincluded and run a parameter form by itself. The question is how do you run a report with a parameter form on the web in which you enter the parameters and then submit the query without it giving you a cannot find url error?
    Any help is greatly appreciated

    These values are not stored in any file. Reports server will replace action and hidden with the actual values while generating parameter form. You can see the source of html parameter form generated to understand these.
    For your scheduling requirement one very simple solution would be to create a user parameter with name 'SCHEDULE' and map a field in the pform to the 'SCHEDULE' user parameter.
    You can also use a hidden field by name 'SCHEDULE' and set the value using javascript when button is clicked.

  • The query against the database caused an error in https: site

    Hi
    I have created a new Data source and External content type in sharePoint 2013
    I have also given all the permission to this Content type (including "Users(Windows)")
    I also having edit permission in the Sql-database.
    I have tied almost all the possibilities given in the net for this error.
    still the error("the query against the database caused an error") is there.
    Is this because of "https:/ " in the url?
    Can any one give a suggestion / solution for this?
    Thanks
    S H A J A N

    Hi,
    Can you please check ULS Log as well as event viewer, to see if there's any related error reported?
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • A view, function and TO_DATE causing an error.

    I have the following statement which calls a view, VW_DIST_RPT_WORK_LIST which in turn calls a function which returns either 'Null' or a date string e.g. '07 Oct 2003' as a VARCHAR2 (alias PROJECTED_DELIVERY_DATE).
    Statement:
    SELECT CUSTOMER_NAME, PROTOCOL_REFERENCE, SHIPPING_REFERENCE, CUSTOMER_REFERENCE, COUNTRY, PROJECTED_DELIVERY_DATE, STATUS, NOTES,
    TO_DATE(PROJECTED_DELIVERY_DATE)
    FROM VW_DIST_RPT_WORK_LIST
    WHERE EXPECTED_DESP_DT IS NOT NULL
    AND UPPER(PROJECTED_DELIVERY_DATE) NOT LIKE('NULL%')
    AND EXPECTED_DESP_DT <= TO_DATE('07/10/2003', 'DD/MM/YYYY')
    AND TO_DATE(PROJECTED_DELIVERY_DATE) <= TO_DATE('31/12/2003', 'DD/MM/YYYY') --< Problem here
    I need to be able to specify a date filter on the PROJECTED_DELIVERY_DATE field and hence used the TO_DATE(PROJECTED_DELIVERY_DATE) <= TO_DATE('31/12/2003', 'DD/MM/YYYY') but this is generating an ORA-01858: a non-numeric character was found where a numeric character was expected.
    I think the problem lies with the fact that this field can contain 'Null' which cannot be converted to a date using TO_DATE. I've tried adding a NOT LIKE ('NULL%') statement to catch any nulls which may be creeping in bu this doesn't solve the problem.
    I've added TO_DATE(PROJECTED_DELIVERY_DATE) to the select above to determine if the nulls are being caught and if the TO_DATE in performing the conversion correctly which it is on both counts.
    Any ideas anyone ?

    The answer provided above by Monika will work for this situation. However, you should seriously think whether you should be using a string for date datatype. Ideally, you should rewrite the function that returns PROJECTED_DELIVERY_DATE and change the return type to DATE. The least you should do is to return NULL (instead of the string 'NULL') from the function. Oracle handles nulls perfectly, there is no reason you should write code to handle nulls;
    One more thing. Looking at the type of error you are receiving, it seems that you are using rule based optimizer. Why do I think so? Because, in rule based optimizer, the conditions are evaluated in a specific order (viz, bottoms-up for AND clauses). To show this, look at the following simple demonstration. I did this in Oracle 8.1.6 (also in 9.2.0.4.0 on Windows).
    -- Check the database version
    select * from v$version;
    BANNER
    Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production
    PL/SQL Release 8.1.6.1.0 - Production
    CORE 8.1.6.0.0 Production
    TNS for Solaris: Version 8.1.6.0.0 - Production
    NLSRTL Version 3.4.0.0.0 - Production
    -- Create the test table
    create table test (a number(2));
    insert into test(a) values (0);
    insert into test(a) values (1);
    insert into test(a) values (2);
    insert into test(a) values (3);
    insert into test(a) values (4);
    insert into test(a) values (5);
    insert into test(a) values (6);
    insert into test(a) values (7);
    commit;
    -- See that I have not analyzed the table. This will make use of RULE based optimizer
    select * from test
    where a > 0
    and 1/a < .25;
    and 1/a < .25
    ERROR at line 3:
    ORA-01476: divisor is equal to zero
    -- Look at the query clause. Even though I specifically asked for records where a is positive
    -- the evaluation path of rule based optimizer started at the bottom and as it evaluated the
    -- first row with a=0, and caused an error.
    -- Now look at the query below. I just re-arranged the conditions so that a > 0 is evaluated
    -- first. As a result, the row with a=0 is ignored and the query executes without any problem.
    select * from test
    where 1/a < .25
    and a > 0;
    A
    5
    6
    7
    -- Now I analyze the table to create statistics. This will make the query use the
    -- cost based optimizer (since optimizer goal is set to CHOOSE)
    analyze table test compute statistics;
    Table analyzed.
    -- Now I issue the erring query. See it executes without any problem. This indicates that
    -- the cost based optimizer was intelligent enough to evaluate the proper path instead of
    -- looking only at the syntax.
    select * from test
    where a > 0
    and 1/a < .25;
    A
    5
    6
    7
    Does the above example seem familiar to your case? Even though you had the AND UPPER(PROJECTED_DELIVERY_DATE) NOT LIKE('NULL%') in your query, a record with PROJECTED_DELIVERY_DATE = 'NULL' was evaluated first and that caused the error.
    Summary
    1. Use dates for dates and strings for strings
    2. Use cost based optimizer
    Thanks
    Suman

  • Content presenter: content source based on a query resulting in error

    Hi all,
    I am using a content presenter taskflow showing content based on a query. After some changes were made to the Webcenter Content instance (extra metadata field, extra profiles) the query is resulting in an error. In my WC_Spaces log I see the following message:
    Caused By: oracle.webcenter.content.integration.RepositoryException: Jun 13, 2012 11:15:11 AM oracle.webcenter.content.integration.spi.ucm.search.SearchService search
    SEVERE: An error occurred when searching repository WebCenterSpaces-UCM. When calling service GET_SEARCH_RESULTS, as user weblogic, at timestamp 6/13/12 11:15 AM, received status code -32. The search was Search[repositoryId=WebCenterSpaces-UCM, max to return=100, useFullTextSearch=true, useCache=true, sort="toProperty('dDocTitle') ASC", fullText="
            Metadata criteria((cm_contentType equals IDC:Profile:qblIntranetArtikel)AND(xqblGroep [any] equals Quobell)AND(xqblIntranetSubGroep [any] equals Opleidingen))
    isOr=false"] and the parameter map was {ResultCount=51, FolderPathInSearchResults=1, SortField=dDocTitle, IdcService=GET_SEARCH_RESULTS, SortOrder=ASC, vcrAppendObjectClassInfo=1, StartRow=1, QueryText=(xqblGroep <matches> `Quobell`) <AND> (xqblIntranetSubGroep <matches> `Opleidingen`), vcrContentType=IDC:Profile:qblIntranetArtikel}.
    The profile qblIntranetArtikel I am using already existed before the change were made and the query worked fine then.
    In WCC I see the following error:
    (internal)/6     06.13 11:15:10.272     IdcServer-551     -1 exception backtrace:java.lang.ArrayIndexOutOfBoundsException: -1(internal)/6     06.13 11:15:10.272     IdcServer-551     at java.util.Vector.get(Vector.java:696)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at intradoc.data.DataResultSet.getStringValue(DataResultSet.java:2183)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at collections.CollectionFilters.doFilter(CollectionFilters.java:95)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at intradoc.shared.PluginFilters.filterWithAction(PluginFilters.java:115)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at intradoc.shared.PluginFilters.filter(PluginFilters.java:68)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at intradoc.server.Service.executeFilter(Service.java:4095)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at intradoc.server.SearchService.doResponse(SearchService.java:2081)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:802)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at intradoc.server.Service.doRequest(Service.java:1956)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at intradoc.server.ServiceManager.processCommand(ServiceManager.java:437)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    (internal)/6     06.13 11:15:10.272     IdcServer-551     at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    services/3     06.13 11:15:10.274     IdcServer-551     !csUserEventMessage,weblogic,CIS!csSystemCodeExecutionError java.lang.ArrayIndexOutOfBoundsException: -1services/3     06.13 11:15:10.274     IdcServer-551     at java.util.Vector.get(Vector.java:696)
    services/3     06.13 11:15:10.274     IdcServer-551     at intradoc.data.DataResultSet.getStringValue(DataResultSet.java:2183)
    services/3     06.13 11:15:10.274     IdcServer-551     at collections.CollectionFilters.doFilter(CollectionFilters.java:95)
    services/3     06.13 11:15:10.274     IdcServer-551     at intradoc.shared.PluginFilters.filterWithAction(PluginFilters.java:115)
    services/3     06.13 11:15:10.274     IdcServer-551     at intradoc.shared.PluginFilters.filter(PluginFilters.java:68)
    services/3     06.13 11:15:10.274     IdcServer-551     at intradoc.server.Service.executeFilter(Service.java:4095)
    services/3     06.13 11:15:10.274     IdcServer-551     at intradoc.server.SearchService.doResponse(SearchService.java:2081)
    services/3     06.13 11:15:10.274     IdcServer-551     at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:802)
    services/3     06.13 11:15:10.274     IdcServer-551     at intradoc.server.Service.doRequest(Service.java:1956)
    services/3     06.13 11:15:10.274     IdcServer-551     at intradoc.server.ServiceManager.processCommand(ServiceManager.java:437)
    services/3     06.13 11:15:10.274     IdcServer-551     at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
    services/3     06.13 11:15:10.274     IdcServer-551     at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
    services/3     06.13 11:15:10.274     IdcServer-551     at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
    services/3     06.13 11:15:10.274     IdcServer-551     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    services/3     06.13 11:15:10.274     IdcServer-551     at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    When I select a single item to be shown in the content presenter taskflow, I works fine. It also works fine when showing all documents in a folder.
    Does any body have an idea what might be the problem I am facing and how to fix it?
    thanks in advance,
    Harold

    Hi all,
    I found what caused the error. Someone had set the CollectionID metadata field in WCC to non-searchable. This resulted in an error in the CollectionsFilter.
    Setting the field back to searchable in WCC solved the problem.
    regards,
    Harold

  • Discoverer 4i: GL Query caused no data to be received

    Hi,
    E-Business 11.5.10.2 on Windows Server 2003 SP2
    Discoverer 4i
    I've set up Discoverer 4i and am currently using Discoverer Desktop to query the business areas. I can retrieve data from any business area apart from GL.
    When I attempt to query GL I get an error message stating 'Query caused no data to be received'.
    Has anyone encountered this before? Any help greatly appreciated.
    Thanks,
    Mark

    Hi,
    It could be that these GL folders use row level security and the gl_security_pkg is not initialized.
    Try creating a custom folder containing:
    select gl_security_pkg.login_sob_id from dualLog in with the UK GL User responsibility and create a workbook based on this custom folder. If this returns a null row then the GL package is not properly initialized. Check that the "GL Set of Books ID" system profile is set for the responsibility. You can initilalize the package manually by adding the following text into the the "Initialization SQL Statement - Custom" system profile for the responsibility:
    begin
    gl_security_pkg.init;
    end;Hope that helps,
    Rod West

  • FRM 40350: Query Caused no records to be retrieved in INVTVTXN

    Dear All,
    When Trying to View the Material Distributions for the Transaction Type Sales Order Issue. I am unable to get the accounting entries for the Transaction. On selecting the form the error shows :
    FRM 40350: Query Caused no records to be retrieved
    Please help
    Thanks
    Dinesh

    Ensure that the cost manager is running (Inventory -> Setup -> Transactions -> InterfaceManager )...and ensure that you are giving the correct date range.
    normally you should be able to see distributions as Inv valuation Cr and Deferred Cost of Goods Sold Dr ...
    Some times Cost Manager shows as Active but it does not process transaction records, take help from your system administrator/ DBA to get cost manager restarted.
    Thanks,
    Hrishikesh

  • FRM-40350: Query caused no records to be retrieved

    hi
    apps--12.0.6 os--IBM AIX on POWER Systems (64-bit)
    When trying to find service request (e.g. 33599) throws a FORMS note: “FRM-40350: Query caused no records to be retrieved”. This is happening in FORMS.
    Regards

    When trying to find service request (e.g. 33599) throws a FORMS note: “FRM-40350: Query caused no records to be retrieved”. This is happening in FORMS.Some Service Requests Are Not Accessable - Error FRM-40350 [ID 602803.1]
    Service Requests Cannot Be Retrieved When Using Folders - Error FRM-40350 [ID 744321.1]
    How To Research An Item That Errors FRM-40350 And Cannot Be Queried In The Master Or Organization Items Form [ID 413104.1
    Unable To Access Upgraded Service Request In the CSXSRISR Form [ID 462543.1]
    R12: Cost Management Drilldown Throws ORA-01403: No data found [ID 782062.1]
    FRM-92100 Error in The Workbench Tab After Find For A Service Request [ID 458115.1]
    "Frm-40301: Query Caused No Records To Be Retrieved. Re-Enter" While Querying Some SRs In Create Service Request Form [ID 1324909.1]
    Thanks,
    Hussein

  • Query engine failed error for crytal report refreshing to new params in jsp

    Using licensed weblogic 8.1 server in production mode. Weblogic workhsop has inetegrated supprot for crystal reports 9. Using standalone report & accessing sql server through odbc, i got result for different parameters passed.
              Problem Area : Passing parameter to have specific report causes unexpected query engine failed error in com.crystaldecisions.report.web.viewer.CrystalViewer class. If viewer.refresh method is commented, then static (already saved) report is displayed through jsp. But using viewer.refresh method for dynamic report genertaion for new parameters through jsp gives above error.

    Hello
              I'm experiencing the same problem. Please let me know if you've any solution.

  • HTTP 500.100 - ASP error

    I have followed detailed instructions on passing a login name
    as a session varible and using to query a recordset but I get this
    error, If you login incorrectly it takes you to another page which
    works sometimes but it also errors on and off for no reason.
    HTTP 500.100 - Internal Server Error - ASP error
    Internet Information Services
    Technical Information (for support personnel)
    Error Type:
    Provider (0x80004005)
    Unspecified error
    /vma07build/Login.asp, line 17
    Many thanks

    Are you using a DSN or DSN-Less connection?. If the former
    that you could
    try deleting the DSN and readding it, which sometimes fixes
    this issue.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "ipicus" <[email protected]> wrote in
    message
    news:fah85m$msf$[email protected]..
    >I have followed detailed instructions on passing a login
    name as a session
    > varible and using to query a recordset but I get this
    error, If you login
    > incorrectly it takes you to another page which works
    sometimes but it also
    > errors on and off for no reason.
    >
    > HTTP 500.100 - Internal Server Error - ASP error
    > Internet Information Services
    >
    > Technical Information (for support personnel)
    >
    > Error Type:
    > Provider (0x80004005)
    > Unspecified error
    > /vma07build/Login.asp, line 17
    >
    > Many thanks
    >
    >
    >

  • XML select query causing very high CPU usage.

    Hi All,
    In our Oracle 10.2.0.4 Two node RAC we are facing very high CPU usage....and all of the top CPU consuming processes are executing this below sql...also these statements are waiting for some gc wiat events as shown below.
    SELECT B.PACKET_ID FROM CM_PACKET_ALT_KEY B, CM_ALT_KEY_TYPE C, TABLE(XMLSEQUENCE ( EXTRACT (:B1 , '/AlternateKeys/AlternateKey') )) T
    WHERE B.ALT_KEY_TYPE_ID = C.ALT_KEY_TYPE_ID AND C.ALT_KEY_TYPE_NAME = EXTRACTVALUE (VALUE (T), '/AlternateKey/@keyType')
    AND B.ALT_KEY_VALUE = EXTRACTVALUE (VALUE (T), '/AlternateKey')
    AND NVL (B.CHILD_BROKER_CODE, '6209870F57C254D6E04400306E4A78B0') =
    NVL (EXTRACTVALUE (VALUE (T), '/AlternateKey/@broker'), '6209870F57C254D6E04400306E4A78B0')
    SQL> select sid,event,state from gv$session where state='WAITING' and event not like '%SQL*Net%';
           SID EVENT                                                            STATE
            66 jobq slave wait                                                  WAITING
           124 gc buffer busy                                                   WAITING
           143 gc buffer busy                                                   WAITING
           147 db file sequential read                                          WAITING
           222 Streams AQ: qmn slave idle wait                                  WAITING
           266 gc buffer busy                                                   WAITING
           280 gc buffer busy                                                   WAITING
           314 gc cr request                                                    WAITING
           317 gc buffer busy                                                   WAITING
           392 gc buffer busy                                                   WAITING
           428 gc buffer busy                                                   WAITING
           471 gc buffer busy                                                   WAITING
           518 Streams AQ: waiting for time management or cleanup tasks         WAITING
           524 Streams AQ: qmn coordinator idle wait                            WAITING
           527 rdbms ipc message                                                WAITING
           528 rdbms ipc message                                                WAITING
           532 rdbms ipc message                                                WAITING
           537 rdbms ipc message                                                WAITING
           538 rdbms ipc message                                                WAITING
           539 rdbms ipc message                                                WAITING
           540 rdbms ipc message                                                WAITING
           541 smon timer                                                       WAITING
           542 rdbms ipc message                                                WAITING
           543 rdbms ipc message                                                WAITING
           544 rdbms ipc message                                                WAITING
           545 rdbms ipc message                                                WAITING
           546 rdbms ipc message                                                WAITING
           547 gcs remote message                                               WAITING
           548 gcs remote message                                               WAITING
           549 gcs remote message                                               WAITING
           550 gcs remote message                                               WAITING
           551 ges remote message                                               WAITING
           552 rdbms ipc message                                                WAITING
           553 rdbms ipc message                                                WAITING
           554 DIAG idle wait                                                   WAITING
           555 pmon timer                                                       WAITING
            79 jobq slave wait                                                  WAITING
           117 gc buffer busy                                                   WAITING
           163 PX Deq: Execute Reply                                            WAITING
           205 db file parallel read                                            WAITING
           247 gc current request                                               WAITING
           279 jobq slave wait                                                  WAITING
           319 LNS ASYNC end of log                                             WAITING
           343 jobq slave wait                                                  WAITING
           348 direct path read                                                 WAITING
           372 db file scattered read                                           WAITING
           475 jobq slave wait                                                  WAITING
           494 gc cr request                                                    WAITING
           516 Streams AQ: qmn slave idle wait                                  WAITING
           518 Streams AQ: waiting for time management or cleanup tasks         WAITING
           523 Streams AQ: qmn coordinator idle wait                            WAITING
           528 rdbms ipc message                                                WAITING
           529 rdbms ipc message                                                WAITING
           530 Streams AQ: waiting for messages in the queue                    WAITING
           532 rdbms ipc message                                                WAITING
           537 rdbms ipc message                                                WAITING
           538 rdbms ipc message                                                WAITING
           539 rdbms ipc message                                                WAITING
           540 rdbms ipc message                                                WAITING
           541 smon timer                                                       WAITING
           542 rdbms ipc message                                                WAITING
           543 rdbms ipc message                                                WAITING
           544 rdbms ipc message                                                WAITING
           545 rdbms ipc message                                                WAITING
           546 rdbms ipc message                                                WAITING
           547 gcs remote message                                               WAITING
           548 gcs remote message                                               WAITING
           549 gcs remote message                                               WAITING
           550 gcs remote message                                               WAITING
           551 ges remote message                                               WAITING
           552 rdbms ipc message                                                WAITING
           553 rdbms ipc message                                                WAITING
           554 DIAG idle wait                                                   WAITING
           555 pmon timer                                                       WAITINGI am not at all able to understand what this SQL is...i think its related to some XML datatype.
    Also not able to generate execution plan for this sql using explain plan- getting error(ORA-00932: inconsistent datatypes: expected - got -)
    Please help me in this issue...
    How can i generate execution plan?
    Does this type of XML based query will cause high GC wiat events and buffer busy wait events?
    How can i tune this query?
    How can i find that this is the only query causing High CPU usage?
    Our servers are having 64 GB RAM and 16 CPU's..
    OS is Solaris 5.10 with UDP as protocol for interconnect..
    -Yasser

    I found some more xml queries as shown below.
    SELECT XMLELEMENT("Resource", XMLATTRIBUTES(RAWTOHEX(RMR.RESOURCE_ID) AS "resourceID", RMO.OWNER_CODE AS "ownerCode", RMR.MIME_TYPE AS "mimeType",RMR.FILE_SIZE AS "fileSize", RMR.RESOURCE_STATUS AS "status"), (SELECT XMLAGG(XMLELEMENT("ResourceLocation", XMLATTRIBUTES(RAWTOHEX(RMRP.REPOSITORY_ID) AS "repositoryID", RAWTOHEX(DIRECTORY_ID) AS "directoryID", RESOURCE_STATE AS "state", RMRO.RETRIEVAL_SEQ AS "sequence"), XMLFOREST(FULL_PATH AS "RemotePath"))ORDER BY RMRO.RETRIEVAL_SEQ) FROM RM_RESOURCE_PATH RMRP, RM_RETRIEVAL_ORDER RMRO, RM_LOCATION RML WHERE RMRP.RESOURCE_ID = RMR.RESOURCE_ID AND RMRP.REPOSITORY_ID = RMRO.REPOSITORY_ID AND RMRO.LOCATION_ID = RML.LOCATION_ID AND RML.LOCATION_CODE = :B2 ) AS "Locations") FROM RM_RESOURCE RMR, RM_OWNER RMO WHERE RMR.OWNER_ID = RMO.OWNER_ID AND RMR.RESOURCE_ID = HEXTORAW(:B1 )
    SELECT XMLELEMENT ( "Resources", XMLAGG(XMLELEMENT ( "Resource", XMLATTRIBUTES (B.RESOURCE_ID AS "id"), XMLELEMENT ("ContentType", C.CONTENT_TYPE_CODE), XMLELEMENT ("TextExtractStatus", B.TEXT_EXTRACTED_STATUS), XMLELEMENT ("MimeType", B.MIME_TYPE), XMLELEMENT ("NumberPages", TO_CHAR (B.NUM_PAGES)), XMLELEMENT ("FileSize", TO_CHAR (B.FILE_SIZE)), XMLELEMENT ("Status", B.STATUS), XMLELEMENT ("ContentFormat", D.CONTENT_FORMAT_CODE), G.ALTKEY )) ) FROM CM_PACKET A, CM_RESOURCE B, CM_REF_CONTENT_TYPE C, CM_REF_CONTENT_FORMAT D, ( SELECT XMLELEMENT ( "AlternateKeys", XMLAGG(XMLELEMENT ( "AlternateKey", XMLATTRIBUTES ( H.ALT_KEY_TYPE_NAME AS "keyType", E.CHILD_BROKER_CODE AS "broker", E.VERSION AS "version" ), E.ALT_KEY_VALUE )) ) ALTKEY, E.RESOURCE_ID RES_ID FROM CM_RESOURCE_ALT_KEY E, CM_RESOURCE F, CM_ALT_KEY_TYPE H WHERE E.RESOURCE_ID = F.RESOURCE_ID(+) AND F.PACKET_ID = HEXTORAW (:B1 ) AN
    D E.ALT_KEY_TYPE_ID = H.ALT_KEY_TYPE_ID GROUP BY E.RESOURCE_ID) G WHERE A.PACKET_ID = HEXTORAW (:B1
    SELECT XMLELEMENT ("Tagging", XMLAGG (GROUPEDCAT)) FROM ( SELECT XMLELEMENT ( "TaggingCategory", XMLATTRIBUTES (CATEGORY1 AS "categoryType"), XMLAGG (LISTVALUES) ) GROUPEDCAT FROM (SELECT EXTRACTVALUE ( VALUE (T), '/TaggingCategory/@categoryType' ) CATEGORY1, XMLCONCAT(EXTRACT ( VALUE (T), '/TaggingCategory/TaggingValue' )) LISTVALUES FROM TABLE(XMLSEQUENCE(EXTRACT ( :B1 , '/Tagging/TaggingCategory' ))) T) GROUP BY CATEGORY1)
    SELECT XMLCONCAT ( :B2 , DI_CONTENT_PKG.GET_ENUM_TAGGING_FN (:B1 ) ) FROM DUAL
    SELECT XMLCONCAT (:B2 , :B1 ) FROM DUAL
    SELECT * FROM EQ_RAW_TAG_ERROR A WHERE TAG_LIST_ID = :B2 AND EXTRACTVALUE (A.RAW_TAG_XML, '/TaggingValues/TaggingValue/Value' ) = :B1 AND A.STATUS = '
    NR'
    SELECT RAWTOHEX (S.PACKET_ID) AS PACKET_ID, PS.PACKET_STATUS_DESC, S.LAST_UPDATE AS LAST_UPDATE, S.USER_ID, S.USER_COMMENT, MAX (T.ALT_KEY_VALUE) AS ALTKEY, 'Y' AS IS_PACKET FROM EQ_PACKET S, CM_PACKET_ALT_KEY T, CM_REF_PACKET_STATUS PS WHERE S.STATUS_ID = PS.PACKET_STATUS_ID AND S.PACKET_ID = T.PACKET_ID AND NOT EXISTS (SELECT 1 FROM CM_RESOURCE RES WHERE RES.PACKET_ID = S.PACKET_ID AND EXISTS (SELECT 1 FROM CM_REF_CONTENT_FORMAT CF WHERE CF.CONTENT_FORMAT_ID = RES.CONTENT_FORMAT AND CF.CONTENT_FORMAT_CODE = 'I_FILE')) GROUP BY RAWTOHEX (S.PACKET_ID), PS.PACKET_STATUS_DESC, S.LAST_UPDATE, S.USER_ID, S.USER_COMMENT UNION SELECT RAWTOHEX (A.FATAL_ERROR_ID) AS PACKET_ID, C.PACKET_STATUS_DESC, A.OCCURRENCE_DATE AS LAST_UPDATE, '' AS USER_ID, '' AS USER_COMMENT, RAWTOHEX (A.FATAL_ERROR_ID) AS ALTKEY, 'N' AS IS_PACKET FROM EQ_FATAL_ERROR A, EQ_ERROR_MSG B, CM_REF_PACKET_STATUS C, EQ_SEVERITYD WHERE A.PACKET_ID IS NULL AND A.STATUS = 'NR' AND A.ERROR_MSG_ID = B.ERROR_MSG_ID AND B.SEVERITY_I
    SELECT /*+ INDEX(e) INDEX(a) INDEX(c)*/ XMLAGG(XMLELEMENT ( "TaggingCategory", XMLATTRIBUTES ( G.TAG_CATEGORY_CODE AS "categoryType" ), XMLELEMENT ("TaggingValue", XMLATTRIBUTES (C.IS_PRIMARY AS "primary", H.ORIGIN_CODE AS "origin"), XMLAGG(XMLELEMENT ( "Value", XMLATTRIBUTES ( F.TAG_LIST_CODE AS "listType" ), E.TAG_VALUE )) ) )) FROM TABLE (CAST (:B1 AS T_TAG_MAP_HIERARCHY_TAB)) A, TABLE (CAST (:B2 AS T_ENUM_TAG_TAB)) C, REM_TAG_VALUE E, REM_TAG_LIST F, REM_TAG_CATEGORY G, CM_ORIGIN H WHERE E.TAG_VALUE_ID = C.TAG_VALUE_ID AND F.TAG_LIST_ID = E.TAG_LIST_ID AND G.TAGGING_CATEGORY_ID = F.TAGGING_CATEGORY_ID AND H.ORIGIN_ID = C.ORIGIN_ID AND C.ENUM_TAG_ID = A.MAPPED_ENUM_TAG_ID GROUP BY C.IS_PRIMARY, H.ORIGIN_CODE, G.TAG_CATEGORY_CODE START WITH A.MAPPED_ENUM_TAG_ID = HEXTORAW (:B3 ) CONNECT BY PRIOR A.MAPPED_ENUM_TAG_ID = A.ENUM_TAG_ID
    SELECT /*+  INDEX(e) */ XMLAGG(XMLELEMENT ( "TaggingCategory", XMLATTRIBUTES ( G.TAG_CATEGORY_CODE AS "categoryType" ), XMLELEMENT ( "TaggingValue", XMLATTRIBUTES (C.IS_PRIMARY AS "primary", H.ORIGIN_CODE AS "origin"), XMLAGG(XMLCONCAT ( XMLELEMENT ( "Value", XMLATTRIBUTES ( F.TAG_LIST_CODE AS "listType" ), E.TAG_VALUE ), CASE WHEN LEVEL = 1 THEN :B4 ELSE NULL END )) ) )) FROM TABLE (CAST (:B1 AS T_TAG_MAP_HIERARCHY_TAB)) A, TABLE (CAST (:B2 AS T_ENUM_TAG_TAB)) C, REM_TAG_VALUE E, REM_TAG_LIST F, REM_TAG_CATEGORY G, CM_ORIGIN H WHERE E.TAG_VALUE_ID = C.TAG_VALUE_ID AND F.TAG_LIST_ID = E.TAG_LIST_ID AND G.TAGGING_CATEGORY_ID = F.TAGGING_CATEGORY_ID AND H.ORIGIN_ID = C.ORIGIN_ID AND C.ENUM_TAG_ID = A.MAPPED_ENUM_TAG_ID GROUP BY G.TAG_CATEGORY_CODE, C.IS_PRIMARY, H.ORIGIN_CODE START WITH A.MAPPED_ENUM_TAG_ID = HEXTORAW (:B3 ) CONNECT BY PRIOR A.MAPPED_ENUM_TAG_ID = A.ENUM_TAG_IDBy observing above sql queries i found some hints forcing for index usage..
    I think xml schema is created already...and its progressing as you stated above. Please correct if i am wrong.
    I found all these sql from AWR report and all of these are very high resource consuming queries.
    And i am really sorry if i am irritating you by asking all stupid questions related to xml.
    -Yasser
    Edited by: YasserRACDBA on Nov 17, 2009 3:39 PM
    Did syntax allignment.

  • Query 0: Runtime error There is already a line with the same key. with para

    Dear all,
    I have a query with several variables. One of the variables is Version. When I use certain values e.g. 1,2 or 3, I can generate the query without any problem. However, when I use the other values e,g, 4, 5, or 6, the query gives me with the following error messages :
    1. Query 0: Runtime error There is already a line with the same key. with parallel processing via RFC
    2. Error while reading data; navigation is possible
    3. >> Row: 174 Inc: LRSDRPU02 Prog: SAPLRSDRP
    Error 1
    Query 0: Runtime error There is already a line with the same key. with parallel processing via RFC
    Message no. DBMAN428
    Error 2
    Error while reading data; navigation is possible
    Message no. BRAIN289
    Diagnosis
    An error occurred while reading the data. The query result is therefore empty or inconsistent and is not buffered in the OLAP cache.
    Procedure
    You can continue to navigate or return to the last navigation step.
    Error 3
    >> Row: 174 Inc: LRSDRPU02 Prog: SAPLRSDRP
    Message no. RS_EXCEPTION301
    Diagnosis
    En error has been triggered. This message specifies where in the coding the error occurred. This helps you to localize the error quickly.
    May I know what causes this error and how to troubleshoot it?
    Thank you.

    Venkat,
    You are either a genius or working for SAP.
    In any case, your solution solved my problem.
    Thanks heaps!

  • I am trying to install current Firefox 3.6, as I am currently running an older Firefox on my Windows ME, but I keep getting this error message: "Setup has caused an error in SETUP.EXE Setup will now close."--Please help?

    I have downloaded all IP changer Privacy software I have purchased and am trying to install it, and although it is made to work with WindowsME that I am currently using on my computer, it now says it requires Firefox 3 or above to be able to install the software. Therefore, I am trying to update my Firefox to current 3.6 but once Firefox 3.6 downloads it doesn't install. Instead I just keep getting the same error message: Setup has caused an error in SETUP.EXE. Set up will now close. Several times, I have also tried restarting the computer as the error message also recommended But I just still keep getting the same error message when I try to update/install Firefox 3.5. Please help/advise on how I can fix this problem. Many thanks in advance!

    Firefox 2.0.0.20 is the last ever version of Firefox for Win98 / SE / ME.
    You can get it from here, but you are better off using K-Meleon (derived from Firefox) or Opera instead an old version of Firefox:
    [ftp://ftp.mozilla.org/pub/firefox/releases/2.0.0.20/win32/en-US/]
    You can try KernelEx to get Firefox 3+ to work, but it would be very slow with an old PC of less than 750Mhz. 3.5 and later supposedly doesn't work.
    http://sourceforge.net/projects/kernelex/

  • Using NVL in Query of Query resulting in error

    I'm still using CF8 and Oracle 11G back-end.
    When I use NVL in the query of query I got error....Can't I use NVL to check on null value? Please help
    Here is my codes:
    <cfquery name="GetC2" datasource="#Trim(application.OracDSN)#">
         SELECT CamID2, rel2_2,p_ln2,p_fn2,ins,l_year
         FROM prt_temp
         WHERE Ins = 'CC'
         AND l_year =  '1481'
    AND NVL(Child_LN2,' ') <> ' '
    AND NVL(Child_FN2,' ') <> ' '
        </cfquery>
    <cfif GetC2.Recordcount NEQ 0>   
    <cfquery name="CheckRel2C2" dbtype="QUERY">
      SELECT CamID2, rel2_2
      FROM GetC2
      WHERE NVL(Rel2_2,' ') <> ' '
    AND NVL(p_ln2,' ') = ' '
    AND NVL(p_fn2,' ') = ' '
    AND Ins = 'CC'
    AND l_year =  '1481'
    </cfquery>
    </cfif>
    The error:
    Error Executing Database Query.
    Query Of Queries syntax error.
    Encountered "NVL ( Rel2_2 ,. Incorrect conditional expression, Expected one of [like|null|between|in|comparison] condition,

    NVL is an Oracle function, and is not available in ColdFusion Query of Query.  If you are trying to check for null values, then use IS NULL or IS NOT NULL.  So
    WHERE NVL(Rel2_2,' ') <> ' '
        AND NVL(p_ln2,' ') = ' '
        AND NVL(p_fn2,' ') = ' '
    becomes
    WHERE Rel2_2 IS NOT NULL
        AND p_ln2 IS NULL
        AND p_fn2 IS NULL
    -Carl V.

Maybe you are looking for

  • Since installing Leopard, my iPhone is no longer recognized by iTunes.

    Since installing Leopard, my iPhone is no longer recognized by iTunes and cannot synch, my music, videos, address book, and calendar. Could you let me know how I can get iTunes to recognize my iPhone again? It is odd since i plug the iPhone into the

  • Strange error when try to open secured doc using PDDocOpen

    Aandi and Leo, I have a secured PDF file. When I try to open it using the below code I am getting an error like below as message box. //error Unknown error Support Information: CRecipientList-666 //error I would like to know why this is coming and ho

  • Fade up to Slide then Black

    I put together a simple DVD layout -- 1 video + audio program and 1 slideshow (27 slides). The Disc Info under Build shows 1.27 GB for the video and 527 KB for the DVD-ROM content. The slides range in size from 500 KB to 1.3 GB. After setting up a 10

  • 100% wide - bug in IE?

    Hello all, I am going to present a layout for a client to aprove, and although I usually print it, I also put it online (without working as a real site). I have notest a "bug" in IE before, but it's starting to be anoying *grrrrr* The url: http://cur

  • Extracting Archived data (PBS server's data) in BI

    Hi,       I have to upload the archived data from PBS server in BI sever. Can anyone please provide me with few documents or links or sap notes which would guide me on how to go about doing it.      if anyone has already done this the steps on how to