Passing item to pl/sql to modify the query

hi all,
i am new to apex and appreciate any help :)
what i am trying to do do is show point of interest on the map, and filter them :)
what i already have done:
i have a page.1 where is a list and when you click the link it sent you to page.2 with 3 items, "type" start date "end date"
type is well the type of point :)
start date and end date are today's dates that are pulled from db when clicked
when page.2 opens i can see the 3 items on the page
the page body loads a pl/sql procedure which:
pl/sql code on page.2
"begin item_locations; end;"
queries the database and returns the
"type" "lat,long" "date" "id"values from different tables
example;
id type lat,long date
coffe 2     40.386289,49.824348     5     07-OCT-12 10.37.54.000000 PM
tea 2     40.386289,49.824348     5     07-OCT-12 10.37.54.000000 PM
food 2     40.386289,49.824348     5     07-OCT-12 10.37.54.000000 PM
cars 1     40.386289,49.824348     5     07-OCT-12 10.37.54.000000 PM
bars 3      40.386289,49.824348     5     07-OCT-12 10.37.54.000000 PM
shops 6      40.386289,49.824348     5     07-OCT-12 10.37.54.000000 PM
then the procedure takes outputs as "htp.print" and creates a map and show ALL the points,
i want to do 2 things
1) i want to filter whats shown on the page by type and date when the page loads (assuming user coming from page.1 with the items full :) )
my idea is to add "where type=**type from page.2 item** and date **page item date1** between **page item date2**
2) add a button so and if i manually input/modifiy the page items on page2. them click the button will have new results :)
by setup:
win8 64 bit
oracle db expres
Application Express 4.0.2.00.09
thanks in advancce

Sounds like an interesting application!
The easiest way to do this would be to change your procedure item_locations to include the three parameters you want to use, so that your procedure looks like:
PROCEDURE item_locations
(p_type VARCHAR2 DEFAULT NULL
,p_start_date DATE DEFAULT NULL
,p_end_date DATE DEFAULT NULL)
IS ...
BEGIN
Select col1, col2, col3
from my_table
where type = NVL(p_type,type)
and my_date between NVL(p_start_date,my_date) and NVL(p_end_date,my_date)
htp.p(my_data)
END  item_locations;
etc
-- Note  - this is purely example code and not intended to compile as is. Just saying.Then in your apex page process, you simply call
BEGIN
item_locations (:P2_ITEM, :P2_START_DATE, :P2_END_DATE);
END;I hope this makes sense. It sounds like you're so new that you have not had the pleasure of doing the 2 Day Developer Guide. I would strongly recommend you do this if you are not familiar with Apex - it is a necessity.
Kind Regards, Pete

Similar Messages

  • Can the format of a SQL Statement modify the execution time of an SQL ....

    Can the format of a SQL Statement modify the execution time of an SQL statement?
    Thanks in advance

    It depends on:
    1) What oracle version are you using
    2) What do you mean for "format"
    For example: if you're on Oracle9i and changing format means changing the order of the tables in the FROM clause and you're using Rule Based Optimizer then the execution plan and the execution time can be very different...
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2009/12/29/estrarre-i-dati-in-formato-xml-da-sql/]

  • VO Extension Error in modifying the query of XML Publisher Report Template

    Hi Friends,
    I have one requirement related to calling XML Publisher Reports Template from OAF Page.
    When clicking on the submit button the XML Publisher template is calling and displaying the data.
    Our requirement is to display some more columns in the XML Publisher Template and display the data.
    As according to OAF stndards,whenever we need to add new columns for display or SELECT purpose,
    we will do the VO Extension. So we modified the query by adding the new additional colums in the standard VO.
    I am able to retrieve the data from the SQL DEVELOPER. But when doing the VO Extension process and
    calling the template from the OAF page its throwing the following error.Please suggest me some alternatives
    to fix the issue.
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT
    DECODE(ASO_QUOTES.RESOURCE_ID, null, sales.name, sales1.name) sales_rep_name,
    aso_quotes.quote_name,
    aso_quotes.contract_id,
    aso_quotes.quote_number||decode(aso_quotes.quote_version,NULL,'',' - ') || aso_quotes.quote_version quote_name_version,
    to_char(aso_quotes.quote_expiration_date, nvl(FND_PROFILE.VALUE('ICX_DATE_FORMAT_MASK'), 'DD-MON-RRRR')) quote_expiration_date,
    TO_NUMBER(TO_CHAR(aso_quotes.quote_expiration_date,'J')) - TO_NUMBER(TO_CHAR(Sysdate,'J')) duration,
    I_HEADER_CONTACT_PARTY.PARTY_NAME sold_to_contact_name,
    I_CUST_PARTIES.party_name customer_name,
    I_PHONE.PHONE_AREA_CODE || DECODE(I_PHONE.PHONE_AREA_CODE , NULL, '',' ' ) || I_PHONE.PHONE_NUMBER full_phone_number,
    I_INVOICE_REL_PARTY.PARTY_NAME invoice_to_contact_name,
    I_ACCTS_INV_PARTY.PARTY_NAME invoice_to_cust_party_name,
    I_INVOICE_LOCATIONS.ADDRESS1 invoice_to_address1,
    I_INVOICE_LOCATIONS.ADDRESS2 invoice_to_address2,
    I_INVOICE_LOCATIONS.ADDRESS3 invoice_to_address3,
    I_INVOICE_LOCATIONS.ADDRESS4 invoice_to_address4,
    decode(I_INVOICE_LOCATIONS.city, null,'',I_INVOICE_LOCATIONS.city || decode(I_INVOICE_LOCATIONS.county,null,'',',' || I_INVOICE_LOCATIONS.county)) invoice_to_city,
    I_INVOICE_LOCATIONS.state || decode(I_INVOICE_LOCATIONS.postal_code, null,'',' '||
    I_INVOICE_LOCATIONS.postal_code || decode(I_INVOICE_LOCATIONS.province,null,'',',' ||I_INVOICE_LOCATIONS.province )) invoice_to_county,
    I_INVOICE_LOCATIONS.country invoice_to_country,
    aso_quotes.currency_code Currency_Code,
    (select distinct ppf.email_address
    from per_people_f ppf,
    JTF_RS_SALESREPS jrs
    where jrs.resource_id = aso_quotes.resource_id
    and jrs.PERSON_ID = ppf.person_id
    and ppf.person_type_id = 3
    ) Sales_Rep_Email,
    aso_quotes.quote_header_id, oav.name||decode(oav.agreement_num,NULL,'',',')||oav.agreement_num||decode(oav.agreement_num,NULL,'',',')||oav.revision Agreement_name,
    oav.name||oav.agreement_num||oav.revision Agreement_check,
    to_char(oav.revision_date, nvl(FND_PROFILE.VALUE('ICX_DATE_FORMAT_MASK'), 'DD-MON-RRRR')) revision_date,
    (select payment_term_name
    FROM
    aso_payments_v
    WHERE
    quote_line_id is null and
    quote_header_id = aso_quotes.quote_header_id) payment_terms,
    to_char(sysdate, nvl(FND_PROFILE.VALUE('ICX_DATE_FORMAT_MASK'), 'DD-MON-RRRR')) curr_date,
    aso_quotes.total_list_price total_list_price,
    aso_quotes.total_adjusted_amount total_adjusted_amount,
    (aso_quotes.total_list_price + aso_quotes.total_adjusted_amount) total_net_price,
    aso_quotes.total_shipping_charge charges_total,
    aso_quotes.total_tax taxes_total,
    aso_quotes.total_quote_price total_quote_price,
    (select cust_po_number
    FROM
    aso_payments
    WHERE
    quote_line_id is null and
    quote_header_id = aso_quotes.quote_header_id ) cust_po_number,
    (select fct.name
    from fnd_currencies_tl fct
    where aso_quotes.currency_code = fct.currency_code
    and fct.language = userenv('lang')) Currency_Name,
    (select fcurr.symbol
    from fnd_currencies fcurr
    where aso_quotes.currency_code = fcurr.currency_code) Currency_Symbol,
    (Select meaning
    From oe_lookups
    Where lookup_type = 'FREIGHT_TERMS'
    And lookup_code = (select aship.freight_terms_code
    from aso_shipments aship
    where aship.quote_header_id = aso_quotes.quote_header_id
    and aship.quote_line_id is null)) Freight_Terms,
    (Select fl.meaning
    From fnd_lookup_values fl
    where fl.lookup_type = 'SHIP_METHOD'
    And fl.lookup_code = (select aship.ship_method_code
    from aso_shipments aship
    where aship.quote_header_id = aso_quotes.quote_header_id
    and aship.quote_line_id is null)
    And fl.language = userenv('LANG')) shipping_method ,
    aso_quotes.org_id ,
    aso_quotes.quote_number ,
    aso_quotes.Quote_version VersionNumber,
    I_ACCTS.ACCOUNT_NUMBER CustomerNumber,
    oav.agreement_num Agreement_Number,
    :action action,
    aso_quotes.minisite_id minisite_id,
    (select imt.msite_name from ibe_msites_tl imt where imt.msite_id = aso_quotes.minisite_id
    and imt.language = userenv('LANG')) msite_name,
    (select asl.meaning from oe_lookups asl, aso_shipments ash
    where asl.lookup_type = 'SHIPMENT_PRIORITY'
    and asl.lookup_code = ash.shipment_priority_code
    and ash.quote_header_id = aso_quotes.quote_header_id) shipment_priority_name
    ,(select OE_SYS_PARAMETERS.VALUE('INSTALLMENT_OPTIONS',aso_quotes.org_id) from dual) enable_pay_now
    from
    hz_CONTACT_POINTS I_PHONE ,
    HZ_RELATIONSHIPS I_HEADER_CONTACT_REL,
    HZ_PARTIES I_HEADER_CONTACT_PARTY,
    ASO_QUOTE_HEADERS ASO_QUOTES,
    HZ_RELATIONSHIPS I_INVOICE_REL,
    HZ_PARTIES I_INVOICE_REL_PARTY,
    HZ_PARTY_sites I_INVOICE_PARTY_SITES,
    HZ_LOCATIONS I_INVOICE_LOCATIONS,
    HZ_PARTIES I_CUST_PARTIES,
    HZ_CUST_ACCOUNTS I_ACCTS,
    HZ_CUST_ACCOUNTS I_ACCTS_INV,
    HZ_PARTIES I_ACCTS_INV_PARTY,
    JTF_RS_SALESREPS_MO_V SALES,
    JTF_RS_SALESREPS_MO_V SALES1,
    FND_TERRITORIES_VL I_TERRITORIES,
    oe_agreements_vl oav
    where
    ASO_QUOTES.PARTY_ID = I_HEADER_CONTACT_REL.PARTY_ID(+)
    AND I_HEADER_CONTACT_REL.SUBJECT_ID = I_HEADER_CONTACT_PARTY.PARTY_ID(+)
    AND I_HEADER_CONTACT_REL.SUBJECT_TYPE(+) = 'PERSON'
    AND I_HEADER_CONTACT_REL.SUBJECT_TABLE_NAME(+) = 'HZ_PARTIES'
    and i_header_contact_rel.object_id(+) = aso_quotes.cust_party_id
    AND ASO_QUOTES .INVOICE_TO_PARTY_SITE_ID = I_INVOICE_PARTY_SITES.PARTY_SITE_ID (+)
    AND I_INVOICE_PARTY_SITES.LOCATION_ID = I_INVOICE_LOCATIONS.LOCATION_ID(+)
    AND I_INVOICE_LOCATIONS.country = I_TERRITORIES.territory_code(+)
    AND ASO_QUOTES.INVOICE_TO_PARTY_ID = I_INVOICE_REL.PARTY_ID(+)
    AND I_INVOICE_REL.SUBJECT_ID = I_INVOICE_REL_PARTY.PARTY_ID(+)
    AND I_INVOICE_REL.SUBJECT_TYPE(+) = 'PERSON'
    AND I_INVOICE_REL.SUBJECT_TABLE_NAME(+) = 'HZ_PARTIES'
    AND i_invoice_rel.object_id (+) = aso_quotes.invoice_to_cust_party_id
    AND ASO_QUOTES.ORG_ID = SALES.ORG_ID(+)
    AND ASO_QUOTES.EMPLOYEE_PERSON_ID = SALES.PERSON_ID (+)
    AND ASO_QUOTES.ORG_ID = SALES1.ORG_ID (+)
    AND ASO_QUOTES.RESOURCE_ID = SALES1.RESOURCE_ID (+)
    AND ASO_QUOTES.CUST_ACCOUNT_ID =I_ACCTS.CUST_ACCOUNT_ID(+)
    AND ASO_QUOTES.CUST_PARTY_ID = I_CUST_PARTIES.PARTY_ID
    AND ASO_QUOTES.INVOICE_TO_CUST_ACCOUNT_ID = I_ACCTS_INV.CUST_ACCOUNT_ID(+)
    AND ASO_QUOTES.INVOICE_TO_CUST_PARTY_ID = I_ACCTS_INV_PARTY.PARTY_ID(+)
    AND aso_quotes.phone_id = i_phone.contact_point_Id(+)
    AND oav.agreement_id(+) = aso_quotes.contract_id
    AND aso_quotes.quote_header_id = 666584
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:912)
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:886)
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:1009)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:153)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:762)
         at oracle.apps.aso.print.webui.MainCO.processRequest(MainCO.java:180)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:600)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:391)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1182)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2607)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1940)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
         at OA.jspService(_OA.java:212)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
         at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
         at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
         at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
         at OA.jspService(_OA.java:221)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    ## Detail 0 ##
    java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: 1
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:11915)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:815)
         at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:3919)
         at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3335)
         at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:13827)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:804)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:669)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3723)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4560)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:743)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:892)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:806)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:800)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3643)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:439)
         at oracle.apps.aso.print.server.PrintQuoteAMImpl.queryQuote(PrintQuoteAMImpl.java:447)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:153)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:762)
         at oracle.apps.aso.print.webui.MainCO.processRequest(MainCO.java:180)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:600)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:391)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1182)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2607)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1940)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
         at OA.jspService(_OA.java:212)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
         at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
         at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
         at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
         at OA.jspService(_OA.java:221)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL: 1
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:11915)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:815)
         at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:3919)
         at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3335)
         at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:13827)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:804)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:669)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3723)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4560)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:743)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:892)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:806)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:800)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3643)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:439)
         at oracle.apps.aso.print.server.PrintQuoteAMImpl.queryQuote(PrintQuoteAMImpl.java:447)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:153)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:762)
         at oracle.apps.aso.print.webui.MainCO.processRequest(MainCO.java:180)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:600)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processRequest(OAHeaderBean.java:391)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1182)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:968)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:935)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:659)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:252)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
         at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2607)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1940)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:543)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:431)
         at OA.jspService(_OA.java:212)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
         at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
         at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
         at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
         at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
         at OA.jspService(_OA.java:221)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)

    "java.sql.SQLException: Attempt to set a parameter name that does not occur in the SQL"
    Try the suggestions in this? https://kr.forums.oracle.com/forums/thread.jspa?messageID=10253362
    Check the bindign styles and bind variables..

  • Execute SQL Task Editor: The query failed to parse. Syntax error, permission violation, or other nonspecific error.

    Environment: SQL Server 2008 R2
    Code:
    CREATE TABLE dbo.PkgAudit
    PkgAuditID INT IDENTITY(1, 1),
    PackageName VARCHAR(100),
    LoadTime DATETIME ,
    NumberofRecords VARCHAR(50),
    Status1 VARCHAR(50),
    Status2 VARCHAR(50),
    The following code is inserted in the SQL Task Execute Editor
    INSERT INTO dbo.PkgAudit(PackageName
    ,LoadTime
    ,NumberofRecords
    ,Status1
    ,Status2
    ) VALUES(?,?,?,?,?)
    Screen Shot (Parameter Mapping):
    Problem: an error Message occurred when I hit Parse Query Button in the Execute SQL Task Editor, "Execute SQL: Task Editor: The query failed to parse. Syntax error, permission violation, or other nonspecific error". How I could Solve this
    problem  

    Different connection providers require different Parameter syntax. E.g. ADO @ParameterName notatoin, not just an offset of 0,1 etc.
    Arthur My Blog

  • Modify the query

    Is ther any otherway i can modify the below query to create emp_target to get the expected result below at the end
           CREATE EMP_TARGET as      
      SELECT emp.empno,emp.ename, emp.deptNO,dept.dname,EMP.mod_time,dept.mod_time FROM   
         (SELECT * FROM EMP WHERE MOD_TIME <=to_date('31-JUL-2012','DD-MON-YYYY'))emp
         left join
            (select * from dept WHERE MOD_TIME <=to_date('31-JUL-2012','DD-MON-YYYY') ) dept    
          on 
          emp.DEPTNO=dept.DEPTNO
    CREATE TABLE EMP
            EMPNO        INT            NOT NULL    ,
            ENAME        VARCHAR(10)                ,
            JOB            VARCHAR(9)                ,
            MGR            INT                        ,
            SAL            NUMERIC(7,2)                ,
            DEPTNO        INT,
            mod_time date
    CREATE TABLE DEPT
            DEPTNO    INT,
            DNAME    VARCHAR(14),
            LOC        VARCHAR(13) ,
            mod_time    date
          INSERT INTO emp VALUES
                (7369, 'SMITH', 'CLERK', 7902, 800, 20,to_DATE('31-JUL-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7499, 'ALLEN', 'SALESMAN', 7698, 1600, 30,to_DATE('31-JUL-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7521, 'WARD', 'SALESMAN', 7698, 1250, 30,to_DATE('31-JUL-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7566, 'JONES', 'MANAGER', 7839, 2975, 20,to_DATE('31-JUL-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7654, 'MARTIN', 'SALESMAN', 7698, 1250, 30,to_DATE('31-JUL-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7698, 'BLAKE', 'MANAGER', 7839, 2850, 30,to_DATE('31-JUL-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7782, 'CLARK', 'MANAGER', 7839, 2450, 10,to_DATE('31-JUL-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7788, 'SCOTT', 'ANALYST', 7566, 3000, 20,to_DATE('01-SEP-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7839, 'KING', 'PRESIDENT', NULL, 5000, 10,to_DATE('01-SEP-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7844, 'TURNER', 'SALESMAN', 7698, 1500, 30,to_DATE('01-SEP-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7876, 'ADAMS', 'CLERK', 7788, 1100, 20,to_DATE('01-SEP-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7900, 'JAMES', 'CLERK', 7698, 950, 30,to_DATE('01-SEP-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7902, 'FORD', 'ANALYST', 7566, 3000, 60,to_DATE('01-SEP-2012','DD-MON-YYYY'));
            INSERT INTO EMP VALUES
                (7934, 'MILLER', 'CLERK', 7782, 1300, 10,to_DATE('01-SEP-2012','DD-MON-YYYY'));
                SELECT * FROM EMP
            INSERT INTO DEPT
                VALUES (10, 'ACCOUNTING', 'NEW YORK',to_DATE('31-JUL-2012','DD-MON-YYYY'));
            INSERT INTO DEPT
                VALUES (20, 'RESEARCH', 'DALLAS',to_DATE('31-JUL-2012','DD-MON-YYYY'));
            INSERT INTO DEPT
                VALUES (30, 'SALES', 'CHICAGO',to_DATE('01-SEP-2012','DD-MON-YYYY'));
            INSERT INTO DEPT
                VALUES (40, 'OPERATIONS', 'BOSTON',to_DATE('01-SEP-2012','DD-MON-YYYY'));
                SELECT * FROM DEPT
           CREATE EMP_TARGET as      
      SELECT emp.empno,emp.ename, emp.deptNO,dept.dname,EMP.mod_time,dept.mod_time FROM   
         (SELECT * FROM EMP WHERE MOD_TIME <=to_date('31-JUL-2012','DD-MON-YYYY'))emp
         left join
            (select * from dept WHERE MOD_TIME <=to_date('31-JUL-2012','DD-MON-YYYY') ) dept    
          on 
          emp.DEPTNO=dept.DEPTNO
    Emp_target expected result
    empno ename  deptno  dname         emp_mod_time            dept_mod_time
    7782     CLARK     10     ACCOUNTING     31-JUL-12     31-JUL-12
    7566     JONES     20     RESEARCH         31-JUL-12     31-JUL-12
    7369     SMITH     20     RESEARCH             31-JUL-12     31-JUL-12
    7698     BLAKE     30                         31-JUL-12     
    7654     MARTIN     30                          31-JUL-12     
    7521     WARD     30                          31-JUL-12     
    7499     ALLEN     30                          31-JUL-12     Edited by: choti on Jan 8, 2013 10:20 AM

    Hi,
    choti wrote:
    CREATE TABLE EMP
    EMPNO        INT            NOT NULL    ,
    ENAME        VARCHAR(10)                ,
    JOB            VARCHAR(9)                ,
    MGR            INT                        ,
    SAL            NUMERIC(7,2)                ,
    DEPTNO        INT,
    mod_time date
    Thanks for posting the CREATE TABLE and INSERT statements.
    Remember why you need to go to all that trouble: so the people who want to help you can re-create the problem and test their ideas. If you post statements that don't work, then people can't use them. Please test (and, if necessary, correct) your statements before you post them.
    There is no NUMERIC datatype in Oracle SQL. I think you meant the datatype of sal to be NUMBER.
    Here's one way to create the emp_target table:
    CREATE TABLE     emp_target
    AS
    SELECT  e.empno
    ,     e.ename
    ,     e.deptno
    ,     d.dname
    ,     e.mod_time     AS emp_mod_time
    ,     d.mod_time     AS dept_mod_time
    FROM           emp        e
    LEFT OUTER JOIN  dept     d   ON   d.deptno     = e.deptno
                                   AND      d.mod_time     <= TO_DATE ('31-JUL-2012','DD-MON-YYYY')
    WHERE     e.mod_time     <= TO_DATE ('31-JUL-2012','DD-MON-YYYY')
    ;

  • Pls help me to modify the query for performance improvement

    Hi,
    I have the below initialization
    DECLARE @Active bit =1 ;
    Declare @id int
    SELECT @Active=CASE WHEN id=@id and [Rank] ='Good' then 0 else 1 END  FROM dbo.Students
    I have to change this query in such a way that the conditions id=@id and [Rank] ='Good' should go to the where condition of the query. In that case, how can i use Case statement to retrieve 1 or 0? Can you please help me to modify this initialization?

    I dont understand your query...May be below? or provide us sample data and your output...
    SELECT *  FROM dbo.students
    where @Active=CASE
    WHEN id=@id and rank ='Good' then 0 else 1 END
    But, I doubt you will have performance improvement here?
    Do you have index on id?
    If you are looking for getting the data for @ID with rank ='Good' then use the below:Make sure, you have index on id,rank combination.
    SELECT *  FROM dbo.students
    where  id=@id
    and rank ='Good' 

  • In query designer , cant able to change/modify the query porperties

    hai experts / friends
    even in production or develeopment i have selected one query in query designer and opened and after that am selecting one default value and then right hand side it displays the properties of that particular query then i can not modify the changes ...that Display and change option is in disable....how can i enable this button...
    please help me friends...
    previously i have tried using production and then i thought because of production it is not getting enabled then i tried in development , and came to know that even in development also same problem it is not getting enabled....
    thanks in advance..
    regards
    anand

    hai friends..
    thanks for all your reply...
    actually i want to explain detail  ..
    after selecting the one particular query , am just placing the mouse in my charecteristics restrictions and then right hand side
    properties window gets displayed and at the top we can find display/change button and save button technical name
    button
    in that display and change button is disabled...i want that button to be enabled.
    i have checked in my authorizations in SU01...
    even i have all the profiles like SAP_ALL ...
    and then i have been trying to have transaport connection and then creating transport conn. for BeX...but it is asking package name...
    in this case i dont know the exact package name....
    can any body help me in this regard???
    thanks
    anand

  • Hellp needed urgent in modifying the query

    my requriment is as follows.
    the data looks like as follows - 3 columns
    sheet_id sequence_no rap_no
    1 2
    1 4
    1 5
    1 1
    2 4
    2 6
    2 7
    3 8
    3 10
    4 3
    4 7
    and the max of seqno should be updated on rap_no.
    is the group by clause not neededin the following query .
    In tht case how to modify the foll query.
         update t3756_cue_sheet_music a set a.c3756_rap_sequence_no=
    (select max(to_number(c3756_sequence_no))
    FROM t3756_cue_sheet_music b
    where a.c3756_cue_sheet_id = b.c3756_cue_sheet_id)
    WHERE c3756_rap_sequence_no is NULL;
    Thanks in advance.
    Do reply

    Can you be a little more clear?
    create table t
    (sheet_id number
    ,sequence_no number
    ,rap_no number);
    alter table t add constraint tpk primary key (sheet_id, sequence_no);
    insert into t (sheet_id, sequence_no) values (1, 2);
    insert into t (sheet_id, sequence_no) values (1, 4);
    insert into t (sheet_id, sequence_no) values (1, 5);
    insert into t (sheet_id, sequence_no) values (1, 1);
    insert into t (sheet_id, sequence_no) values (2, 4);
    insert into t (sheet_id, sequence_no) values (2, 6);
    insert into t (sheet_id, sequence_no) values (2, 7);
    insert into t (sheet_id, sequence_no) values (3, 8);
    insert into t (sheet_id, sequence_no) values (3, 10);
    insert into t (sheet_id, sequence_no) values (4, 3);
    insert into t (sheet_id, sequence_no) values (4, 7);
    update t a
    set a.rap_no=
    (select max(to_number(sequence_no))
    FROM t b
    where a.sheet_id = b.sheet_id)
    WHERE rap_no is NULL;
    select *
      from t;
    SHEET_ID SEQUENCE_NO         RAP_NO
             1           2          5
             1           4          5
             1           5          5
             1           1          5
             2           4          7
             2           6          7
             2           7          7
             3           8         10
             3          10         10
             4           3          7
             4           7          7Doesn't this give you the correct results?

  • Need to modify the query

    Hi All,
    I am a new DBA. Please help me in modifying the below query in test envirnoment. It is long query.
    SELECT NVL(MIN(P_LAY),0), NVL(MIN(TID),0), NVL(MIN(TTIME),0), NVL(MIN(TSOURCE),0) FROM ( SELECT P_LAY, TID, TTIME, TSOURCE FROM ( SELECT (CASE WHEN T1.INTERNAL_TYPE=3 THEN -1 ELSE T_REPORT.GET_LAY(T1.EVE_ID, T1.EVE_TIME,:B4 ) END ) P_LAY, T1.EVE_ID TID, T1.EVE_TIME TTIME, T1.ALA_SOURCE_ID TSOURCE FROM T_EVE_LOG T1, T_EVE_LOG T2 WHERE T1.ALA_ID = T2.ROOT_ALA_ID AND T2.EVE_TIME >= :B3 AND T2.EVE_TIME < :B2 AND T2.ALA_ID = :B1 AND T2.ACT_ID IN (2,5) ) ORDER BY P_LAY ) WHERE ROWNUM = 1
    Thanks in Advance

    886755 wrote:
    Hi All,
    I am a new DBA. Please help me in modifying the below query in test envirnoment. It is long query.
    SELECT NVL(MIN(P_LAY),0), NVL(MIN(TID),0), NVL(MIN(TTIME),0), NVL(MIN(TSOURCE),0) FROM ( SELECT P_LAY, TID, TTIME, TSOURCE FROM ( SELECT (CASE WHEN T1.INTERNAL_TYPE=3 THEN -1 ELSE T_REPORT.GET_LAY(T1.EVE_ID, T1.EVE_TIME,:B4 ) END ) P_LAY, T1.EVE_ID TID, T1.EVE_TIME TTIME, T1.ALA_SOURCE_ID TSOURCE FROM T_EVE_LOG T1, T_EVE_LOG T2 WHERE T1.ALA_ID = T2.ROOT_ALA_ID AND T2.EVE_TIME >= :B3 AND T2.EVE_TIME < :B2 AND T2.ALA_ID = :B1 AND T2.ACT_ID IN (2,5) ) ORDER BY P_LAY ) WHERE ROWNUM = 1
    Thanks in Advancemodify it how to do what?
    SELECT Nvl(MIN(p_lay), 0),
           Nvl(MIN(tid), 0),
           Nvl(MIN(ttime), 0),
           Nvl(MIN(tsource), 0)
    FROM   (SELECT p_lay,
                   tid,
                   ttime,
                   tsource
            FROM   (SELECT ( CASE
                               WHEN t1.internal_type = 3 THEN -1
                               ELSE t_report.Get_lay(t1.eve_id, t1.eve_time, :B4)
                             END )          p_lay,
                           t1.eve_id        tid,
                           t1.eve_time      ttime,
                           t1.ala_source_id tsource
                    FROM   t_eve_log t1,
                           t_eve_log t2
                    WHERE  t1.ala_id = t2.root_ala_id
                           AND t2.eve_time >= :B3
                           AND t2.eve_time < :B2
                           AND t2.ala_id = :B1
                           AND t2.act_id IN ( 2, 5 ))
            ORDER  BY p_lay)
    WHERE  ROWNUM = 1 

  • Report conversion tool--Can we modify the query

    Hi all,
    I have some freehand SQL reports converted into WebI reports. I understand that report conversion tool, creates a new universe for each of the freehand SQL report. But if I try to edit the query, like add a filter condition, an error pops out.
    Is it possible to edit the query if we convert freehand sql reports into webi reports?
    Regards
    Ash.

    Hi,
    Yes it is possible to edit the query for the converted free hand sql query.
    If you see any problem while editing the SQL of the converted report, do a refresh once and try.
    Adding query filter also works fine.
    Issue from your end could also be due to security settings.i advise to revisit the security once and make sure all appropriate rights are available for the user.
    Thanks,
    Sri

  • How to modify the query to get max id record

    Hi All,
    How to modify below query to get proper result.The query is returning some records are duplicated.I need only one record to display from duplicate based on max assetid.
    Here is my query:
    SELECT *
    FROM (
    SELECT a.uppertitle, a.composer, a.esongid,
    MAX (asset_new.assetid) AS assetid,asset_new.ownerid
    FROM (SELECT DISTINCT NVL (esong.title, '~') AS uppertitle,
    INITCAP (NVL (esong.composer, '~')
    ) AS composer,
    esong.esongid
    FROM esong, esongcountry_us eus
    WHERE 1 = 1
    AND eus.esongid = esong.esongid
    AND eus.isocountrycode IN ('US')
    AND esong.title LIKE 'LIVE TO TELL%'
    AND ROWNUM < 390) a,
    songwebrecording,
    recordingasset_new,
    asset_new
    WHERE a.esongid = songwebrecording.esongid(+)
    AND songwebrecording.recordingid = recordingasset_new.recordingid(+)
    AND recordingasset_new.assetid = asset_new.assetid(+)
    GROUP BY a.uppertitle, a.composer, a.esongid,asset_new.ownerid)
    WHERE ROWNUM <= 390
    ORDER BY uppertitle
    result:
         upperlittle composer esongid assetid onwerid
    1.     LIVE TO TELL Gelb, Howe 480340000 null      null
    2. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 null null
    3. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3080366 null
    4. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3038107 null
    5. LIVE TO TELL THE TALE Holopainen 859841500 nulll nulll
    I need the result like this :
         upperlittle composer esongid assetid onwerid
    1.     LIVE TO TELL Gelb, Howe 480340000 null      null
    2. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3080366 null
    3. LIVE TO TELL THE TALE Holopainen 859841500 nulll nulll
    Please help me on this regard. oracle version is 9i
    Regards,
    Rajasekhar

    can you please format your code with                                                                                                                                                                                                                        

  • Can i modify the query in discoverer

    Hi
    I am working on discoverer vierwer, is it possible to change the query and run the query myself. I can access the query but i can't make any changes.
    The problem i am having is i want to show the sum of a variable but not show the count, is this possible ?
    any help would be appreciated
    thanks
    nimesh

    Hi Nimesh
    Presumably the workbook you are referring to is not owned by you and has only been shared with you? In this case, while you can make changes to the query while it is in memory, providing you have the necessary privileges that is, you will not be able to save over the original. This is because only the owner can do this and you are not the owner.
    What you can do though is to use Save As and save ourself a variant of the report. Of course this opens up another spoke in the wheel of reinvented queries, something that most organizations would like to avoid.
    Therefore, perhaps the best option would be to contact the owner of the workbook and request that it be modified for your needs.
    I hope this helps
    Best wishes
    Michael Armstrong-Smith
    URL: http://learndiscoverer.com
    Blog: http://learndiscoverer.blogspot.com

  • How to modify the query to get the output in a single row

    Hi All,
    Below is the query i have written it works fine
    select DISTINCT right(left(CTACCT,13),4) AS LocationNum,
    tODS_GLBalance.FiscalYearId AS FiscalYearId,
    tODS_GLBalance.FiscalMonthOfYearId AS FiscalMonthOfYearId,
    --tods_GLMetadata.Metric,
    Case when
    tods_GLMetadata.Metric = 'Gross Margin'
    Then SUM(Balance)
    Else 0
    END AS GrossMargin,
    Case when
    tods_GLMetadata.Metric = 'Occupancy'
    Then SUM(Balance)
    Else 0
    END AS Occupancy,
    Case when
    tods_GLMetadata.Metric = 'Payroll Dollars'
    Then SUM(Balance)
    Else 0
    END AS Payroll,
    Case when
    tods_GLMetadata.Metric = 'CF Sales'
    Then SUM(Balance)
    Else 0
    END AS OperatingSales,
    Case when
    tods_GLMetadata.Metric = 'Operations'
    Then SUM(Balance)
    Else 0
    END AS OperatingExpenses
    -- 0 as payroll
    from ods.[JJill].[tODS_GLBalance]
    inner join ods.Staging.tODS_INF_GLPCT ON tODS_GLBalance.PageNum = tODS_INF_GLPCT.CTPAGE
    inner join ods.JJill.tods_GLMetadata ON tods_GLMetadata.AcctDescription = tODS_INF_GLPCT.CTDESC
    where
    (tODS_GLBalance.FiscalYearId = 2012) and
    (tODS_GLBalance.FiscalMonthOfYearId = 2) and
    (right(left(CTACCT,13),4)= 3020)
    group by
    right(left(CTACCT,13),4),
    tODS_GLBalance.FiscalYearId,
    tODS_GLBalance.FiscalMonthOfYearId,
    tods_GLMetadata.Metric
    This is the sample output,
    LocationNum FiscalYearId FiscalMonthOfYearId GrossMargin Occupancy Payroll OperatingSales OperatingExpenses
    3020 2012 2 -112477.00 0.00 0.00 0.00 0.00
    3020 2012 2 0.00 0.00 0.00 -158288.94 0.00
    3020 2012 2 0.00 0.00 0.00 0.00 5625.44
    3020 2012 2 0.00 0.00 24185.79 0.00 0.00
    3020 2012 2 0.00 31075.53 0.00 0.00 0.00
    But, i am expecting the output to be something like this
    LocationNum FiscalYearId FiscalMonthOfYearId GrossMargin Occupancy Payroll OperatingSales OperatingExpenses
    3020 2012 2 -112477.00 31075.53 24185.79 -158288.94 5625.44
    Can someone please help me with changing my query to get the desired output?
    Please let me know if you have any questions.
    Thanks

    Try this:
    SELECT DISTINCT
    RIGHT(LEFT(CTACCT,13),4) AS LocationNum, tODS_GLBalance.FiscalYearId AS FiscalYearId, tODS_GLBalance.FiscalMonthOfYearId AS FiscalMonthOfYearId,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Gross Margin' THEN Balance ELSE 0 END ) AS GrossMargin,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Occupancy' THEN Balance ELSE 0 END ) AS Occupancy,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Payroll Dollars' THEN Balance ELSE 0 END ) AS Payroll,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'CF Sales' THEN Balance ELSE 0 END ) AS OperatingSales,
    SUM(CASE WHEN tods_GLMetadata.Metric = 'Operations' THEN Balance ELSE 0 END ) AS OperatingExpenses
    FROM ods.[JJill].[tODS_GLBalance]
    INNER JOIN ods.Staging.tODS_INF_GLPCT
    ON tODS_GLBalance.PageNum = tODS_INF_GLPCT.CTPAGE
    INNER JOIN ods.JJill.tods_GLMetadata
    ON tods_GLMetadata.AcctDescription = tODS_INF_GLPCT.CTDESC
    WHERE tODS_GLBalance.FiscalYearId = 2012
    AND tODS_GLBalance.FiscalMonthOfYearId = 2
    AND RIGHT(LEFT(CTACCT,13),4) = 3020
    GROUP BY right(left(CTACCT,13),4), tODS_GLBalance.FiscalYearId, tODS_GLBalance.FiscalMonthOfYearId, tods_GLMetadata.Metric

  • Modify the query in some other way

    sorry worng post
    Edited by: most wanted!!!! on Oct 11, 2011 6:16 AM

    Hi kalam, 
    Maybe I did not understood correctly, but I understand that he want to get the columns names dynamically, am I wrong? did you understood differently?
    "Without actually typing all the fields for different tables?"
    * If each table was with different columns then using simple query like this will do the job:
    select * from t1
    FULL OUTER JOIN t2 on 1=2
    but if there is a column C which is in both tables then in this solution you will get it twice. Therefore there is need another step or to build the columns names dynamically.
    for example if he have this DDL+DML
    create table t1 (x1 int, x2 int,c int)
    create table t2 (y1 int, y2 int, y3 int,c int)
    GO
    insert t1 values (1,1,6),(1,2,6),(1,3,6),(1,4,6)
    insert t2 values (11,11,33,6),(11,12,33,6),(11,13,33,6),(11,14,33,6)
    GO
    then the result should be (without using the column's names in the query):
    x1 x2 c y1 y2 y3
    1 1 6 NULL NULL NULL
    1 2 6 NULL NULL NULL
    1 3 6 NULL NULL NULL
    1 4 6 NULL NULL NULL
    NULL NULL 6 11 11 33
    NULL NULL 6 11 12 33
    NULL NULL 6 11 13 33
    NULL NULL 6 11 14 33
    FARAZ
    A QURESHI, Is this not what you are trying to get?
    am I right that you want to get it without using any column name?
    [Personal Site] [Blog] [Facebook]

  • Query is Very Slow but after using sql tuning advisor the Query is fine

    Currently we have Query which takes ages to retrieve small data set of 30 seconds.So i used the sql advisor and applied the profile now the same query comes in msec.This was tested on Test enviorement.
    Metadata for Table: TIBEX_PARTICIPANT
      CREATE TABLE "TST_PRE_EOD"."TIBEX_PARTICIPANT"
       (     "PARTICIPANTID" VARCHAR2(25) NOT NULL ENABLE,
         "PARTICIPANTTYPE" NUMBER(4,0),
         "PARTICIPANTSUBTYPE" VARCHAR2(5),
         "PARTICIPANTSTATUS" NUMBER(4,0),
         "PARTICIPANTNAMESHORT" VARCHAR2(15),
         "PARTICIPANTNAME" VARCHAR2(60),
         "ROOTPARTICIPANTID" VARCHAR2(25),
         "PARENTPARTICIPANTID" VARCHAR2(25),
         "SFAREPORTING" CHAR(1),
         "ADDRESSOFFICENAME" VARCHAR2(30),
         "ADDRESSLINE1" VARCHAR2(60),
         "ADDRESSLINE2" VARCHAR2(40),
         "ADDRESSLINE3" VARCHAR2(50),
         "ADDRESSLINE4" VARCHAR2(50),
         "ADDRESSCOUNTRY" VARCHAR2(50),
         "WEBURL" VARCHAR2(100),
         "PHONENO" VARCHAR2(20),
         "FAXNO" VARCHAR2(20),
         "CONTACTNAME" VARCHAR2(50),
         "CONTACTTITLE" VARCHAR2(30),
         "CONTACTEMAIL" VARCHAR2(35),
         "CURRENTOPENVAL" FLOAT(126) NOT NULL ENABLE,
         "OPENVALLIMIT" FLOAT(126) NOT NULL ENABLE,
         "TIMESTAMP" NUMBER(20,0) NOT NULL ENABLE,
         "ORDERVALLIMIT" FLOAT(126) NOT NULL ENABLE,
         "NOTE" VARCHAR2(50),
         "PARTICIPANTINDEX" NUMBER(4,0),
         "AUTOROUTETOCLEARING" CHAR(1),
         "CREDITID" VARCHAR2(25),
         "ISCPTRDDETAILS" CHAR(1) NOT NULL ENABLE,
         "PRIMARY_BIC" VARCHAR2(11),
         "QSID" VARCHAR2(10) NOT NULL ENABLE,
         "INTERNALISEDTRADES" CHAR(1) NOT NULL ENABLE,
          CONSTRAINT "XPKTIBEX_PARTICIPANT" PRIMARY KEY ("PARTICIPANTID")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TST_PRE_EOD"  ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TST_PRE_EOD" ;
    Back to Metadata
    Back to Top
    Metadata for Table: TIBEX_QUOTE
      CREATE TABLE "TST_PRE_EOD"."TIBEX_QUOTE"
       (     "QUOTEID" CHAR(20) NOT NULL ENABLE,
         "USERORDERID" VARCHAR2(25),
         "QUOTESTATUS" NUMBER(4,0) NOT NULL ENABLE,
         "INDICATIVE" CHAR(1),
         "BOARDID" VARCHAR2(10),
         "INSTRUMENTID" VARCHAR2(50) NOT NULL ENABLE,
         "SELLPRICE" FLOAT(126),
         "SELLQTY" NUMBER(10,0),
         "BUYPRICE" FLOAT(126),
         "BUYQTY" NUMBER(10,0),
         "PARTICIPANTID" VARCHAR2(25),
         "ACCOUNTNO" VARCHAR2(50),
         "LASTINSTRESULT" VARCHAR2(50),
         "LASTINSTMESSAGESEQUENCE" NUMBER(20,0) NOT NULL ENABLE,
         "BUYQUOTEMINSIZE" NUMBER(10,0),
         "LASTEXECUTIONID" CHAR(20),
         "SELLQUOTEMINSIZE" NUMBER(10,0),
         "TICKMOVECOUNT" NUMBER(10,0),
         "TIMESTAMP" NUMBER(20,0) NOT NULL ENABLE,
         "SELLQTYFILLED" NUMBER(10,0),
         "BUYQTYFILLED" NUMBER(10,0),
         "MEID" VARCHAR2(10) NOT NULL ENABLE,
         "LASTINSTREJECTCODE" VARCHAR2(10),
         "LASTEXECPRICE" FLOAT(126),
         "LASTEXECQTY" NUMBER(10,0),
         "LASTEXECSIDE" NUMBER(4,0),
         "LASTINSTTYPE" NUMBER(4,0),
         "LASTEXECUTIONCOUNTERPARTY" VARCHAR2(25),
         "BIDTIMESTAMP" NUMBER(20,0),
         "OFFERTIMESTAMP" NUMBER(20,0),
         "LASTEXECCLEARINGAGENCY" VARCHAR2(11),
         "LASTEXECACCOUNTNO" VARCHAR2(50),
         "LASTEXECCPCLEARINGAGENCY" VARCHAR2(11),
         "LASTEXECBOARDID" VARCHAR2(10),
         "MESSAGESEQUENCE" NUMBER(20,0) NOT NULL ENABLE,
         "LASTINSTUSERALIAS" CHAR(4) NOT NULL ENABLE,
         "PARTNEREXID" CHAR(20),
         "LASTSETTLEMENTCYCLE" NUMBER(4,0),
         "LASTEXECPOSTTRADEVENUETYPE" NUMBER(4,0),
         "PRICELEVELPOSITION" NUMBER(4,0),
         "MATCHTYPE" NUMBER(4,0),
         "LASTEXECUTIONROLE" VARCHAR2(4),
         "REFERENCEID" VARCHAR2(25),
         "BUYMDENTRYID" VARCHAR2(13),
         "SELLMDENTRYID" VARCHAR2(13),
         "HALTREASON" NUMBER(4,0),
         "LASTINSTFIXSEQUENCE" NUMBER(20,0)
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TST_PRE_EOD" ;
    Back to Metadata
    Back to Top
    Metadata for Table: TIBEX_QUOTESTATUSENUM
      CREATE TABLE "TST_PRE_EOD"."TIBEX_QUOTESTATUSENUM"
       (     "QUOTESTATUS" NUMBER(4,0) NOT NULL ENABLE,
         "SHORTDESC" VARCHAR2(32) NOT NULL ENABLE,
         "DESCRIPTION" VARCHAR2(50),
          CONSTRAINT "XPKTIBEX_QUOTESTATUSENUM" PRIMARY KEY ("QUOTESTATUS")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TST_PRE_EOD"  ENABLE
       ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TST_PRE_EOD" ;
    Back to Metadata
    Back to Top
    Metadata for Index: IX_QUOTEBOOK
      CREATE INDEX "TST_PRE_EOD"."IX_QUOTEBOOK" ON "TST_PRE_EOD"."TIBEX_QUOTE" ("QUOTEID", "MESSAGESEQUENCE", "QUOTESTATUS")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 NOLOGGING COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TST_PRE_EOD" ;
    Back to Metadata
    Back to Top
    Metadata for Index: IX_QUOTE_TIMESTAMP
      CREATE INDEX "TST_PRE_EOD"."IX_QUOTE_TIMESTAMP" ON "TST_PRE_EOD"."TIBEX_QUOTE" ("TIMESTAMP")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TST_PRE_EOD" ;
    Back to Metadata
    Back to Top
    Metadata for Index: TIBEX_PARTICIPANTQSID
      CREATE INDEX "TST_PRE_EOD"."TIBEX_PARTICIPANTQSID" ON "TST_PRE_EOD"."TIBEX_PARTICIPANT" ("QSID")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TST_PRE_EOD" ;
    Back to Metadata
    Back to Top
    Metadata for Index: TIBEX_QUOTE_IDX_QLT
      CREATE INDEX "TST_PRE_EOD"."TIBEX_QUOTE_IDX_QLT" ON "TST_PRE_EOD"."TIBEX_QUOTE" ("LASTINSTUSERALIAS", "TIMESTAMP")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TST_PRE_EOD" ;
    Back to Metadata
    Back to Top
    Metadata for Index: XPKTIBEX_PARTICIPANT
      CREATE UNIQUE INDEX "TST_PRE_EOD"."XPKTIBEX_PARTICIPANT" ON "TST_PRE_EOD"."TIBEX_PARTICIPANT" ("PARTICIPANTID")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TST_PRE_EOD" ;
    Back to Metadata
    Back to Top
    Metadata for Index: XPKTIBEX_QUOTESTATUSENUM
      CREATE UNIQUE INDEX "TST_PRE_EOD"."XPKTIBEX_QUOTESTATUSENUM" ON "TST_PRE_EOD"."TIBEX_QUOTESTATUSENUM" ("QUOTESTATUS")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "TST_PRE_EOD" ;
    Back to Metadata
    Back to Top
    Metadata for View: TIBEX_QUOTESBYQSIDVIEW
      CREATE OR REPLACE FORCE VIEW "TST_PRE_EOD"."TIBEX_QUOTESBYQSIDVIEW" ("QUOTEID", "USERORDERID", "QUOTESTATUS", "INDICATIVE", "BOARDID", "INSTRUMENTID", "SELLPRICE", "SELLQTY", "BUYPRICE", "BUYQTY", "PARTICIPANTID", "ACCOUNTNO", "LASTINSTRESULT", "LASTINSTMESSAGESEQUENCE", "BUYQUOTEMINSIZE", "LASTEXECUTIONID", "SELLQUOTEMINSIZE", "TICKMOVECOUNT", "TIMESTAMP", "SELLQTYFILLED", "BUYQTYFILLED", "MEID", "LASTINSTREJECTCODE", "LASTEXECPRICE", "LASTEXECQTY", "LASTEXECSIDE", "LASTINSTTYPE", "LASTEXECUTIONCOUNTERPARTY", "BIDTIMESTAMP", "OFFERTIMESTAMP", "LASTEXECCLEARINGAGENCY", "LASTEXECACCOUNTNO", "LASTEXECCPCLEARINGAGENCY", "LASTEXECBOARDID", "MESSAGESEQUENCE", "LASTINSTUSERALIAS", "PARTNEREXID", "LASTSETTLEMENTCYCLE", "LASTEXECPOSTTRADEVENUETYPE", "PRICELEVELPOSITION", "MATCHTYPE", "LASTEXECUTIONROLE", "REFERENCEID", "BUYMDENTRYID", "SELLMDENTRYID", "HALTREASON", "LASTINSTFIXSEQUENCE", "QSID") AS
      SELECT  a.QUOTEID, a.USERORDERID, a.QUOTESTATUS, a.INDICATIVE, a.BOARDID,
           a.INSTRUMENTID, a.SELLPRICE, a.SELLQTY, a.BUYPRICE, a.BUYQTY,
           a.PARTICIPANTID, a.ACCOUNTNO, a.LASTINSTRESULT,
           a.LASTINSTMESSAGESEQUENCE, a.BUYQUOTEMINSIZE, a.LASTEXECUTIONID,
           a.SELLQUOTEMINSIZE, a.TICKMOVECOUNT, a.TIMESTAMP,
           a.SELLQTYFILLED, a.BUYQTYFILLED, a.MEID, a.LASTINSTREJECTCODE,
           a.LASTEXECPRICE, a.LASTEXECQTY, a.LASTEXECSIDE, a.LASTINSTTYPE,
           a.LASTEXECUTIONCOUNTERPARTY, a.BIDTIMESTAMP, a.OFFERTIMESTAMP,
           a.LASTEXECCLEARINGAGENCY, a.LASTEXECACCOUNTNO,
           a.LASTEXECCPCLEARINGAGENCY, a.LASTEXECBOARDID,
           a.MESSAGESEQUENCE, a.LASTINSTUSERALIAS, a.PARTNEREXID,
           a.LASTSETTLEMENTCYCLE, a.LASTEXECPOSTTRADEVENUETYPE,
           a.PRICELEVELPOSITION, a.MATCHTYPE, a.LASTEXECUTIONROLE,
           a.referenceID, a.BuyMDEntryID, a.SellMDEntryID, a.haltReason,
           a.lastInstFixSequence, b.QSID
        FROM  tibex_quote A,
              tibex_Participant b
        WHERE a.participantID = b.participantID
          AND (A.MessageSequence, A.QuoteID) IN (
                SELECT  max(C.MessageSequence), C.quoteID
                  FROM  tibex_quote C
                  WHERE LastInstRejectCode = 'OK'
                  GROUP By C.QuoteID
          AND a.QuoteStatus IN (
                SELECT QuoteStatus
                  FROM tibex_quoteStatusEnum
                  WHERE ShortDesc IN (
                          'QUO_ONMKT', 'QUO_OFFMKT', 'QUO_PREOPN'
              );Tkprof in Next post

    Tkprof Details
    TKPROF: Release 10.2.0.4.0 - Production on Thu Jan 28 14:38:44 2010
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Trace file: mifex3_ora_2598_mytrace1.trc
    Sort options: default
    count    = number of times OCI procedure was executed
    cpu      = cpu time in seconds executing
    elapsed  = elapsed time in seconds executing
    disk     = number of physical reads of buffers from disk
    query    = number of buffers gotten for consistent read
    current  = number of buffers gotten in current mode (usually for update)
    rows     = number of rows processed by the fetch or execute call
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        2      0.00       0.00          0          0          0           0
    Execute      2      0.00       0.00          0          0          0           2
    Fetch        0      0.00       0.00          0          0          0           0
    total        4      0.00       0.00          0          0          0           2
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 163 
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       3        0.00          0.00
      SQL*Net message from client                     3        0.00          0.00
    select text
    from
    view$ where rowid=:1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        2      0.00       0.00          0          0          0           0
    Execute      2      0.00       0.02          0          0          0           0
    Fetch        2      0.00       0.00          0          4          0           2
    total        6      0.00       0.02          0          4          0           2
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: CHOOSE
    Parsing user id: SYS   (recursive depth: 1)
    Rows     Row Source Operation
          1  TABLE ACCESS BY USER ROWID VIEW$ (cr=1 pr=0 pw=0 time=18 us)
    SELECT quoteid, lastexecposttradevenuetype, lastexecqty, matchtype,
           haltreason, buyquoteminsize, meid, lastinstuseralias, boardid,
           userorderid, buymdentryid, indicative, lastinsttype, lastexecprice,
           buyprice, partnerexid, lastinstresult, pricelevelposition,
           lastinstrejectcode, TIMESTAMP, buyqtyfilled, referenceid,
           lastexecboardid, bidtimestamp, tickmovecount, lastexecside,
           offertimestamp, sellprice, participantid, lastexecutioncounterparty,
           lastexecaccountno, sellmdentryid, accountno, buyqty, messagesequence,
           lastexecutionid, lastexeccpclearingagency, sellqty,
           lastexecclearingagency, sellquoteminsize, lastinstfixsequence,
           quotestatus, lastinstmessagesequence, instrumentid, sellqtyfilled,
           lastexecutionrole, lastsettlementcycle
      FROM tibex_quotesbyqsidview
    WHERE participantid = 'NITE'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.02          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        6     21.43      20.94       1125    2405864          0         468
    total        8     21.44      20.97       1125    2405864          0         468
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 163 
    Rows     Row Source Operation
        468  FILTER  (cr=2405864 pr=1125 pw=1125 time=20927185 us)
      24523   HASH GROUP BY (cr=2405864 pr=1125 pw=1125 time=21171165 us)
    2994085    TABLE ACCESS BY INDEX ROWID TIBEX_QUOTE (cr=2405864 pr=0 pw=0 time=8983645 us)
    3076661     NESTED LOOPS  (cr=87651 pr=0 pw=0 time=3092729 us)
      24523      HASH JOIN  (cr=18276 pr=0 pw=0 time=173004 us)
          3       NESTED LOOPS  (cr=8 pr=0 pw=0 time=81 us)
          1        INDEX UNIQUE SCAN XPKTIBEX_PARTICIPANT (cr=1 pr=0 pw=0 time=18 us)(object id 168573)
          3        TABLE ACCESS FULL TIBEX_QUOTESTATUSENUM (cr=7 pr=0 pw=0 time=55 us)
      24523       TABLE ACCESS FULL TIBEX_QUOTE (cr=18268 pr=0 pw=0 time=122762 us)
    3052137      INDEX RANGE SCAN IX_QUOTEBOOK (cr=69375 pr=0 pw=0 time=195648 us)(object id 168590)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       6        0.00          0.00
      SQL*Net more data to client                    46        0.00          0.00
      direct path write temp                         75        0.00          0.04
      SQL*Net message from client                     6        0.00          0.00
      direct path read temp                          75        0.00          0.00
    DELETE FROM PLAN_TABLE
    WHERE
    STATEMENT_ID=:1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        2      0.00       0.00          0          0          0           0
    Execute      2      0.00       0.04          0          9         16          11
    Fetch        0      0.00       0.00          0          0          0           0
    total        4      0.00       0.04          0          9         16          11
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 163 
    Rows     Row Source Operation
          0  DELETE  PLAN_TABLE$ (cr=4 pr=0 pw=0 time=33 us)
          0   TABLE ACCESS FULL PLAN_TABLE$ (cr=4 pr=0 pw=0 time=30 us)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      SQL*Net message from client                     2        0.01          0.02
    SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE
      NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false')
      NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),0), NVL(SUM(C2),0)
    FROM
    (SELECT /*+ IGNORE_WHERE_CLAUSE NO_PARALLEL("PLAN_TABLE") FULL("PLAN_TABLE")
      NO_PARALLEL_INDEX("PLAN_TABLE") */ 1 AS C1, CASE WHEN
      "PLAN_TABLE"."STATEMENT_ID"=:B1 THEN 1 ELSE 0 END AS C2 FROM
      "SYS"."PLAN_TABLE$" "PLAN_TABLE") SAMPLESUB
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          4          0           1
    total        3      0.00       0.00          0          4          0           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 163     (recursive depth: 1)
    Rows     Row Source Operation
          1  SORT AGGREGATE (cr=4 pr=0 pw=0 time=56 us)
          0   TABLE ACCESS FULL PLAN_TABLE$ (cr=4 pr=0 pw=0 time=43 us)
    EXPLAIN PLAN SET STATEMENT_ID='PLUS8205116' FOR SELECT quoteid, lastexecposttradevenuetype, lastexecqty, matchtype,
           haltreason, buyquoteminsize, meid, lastinstuseralias, boardid,
           userorderid, buymdentryid, indicative, lastinsttype, lastexecprice,
           buyprice, partnerexid, lastinstresult, pricelevelposition,
           lastinstrejectcode, TIMESTAMP, buyqtyfilled, referenceid,
           lastexecboardid, bidtimestamp, tickmovecount, lastexecside,
           offertimestamp, sellprice, participantid, lastexecutioncounterparty,
           lastexecaccountno, sellmdentryid, accountno, buyqty, messagesequence,
           lastexecutionid, lastexeccpclearingagency, sellqty,
           lastexecclearingagency, sellquoteminsize, lastinstfixsequence,
           quotestatus, lastinstmessagesequence, instrumentid, sellqtyfilled,
           lastexecutionrole, lastsettlementcycle
      FROM tibex_quotesbyqsidview
    WHERE participantid = 'NITE'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.01       0.01          0          0          0           0
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 163 
    Rows     Row Source Operation
          0  FILTER  (cr=0 pr=0 pw=0 time=0 us)
          0   HASH GROUP BY (cr=0 pr=0 pw=0 time=0 us)
          0    TABLE ACCESS BY INDEX ROWID TIBEX_QUOTE (cr=0 pr=0 pw=0 time=0 us)
          0     NESTED LOOPS  (cr=0 pr=0 pw=0 time=0 us)
          0      HASH JOIN  (cr=0 pr=0 pw=0 time=0 us)
          0       NESTED LOOPS  (cr=0 pr=0 pw=0 time=0 us)
          0        INDEX UNIQUE SCAN XPKTIBEX_PARTICIPANT (cr=0 pr=0 pw=0 time=0 us)(object id 168573)
          0        TABLE ACCESS FULL TIBEX_QUOTESTATUSENUM (cr=0 pr=0 pw=0 time=0 us)
          0       TABLE ACCESS FULL TIBEX_QUOTE (cr=0 pr=0 pw=0 time=0 us)
          0      INDEX RANGE SCAN IX_QUOTEBOOK (cr=0 pr=0 pw=0 time=0 us)(object id 168590)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       1        0.00          0.00
      SQL*Net message from client                     1        0.00          0.00
    insert into plan_table (statement_id, timestamp, operation, options,
      object_node, object_owner, object_name, object_instance, object_type,
      search_columns, id, parent_id, position, other,optimizer, cost, cardinality,
       bytes, other_tag, partition_start, partition_stop, partition_id,
      distribution, cpu_cost, io_cost, temp_space, access_predicates,
      filter_predicates, projection, time, qblock_name, object_alias, plan_id,
      depth, remarks, other_xml )
    values
    (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21,
      :22,:23,:24,:25,:26,:27,:28,:29,:30,:31,:32,:33,:34,:35,:36)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute     11      0.00       0.03          0          4         16          11
    Fetch        0      0.00       0.00          0          0          0           0
    total       12      0.00       0.03          0          4         16          11
    Misses in library cache during parse: 1
    Misses in library cache during execute: 3
    Optimizer mode: ALL_ROWS
    Parsing user id: 163     (recursive depth: 1)
    SELECT ORA_PLAN_ID_SEQ$.NEXTVAL
    FROM
    DUAL
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          0          0           1
    total        3      0.00       0.00          0          0          0           1
    Misses in library cache during parse: 1
    Optimizer mode: CHOOSE
    Parsing user id: SYS   (recursive depth: 1)
    Rows     Row Source Operation
          1  SEQUENCE  ORA_PLAN_ID_SEQ$ (cr=0 pr=0 pw=0 time=18 us)
          1   FAST DUAL  (cr=0 pr=0 pw=0 time=2 us)
    SELECT PLAN_TABLE_OUTPUT
    FROM
    TABLE(DBMS_XPLAN.DISPLAY('PLAN_TABLE', :1))
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0        117          0           0
    Fetch        2      0.00       0.00          0          0          0          28
    total        4      0.00       0.00          0        117          0          28
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 163 
    Rows     Row Source Operation
         28  COLLECTION ITERATOR PICKLER FETCH DISPLAY (cr=202 pr=0 pw=0 time=19391 us)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      SQL*Net message from client                     2        0.00          0.00
      SQL*Net more data to client                     1        0.00          0.00
    select u.name, o.name, a.interface_version#, o.obj#     
    from
    association$ a, user$ u, obj$ o                     where a.obj# = :1       
                                        and a.property = :2                      
                     and a.statstype# = o.obj#                                and
      u.user# = o.owner#
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          1          0           0
    total        3      0.00       0.00          0          1          0           0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: CHOOSE
    Parsing user id: SYS   (recursive depth: 1)
    Rows     Row Source Operation
          0  NESTED LOOPS  (cr=1 pr=0 pw=0 time=32 us)
          0   NESTED LOOPS  (cr=1 pr=0 pw=0 time=30 us)
          0    TABLE ACCESS BY INDEX ROWID ASSOCIATION$ (cr=1 pr=0 pw=0 time=27 us)
          0     INDEX RANGE SCAN ASSOC1 (cr=1 pr=0 pw=0 time=23 us)(object id 387)
          0    TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 pr=0 pw=0 time=0 us)
          0     INDEX UNIQUE SCAN I_OBJ1 (cr=0 pr=0 pw=0 time=0 us)(object id 36)
          0   TABLE ACCESS CLUSTER USER$ (cr=0 pr=0 pw=0 time=0 us)
          0    INDEX UNIQUE SCAN I_USER# (cr=0 pr=0 pw=0 time=0 us)(object id 11)
    SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE
      NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false')
      NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),:"SYS_B_0"),
      NVL(SUM(C2),:"SYS_B_1")
    FROM
    (SELECT /*+ NO_PARALLEL("PLAN_TABLE") FULL("PLAN_TABLE")
      NO_PARALLEL_INDEX("PLAN_TABLE") */ :"SYS_B_2" AS C1, :"SYS_B_3" AS C2 FROM
      "SYS"."PLAN_TABLE$" "PLAN_TABLE") SAMPLESUB
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        2      0.00       0.00          0          0          0           0
    Execute      2      0.00       0.00          0          0          0           0
    Fetch        2      0.00       0.00          0          8          0           2
    total        6      0.00       0.00          0          8          0           2
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 163     (recursive depth: 2)
    Rows     Row Source Operation
          1  SORT AGGREGATE (cr=4 pr=0 pw=0 time=55 us)
         11   TABLE ACCESS FULL PLAN_TABLE$ (cr=4 pr=0 pw=0 time=44 us)
    select /*+ opt_param('parallel_execution_enabled',
                                       'false') EXEC_FROM_DBMS_XPLAN */ * from PLAN_TABLE where 1=0
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          1          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          1          0           0
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 163     (recursive depth: 1)
    Rows     Row Source Operation
          0  FILTER  (cr=0 pr=0 pw=0 time=1 us)
          0   TABLE ACCESS FULL PLAN_TABLE$ (cr=0 pr=0 pw=0 time=0 us)
    SELECT /*+ opt_param('parallel_execution_enabled', 'false') */
                             /* EXEC_FROM_DBMS_XPLAN */ id, position, depth, operation, options, object_name, cardinality, bytes, temp_space, cost, io_cost, cpu_cost , time, partition_start, partition_stop, object_node, other_tag, distribution, projection, access_predicates, filter_predicates , other, qblock_name, object_alias, nvl(other_xml, remarks), null, null, null, null, null, null, null,
                                null, null, null, null, null,
                                null, null, null, null from PLAN_TABLE where plan_id = (select max(plan_id)
                                            from PLAN_TABLE where id=0  and statement_id = :stmt_id)
                           order by id
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          2          0           0
    Fetch       12      0.00       0.00          0          8          7          11
    total       14      0.00       0.00          0         10          7          11
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 163     (recursive depth: 2)
    Rows     Row Source Operation
         11  SORT ORDER BY (cr=8 pr=0 pw=0 time=239 us)
         11   TABLE ACCESS FULL PLAN_TABLE$ (cr=8 pr=0 pw=0 time=117 us)
          1    SORT AGGREGATE (cr=4 pr=0 pw=0 time=30 us)
          1     TABLE ACCESS FULL PLAN_TABLE$ (cr=4 pr=0 pw=0 time=21 us)
    SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE
      NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false')
      NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),0), NVL(SUM(C2),0)
    FROM
    (SELECT /*+ IGNORE_WHERE_CLAUSE NO_PARALLEL("PLAN_TABLE") FULL("PLAN_TABLE")
      NO_PARALLEL_INDEX("PLAN_TABLE") */ 1 AS C1, CASE WHEN "PLAN_TABLE"."ID"=0
      AND "PLAN_TABLE"."STATEMENT_ID"=:B1 THEN 1 ELSE 0 END AS C2 FROM
      "SYS"."PLAN_TABLE$" "PLAN_TABLE") SAMPLESUB
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          4          0           1
    total        3      0.00       0.00          0          4          0           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 163     (recursive depth: 2)
    Rows     Row Source Operation
          1  SORT AGGREGATE (cr=4 pr=0 pw=0 time=57 us)
         11   TABLE ACCESS FULL PLAN_TABLE$ (cr=4 pr=0 pw=0 time=44 us)
    SELECT PLAN_TABLE_OUTPUT
    FROM
    TABLE(CAST(DBMS_XPLAN.PREPARE_RECORDS(:B1 , :B2 ) AS
      SYS.DBMS_XPLAN_TYPE_TABLE))
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          5          5          28
    total        2      0.00       0.00          0          5          5          28
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 163     (recursive depth: 1)
    SELECT /*+ opt_param('parallel_execution_enabled', 'false') */
      extractvalue(xmlval, '/*/info[@type = "sql_profile"]'), extractvalue(xmlval,
       '/*/info[@type = "outline"]'), extractvalue(xmlval, '/*/info[@type =
      "dynamic_sampling"]'), extractvalue(xmlval, '/*/info[@type =
      "row_shipping"]'), extractvalue(xmlval, '/*/info[@type = "index_size"]'),
      extractvalue(xmlval,'/*/info[@type = "plan_hash"]')
    from
    (select xmltype(:v_other_xml) xmlval from dual)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0        150          0           0
    Fetch        1      0.00       0.00          0         24          0           1
    total        3      0.01       0.01          0        174          0           1
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 163     (recursive depth: 2)
    Rows     Row Source Operation
          1  FAST DUAL  (cr=0 pr=0 pw=0 time=3 us)
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        7      0.01       0.03          0          0          0           0
    Execute      7      0.01       0.04          0        126         16          13
    Fetch        8     21.43      20.94       1125    2405864          0         496
    total       22     21.46      21.02       1125    2405990         16         509
    Misses in library cache during parse: 4
    Misses in library cache during execute: 2
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                      14        0.00          0.00
      SQL*Net message from client                    14        0.01          0.03
      SQL*Net more data to client                    47        0.00          0.00
      direct path write temp                         75        0.00          0.04
      direct path read temp                          75        0.00          0.00
      log file sync                                   1        0.00          0.00
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse       12      0.00       0.00          0          1          0           0
    Execute     23      0.01       0.07          0        156         16          11
    Fetch       22      0.00       0.00          0         58         12          47
    total       57      0.02       0.08          0        215         28          58
    Misses in library cache during parse: 10
    Misses in library cache during execute: 10
       16  user  SQL statements in session.
        4  internal SQL statements in session.
       20  SQL statements in session.
    Trace file: mifex3_ora_2598_mytrace1.trc
    Trace file compatibility: 10.01.00
    Sort options: default
           4  sessions in tracefile.
          35  user  SQL statements in trace file.
           9  internal SQL statements in trace file.
          20  SQL statements in trace file.
          16  unique SQL statements in trace file.
         493  lines in trace file.
          21  elapsed seconds in trace file.

Maybe you are looking for

  • Alternative for keyword SUM

    Hello experts, My code is like below.... Loop at itab into wa. at new WERKS. SUM. endat. endloop. Our CLNT standards doesn't allow to use keyword SUM. any alternative solution for kewword SUM ? pls provide suggestions.......... Thanks in adavnce. Zak

  • Can any body please help me

    Hi all, I have got a microstar MS 6340 ver 1 motherboard and i tried installing a PCI 32m nvida graphics card under windows xp. when ever i turn the PC on, i get no screen and the machine keeps beeping. the motherboard has an onboard graphice card bu

  • Adding a button by clicking on a "Add button" button

    Hi, I want to add dynamically button controls on my application. These buttons will be created when the user click on a "Add button" button. What command should I use to get that result ? Using <mx:button...> into the [[CDATA... doesn't work and all

  • Write optimized parallel loads ?

    Hello BI gurus, Is parallel loads possible for write optimized ODS ? if possible what are the limitations of it. Please let me know your opinion. Thanks in advance, BWer

  • Re: NoClassDefFoundError

    This is a classpath problem.           Please try following,           C:\BEA\wlserver6.0\config\examples>java -classpath           C:\BEA\wlserver6.0\lib\weblogic.j           ar weblogic.jspc           It should work.           "stephen zeng" <[emai