Missing Expression Error When Case Statment is used as field

I have tried to write an expression that will calculate how many days ago a request was submitted and return a user defined value if the calculation falls within the criteria in the case statment. The SQL View for the Query I am using is shown below:
SELECT A.F_POSN_REQUEST_ID, A.F_REQ_ECP_STATUS, TO_CHAR(A.REQUEST_DTTM,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ECP_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'), TO_CHAR(A.F_REQ_ECP_PROC_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'), CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI'))>60 THEN '>60' ELSE(CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI')) >30 AND <=60 THEN '30 - 60' ELSE(CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI'))>=15 AND <=30 THEN '15 - 30' ELSE(CASE WHEN(sysdate - TO_DATE(SUBSTR( TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),1,16),'YYYY-MM-DD-HH24.MI'))<15 THEN 'Less Than 15' ELSE NULL END)END)END)END))
  FROM PS_F_POSN_REQUEST A
  WHERE A.F_REQ_ECP_STATUS IN ('I','O','P')
  GROUP BY  A.F_POSN_REQUEST_ID,  A.F_REQ_ECP_STATUS,  TO_CHAR(A.REQUEST_DTTM,'YYYY-MM-DD-HH24.MI.SS."000000"'),  TO_CHAR(A.F_REQ_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),  TO_CHAR(A.F_REQ_ECP_ST_DT,'YYYY-MM-DD-HH24.MI.SS."000000"'),  TO_CHAR(A.F_REQ_ECP_PROC_DT,'YYYY-MM-DD-HH24.MI.SS."000000"')When I try to run the query I get Message=ORA-00936: missing expression (50,380)
Any suggestions you could provide to help me clear this error would be greatly appreciated.
Edited by: 992737 on Mar 8, 2013 9:07 AM

Hi,
Welcome to the forum!
I think you want something like this:
CASE
    WHEN  a.f_req_st_dt < TRUNC (SYSDATE) - 60  THEN  '>60'
    WHEN  a.f_req_st_dt < TRUNC (SYSDATE) - 30  THEN  '30.1-60'
    WHEN  a.f_req_st_dt < TRUNC (SYSDATE) - 15  THEN  '15.1-30'
    WHEN  a.f_req_st_dt < TRUNC (SYSDATE)       THEN  '15 or less'
ENDNested CASE expressions aren't needed very much. Each WHEN clause is evaluated only if all the ealier ones have failed. For example, when testing to see if a row is in the 301.-60 range above (that is, the 2nd WHEN clause), there's no need to see if the difference is greater than or equal to 60; it wouldn't be evaluating that clause if the 1st WHEN condition was TRUE.
This assumes that a.f_req_st_dt is a TIMESTAMP or DATE; either datatype can be compared with DATEs, such as SYSDATE-60, so there's no need to conevert them to strings, and then convert them back into DATEs.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Simplify the problem as much as possible. Show only the parts that you don't already know how to do.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ {message:id=9360002}
Never write, let alone post, unformatted code. Indent the code to show the exent and structure of clauses (SELECT, FROM, etc.), and complex expressions (such as CASE). The forum FAQ explains how to use \ tags when posting formatted text on this site.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • ORA-00054 error when loading Oracle table using Data Services

    Hello,
    we are facing ORA-00054 error when loading Oracle table using BO Data services
    (Oracle 10g database, BODS Xi 3.2 SP3)
    Test Job performs
    1- truncate table
    2- load table (tested in standard and bulk load modes)
    Scenario when issue happens is:
    1- Run loading Job
    2- Job end in error for any Oracle data base error
    3- When re-running the same Job, Job fails with following error
         ORA-00054: resource busy and acquire with NOWAIT specified
    It seems after first failure, Oracle session for loading the table stays active and locks the table.
    To be able to rerun the Job, we are forced need to kill Oracle session manually to be able to run the Job again.
    Expected behaviour would be : on error rollback modifications made on table and BODS stops Oracle session in a clean way.
    Can somebody tell me / or point me to any BODS best practice about Oracle error handling to prevent such case?
    Thanks in advance
    Paul-Marie

    the ora-0054 can occure depending how the job failed before. If this occures you will need the DBA to release the lock on the table in question
    Or
           AL_Engine.exe on The server it creates the Lock. Need to Kill Them. Or stop it..
    This Problem Occurs when we select The Bulkloading Option in orclae  We also faced the same issue,Our admin has Killed the session. Then everything alright.

  • ORA-00936:missing expression Error

    I have what I would think was a simple SQL for Excel; but for some reason I keep getting the ORA-00936 missing expression error message.
    The SELECT AND FROM of the SQL are no problem. It's the Where portion of the SQL statement where it messes up. I have many user input required parameters. But I tested out the same SQL statement in Toad for Oracle and it worked fine.
    I'm wondering at this point if it's just too much for Excel.
    Here's the code from the "Where" portion of the SQL that worked in Toad for Oracle. I believe I have to change some of the syntax to get it to work in Excel; and I'm wondering if anyone knows the true correct way to do this. Because I'm also wondering if that's where I'm going wrong.
    Anyway, here's the code:
    WHERE (    (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= :date1
                 AND a_compl_summary.entry_date <= :date2
            AND (   a_compl_summary.product_family LIKE :pf1
                 OR a_compl_summary.product_family LIKE :pf2
                 OR a_compl_summary.product_family LIKE :pf3
                 OR a_compl_summary.product_family LIKE :pf4
                 OR a_compl_summary.product_family LIKE :pf5
            AND (a_compl_summary.region = :r1)
            AND (   a_compl_summary.NAME = :c1
                 OR a_compl_summary.NAME = :c2
                 OR a_compl_summary.NAME = :c3
                 OR a_compl_summary.NAME = :c4
                 OR a_compl_summary.NAME = :c5
            AND (a_compl_summary.complaint = :yorn)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl1
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl2
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl3
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl4
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl5
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
                                                                              :dc1
            AND (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
           )

    But are the ":parameter1" okay, or do I need to change the syntax for Excel?
    Because when I change the[b] :parameter to just a ? it ends up working to a degree. When I have too many parameters Excel ends up bailing on me with a Debug, Send Error Report box popping up.

  • ORA-00936 Missing expression - error in composite statement

    I'm using the following statement to call a function which uses a number retrieved from a table i.e.
    SELECT GETNEXTBUSINESSDATE(TO_DATE('28/08/2003','dd/mm/yyyy'), TO_NUMBER(SELECT VALUE1 FROM PARAMETERS WHERE PARCODE = 'CCR1' AND ATTRIBUTE1 = 'CCRNRQST1')) FROM DUAL;
    The function adds the value store in the value1 field to a date to get the next buisness date. The above statement is giving me an ORA-00936 Missing expression error message.
    Can anybody help ?

    We can't pass a query as a parameter.
    You'll have to write a function that accepts PARCODE and ATTRIBUTE1 as parameters, or figure some other way of getting the value.
    As I typed that, it occurred to me that this might work:
    SELECT GETNEXTBUSINESSDATE(TO_DATE('28/08/2003','dd/mm/yyyy')
          , x.val1)
    FROM ( SELECT TO_NUMBER(VALUE1) as val1
           FROM   PARAMETERS
           WHERE PARCODE = 'CCR1'
           AND ATTRIBUTE1 = 'CCRNRQST1') x;I'm not guaranteeing anything as I've never tried running a function from an in-line view.
    Cheers, APC

  • "Missing Class" error when running web service

    Hi,
    I am getting an "Missing Class" error when running a web service. The web service was generated from a Java class via the "create J2EE web service" option.
    The web service has a JAX-RPC handler class added, which belongs to the same package as a logging class. The logging class is used to write to a file for debug purposes. A "missing class" error is being generated whenever I attempt to invoke the web service (via the enterprise manager test util), the error refers to the logging class which is used by the main handler class. The JAX-RPC handler works fine by itself, the error is only seen when I attempt to use the logging class.
    I have re-built, re-deployed from scratch again, but still get the same error! Am I missing something simple here?
    thanks for any advice

    Cant you paste some of your code, formatted in code tags? It looks like there is a problem passing some of the XMl response, it doesnt like a tag html.
    If you post some code somebody might actually be able to help you.

  • Error when working with TableView using JCA

    Hi sdns,
    I am getting an iview rutnime error when working with Tableview using JCA. Here i am putting all my code, go thorugh it and tell me if any error is there.One more thing is Usermappping and all properties are set to system object.
    Now you can throught he code which is followed by error also.
    <u>Java file.</u>
    public class DisplayComponent extends PageProcessorComponent {
         public DynPage getPage() {
              return new DisplayComponentDynPage();
         public static class DisplayComponentDynPage extends JSPDynPage {
              private JCATviewBean bean;
              public void doInitialization() {
                   IPortalComponentProfile profile =
                        ((IPortalComponentRequest) getRequest())
                             .getComponentContext()
                             .getProfile();
                   Object o = profile.getValue("myBean");
                   if (o == null || !(o instanceof JCATviewBean)) {
                        bean = new JCATviewBean();
                        profile.putValue("myBean", bean);
                   } else {
                        bean = (JCATviewBean) o;
                   // fill your bean with data here...
                   IPortalComponentRequest request =
                        (IPortalComponentRequest) this.getRequest();
                   doJca(request);
              public void doProcessAfterInput() throws PageException {
              public void doProcessBeforeOutput() throws PageException {
                   this.setJspName("Report.jsp");
              private IConnection getConnection(
                   IPortalComponentRequest request,
                   String alias)
                   throws Exception {
                   IConnectorGatewayService cgService =
                        (IConnectorGatewayService) PortalRuntime
                             .getRuntimeResources()
                             .getService(
                             IConnectorService.KEY);
                   ConnectionProperties prop =
                        new ConnectionProperties(
                             request.getLocale(),
                             request.getUser());
                   return cgService.getConnection(alias, prop);
              public void doJca(IPortalComponentRequest request) {
                   IConnectionFactory connectionFactory = null;
                   IConnection client = null;
                   String rfm_name = "BAPI_COMPANYCODE_GETLIST";
                   try {
                        try {
                             //       pass the request & system alias
                             //       Change the alias to whatever the alias is for your R/3 system
                             client = getConnection(request, "MyIDES");
                        } catch (Exception e) {
                             System.out.println(
                                  "Couldn't establish a connection with a target system.");
                             return;
    Start Interaction
                        IInteraction interaction = client.createInteractionEx();
                        IInteractionSpec interactionSpec =
                             interaction.getInteractionSpec();
                        interactionSpec.setPropertyValue("Name", rfm_name);
    CCI api only has one datatype: Record
                        RecordFactory recordFactory = interaction.getRecordFactory();
                        MappedRecord importParams =
                             recordFactory.createMappedRecord(
                                  "CONTAINER_OF_IMPORT_PARAMS");
                        IFunctionsMetaData functionsMetaData =
                             client.getFunctionsMetaData();
                        IFunction function = functionsMetaData.getFunction(rfm_name);
                        if (function == null) {
                             System.out.println(
                                  "Couldn't find " + rfm_name + " in a target system.");
                             return;
    How to invoke Function modules
                        System.out.println("Invoking... " + function.getName());
                        MappedRecord exportParams =
                             (MappedRecord) interaction.execute(
                                  interactionSpec,
                                  importParams);
    How to get structure values
                        IRecord exportStructure = (IRecord) exportParams.get("RETURN");
                        String columnOne = exportStructure.getString("TYPE");
                        String columnTwo = exportStructure.getString("CODE");
                        String columnThree = exportStructure.getString("MESSAGE");
                        System.out.println("  RETURN-TYPE    = " + columnOne);
                        System.out.println("  RETURN-CODE    = " + columnTwo);
                        System.out.println("  RETURN-MESSAGE =" + columnThree);
    How to get table values
                        IRecordSet exportTable =
                             (IRecordSet) exportParams.get("COMPANYCODE_LIST");
                        exportTable.beforeFirst();
                        // Moves the cursor before the first row.
                        while (exportTable.next()) {
                             String column_1 = exportTable.getString("COMP_CODE");
                             String column_2 = exportTable.getString("COMP_NAME");
                             System.out.println(
                                  "  COMPANYCODE_LIST-COMP_CODE = " + column_1);
                             System.out.println(
                                  "  COMPANYCODE_LIST-COMP_NAME = " + column_2);
                        //       create the tableview mode in the bean
                        bean.createData(exportTable);
    Closing the connection
                        client.close();
                   } catch (ConnectorException e) {
                        //       app.putValue("error", e);
                        System.out.println("Caught an exception: \n" + e);
                   } catch (Exception e) {
                        System.out.println("Caught an exception: \n" + e);
    <u>Bena file</u>
    package com.sap.JCA.bean;
    import java.util.Vector;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    import com.sapportals.htmlb.table.TableViewModel;
    public class JCATviewBean {
         public DefaultTableViewModel model;
         public TableViewModel getModel() {
         return this.model;
         public void setModel(DefaultTableViewModel model) {
         this.model = model;
         public void createData(IRecordSet table) {
    //       this is your column names
         Vector column = new Vector();
         column.addElement("Company Code");
         column.addElement("Company Name");
    //       all this logic is for the data part.
         Vector rVector = new Vector();
         try {
         table.beforeFirst();
         while (table.next()) {
         Vector data = new Vector();
         data.addElement(table.getString("COMP_CODE"));
         data.addElement(table.getString("COMP_NAME"));
         rVector.addElement(data);
         } catch (Exception e) {
         e.printStackTrace();
    //       this is where you create the model
         this.setModel(new DefaultTableViewModel(rVector, column));
    <b>JSP File:</b>
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <jsp:useBean id="myBean" scope="application" class="com.sap.JCA.bean.JCATviewBean" />
    <hbj:content id="myContext" >
      <hbj:page title="PageTitle">
       <hbj:form id="myFormId" >
       <br>
       <hbj:textView id = "tv1" text = "<b>TableView Example Using JCA</b> <br>"/>
    <hbj:tableView
        id="myTableView1"
        model="myBean.model"
        design="ALTERNATING"
        headerVisible="true"
        footerVisible="true"
        fillUpEmptyRows="true"
        navigationMode="BYLINE"
        selectionMode="MULTISELECT"
        headerText="TableView example1"
        visibleFirstRow="1"
        visibleRowCount="30"
        width="500 px"
        />
       </hbj:form>
      </hbj:page>
    </hbj:content>
    <b>Error when Executing this component:</b><u></u>
      Portal Runtime Error
    <b>An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    com/sapportals/portal/htmlb/page/PageProcessorComponent.
    Exception id: 12:21_28/10/05_0173_94105150
    See the details for the exception ID in the log file</b>  
    If anybody find the error please reply to this post.
    Regards,
    sireesha.

    Thanks for your response Martin,
    I have already seen the log file but im couldn't findout anything from that since it is so long here im putting some part of please see this.if u able to find it clarify me,
    <b>Here the log file:</b>
    1.5#001321FD6213005D0000907100001CB000040419258FBF4E#1130405957843#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907200001CB00004041925916735#1130405957953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907300001CB0000404192591688D#1130405957953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
    #1.5#001321FD621300650000120E00001CB00004041925C953D7#1130405961625#com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory##com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory.XIManagedConnectionFactoryController.run()######04d7f690469311da8d52001321fd6213#Thread[Thread-114,5,SAPEngine_System_Thread[impl:5]_Group]##0#0#Debug#1#/Applications/ExchangeInfrastructure/AdapterFramework/ThirdPartyRoot/comsap/Server/Adapter Framework#Java###MCF with GUID is running. (,)#3#964bfca0444711dabb51001321fd6213#com.sap.engine.services.deploy.server.ApplicationLoader@1586c77#964bfca0444711dabb51001321fd6213#
    #1.5#001321FD6213005D0000907400001CB000040419275B24FC#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
    #1.5#001321FD6213005D0000907500001CB000040419275B25D9#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907600001CB000040419275B2E27#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907700001CB000040419275B2EFA#1130405987953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
    #1.5#001321FD6213005D0000907800001CB0000404192924ED59#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
    #1.5#001321FD6213005D0000907900001CB0000404192924EE36#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907A00001CB0000404192924F652#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907B00001CB0000404192924F710#1130406017953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#
    #1.5#001321FD621300650000120F00001CB000040419295CCD8B#1130406021625#com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory##com.sap.aii.af.sample.adapter.ra.SPIManagedConnectionFactory.XIManagedConnectionFactoryController.run()######04d7f690469311da8d52001321fd6213#Thread[Thread-114,5,SAPEngine_System_Thread[impl:5]_Group]##0#0#Debug#1#/Applications/ExchangeInfrastructure/AdapterFramework/ThirdPartyRoot/comsap/Server/Adapter Framework#Java###MCF with GUID is running. (,)#3#964bfca0444711dabb51001321fd6213#com.sap.engine.services.deploy.server.ApplicationLoader@1586c77#964bfca0444711dabb51001321fd6213#
    #1.5#001321FD6213005D0000907C00001CB0000404192AEEB1E2#1130406047953#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###within the infinite of the Scheduler Thread#
    #1.5#001321FD6213005D0000907D00001CB0000404192AEEB2C0#1130406047953#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.persistence.jdo.DataBaseJobStore#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler/JobStore#Plain###With in the acquireLockForNextAvailableJob DataStore#
    #1.5#001321FD6213005D0000907E00001CB0000404192AEEBAD8#1130406047968#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Acquired the job null#
    #1.5#001321FD6213005D0000907F00001CB0000404192AEEBB9E#1130406047968#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#sap.com/crm.trexr3#trexr3.com.sapmarkets.isa.services.schedulerservice.SchedulerThread#J2EE_ADMIN#530##obtdev3_O09_94105150#Guest#8a2bbd20444711da932c001321fd6213#Thread[SchedulerThread,5,SAPEngine_Application_Thread[impl:3]_Group]##0#0#Info#1#/System/Scheduler#Plain###Did not find any job.So, Waiting for sometime for the next job#

  • Missing Expression error in query...

    Hi,
    SELECT DECODE(NAME, '~', '', NAME),
           DECODE(NAME_2, '~', '', NAME_2),
           DECODE(SALES_ORG_ID, '~', '', SALES_ORG_ID),
           DECODE(PARTNER_ID, '~', '', PARTNER_ID)
    FROM DMN_SALES_PARTNER
    WHERE (
                        (upper(trim(country_name)),(trim(state_id))) IN
                       SELECT DISTINCT upper(trim(scsm.country_name)),upper(trim  (scsm.state_name))
               FROM sop_region_country_map srsm, sop_user_map   smap,sop_country_state_map scsm
               WHERE SSO_ID = '&sso_id' AND
               upper(trim(smap.region_id)) = upper(trim(srsm.region_id)) AND
               upper(trim(srsm.country_name)) = upper(trim(scsm.country_name)) AND
               decode(upper(trim(srsm.state_name)),NULL,'~',upper(trim(srsm.state_name)) ) = upper(trim(scsm.state_name))
               AND deviation_from_sap = 'N'
              OR
               SELECT upper(trim(scsm.country_name)),upper(trim(scsm.state_name))
               FROM sop_country_state_map scsm
               WHERE (upper(trim(scsm.country_name)),scsm.sap_state_map_id) in (
               select upper(trim(scssm.country_name)),scssm.sap_state_map_id
               from sop_country_state_sap_mapping scssm )
              )I want to return the combination of country_name and state_name from any of the queries in OR clause so as to compare them with the country_name and state_id of main query..I have written the above query for it but its giving me "Missing Expression" error..
    Pls help..
    Thx
    JP

    JP,
    Your second part after the "OR" is just a SQL statement and it is not being compared to an expression. That's probably what the error message is telling you.
    Regards,
    Rob.

  • TS4020 I get "server error" when I try to use icloud on my Windows 7 pc

    I get "server error" when I try to use icloud.1 on my Windows 7 pc
    How do I resolve this problem?

    Hi doggywag,
    Yes, you must have an iOS device or a Mac to create an iCloud account.
    Cheers,
    GB

  • Error when I try to use the XMLElement(), XMLForest(), etc functions?

    I'm getting an "invalid column name" error when I try to use the xmlelement() function (and the like). Is this function only available on 9i Release 2? How do I find the SQLX functions and/or load them up for use? Hopefully someone will see this as a quick question and answer it for me!
    Cheers,
    Fish

    Reply
    Sorry. These are not loadable they are core database functionality only available with 9.2.0.1.0 and later..

  • ORA-01740: missing quotes error when synchronizing mobilink

    Hi,
    I'm getting a missing quotes error when synchronizing with mobilink.
    followed by
    [-10058] Unable to open download_delete_cursor
    and the name of the table.
    and name of the script
    Script: {CALL "scriptversion".DOWNLOAD_DELETE_CURSOR_ABC (?, ?)}
    How can I see what is causing this... I already checked the script for that table in the ml_scripts table.... nothing special there... the script looks exactly the same as in previous versions....
    I'm assuming that it's the parameters that are creating the problem. but no idea on how to see them...
    any suggestions?
    thank you !

    Hi,
    thanks for your tip. I just did that and get a LOT of logging.
    Not sure if my employer would appreciate me sharing DB details in public.
    In private messaging I could send it through, but i guess that wouldn't help others with the same issue..
    i also changed the startup parameters to -vt -o
    And this is the result that I get (I modified scriptpackage name and cursorname a litle bit):
    I'm guessing that  : p1  and : p2 is incorrect as parameter....and the complaints come from there..
    Also, this time I ran another publication and now it's complaining on the newly added table and not on that random old table I mentioned on my previous post.
    PS. error message is in dutch since the server is in dutch, but it's the missing quotes issue.
    I. 2014-03-31 15:36:26. <1> COMMIT Transaction: prepare_for_download
    I. 2014-03-31 15:36:26. <1> Translated SQL:
                            CALL "scriptversion".DOWNLOAD_DELETE_CURSOR_ABC (:p1, :p2)
    E. 2014-03-31 15:36:26. <1> [-10002] Consolidated database server or ODBC error:  ODBC: [Sybase][iAnywhere Solutions - Oracle][Oracle]ORA-01740: Ontbrekend dubbele aanhalingsteken in identificatiesymbool.
                            ORA-01740: Ontbrekend dubbele aanhalingsteken in identificatiesymbool.
                             (ODBC State = 42000, Native error code = 1740)
    E. 2014-03-31 15:36:26. <1> [-10002] Consolidated database server or ODBC error:  ODBC: [Sybase][iAnywhere Solutions - Oracle][Oracle]ORA-01740: Ontbrekend dubbele aanhalingsteken in identificatiesymbool.
                            ORA-01740: Ontbrekend dubbele aanhalingsteken in identificatiesymbool.
                             (ODBC State = 42000, Native error code = 1740)
    E. 2014-03-31 15:36:26. <1> [-10058] Unable to open download_delete_cursor
    I. 2014-03-31 15:36:26. <1> Error Context:
    I. 2014-03-31 15:36:26. <1> Remote ID: c44a5403-74ba-4c98-bf6d-4e1db5fb24c9
    I. 2014-03-31 15:36:26. <1> User Name: USR:66ed647c-20b1-4cff-9663-8147b0e7e2fd
    I. 2014-03-31 15:36:26. <1> Modified User Name: USR:66ed647c-20b1-4cff-9663-8147b0e7e2fd
    I. 2014-03-31 15:36:26. <1> Transaction: download
    I. 2014-03-31 15:36:26. <1> Table Name: MY_NEWLY_ADDED_TABLE
    I. 2014-03-31 15:36:26. <1> Script Version: scriptversion
    I. 2014-03-31 15:36:26. <1> Script: {CALL "scriptversion".DOWNLOAD_DELETE_CURSOR_ABC (?, ?)}
    I. 2014-03-31 15:36:26. <1> End of Error Context
    I. 2014-03-31 15:36:26. <1> ROLLBACK Transaction: end_download
    I. 2014-03-31 15:36:26. <1> ROLLBACK Transaction: end_synchronization

  • Missing expression Error using pivot function

    Hi,
    When i am running the query:
    The query needs to display name and total:
    {select  *}
    {  from  (select name,nvl(sal,0) tot from tablea }
    {                          GROUP BY name,nvl(sal,0) }
    {  pivot(SUM(tot) for name in (select ltrim(sys_connect_by_path(''''||name||'''', ','), ',') str}
    {from ( select row_number() over(order by name) rn}
    {       ,      name}
    {       from  tablea}
    {where connect_by_isleaf=1}
    {start with rn=1}
    {connect by rn=prior rn+1);}
    When running the above query its giving error:
    ORA-00936: missing expression at line select ltrim(sys_connect_by_path
    Any help will be needful for me

    If you use pivot, you have to hardcode all your values in the FOR IN clause.
    SQL> select *
      2   from (select ename,nvl(sal,0) tot from emp
      3   GROUP BY ename,nvl(sal,0)
      4   )
      5   pivot(SUM(tot) for ename in ( 'SCOTT' ,'KING') )
      6  ;
       'SCOTT'     'KING'
          3000       5000You can't substitute the literal list of values (in my example ('SCOTT','KING') with a subquery producing similar result.
    Only with pivot xml you can put there a subquery, in that case, the result however doesn't have to be in form of comma separated values (like you try to achieve with sys_connect_by_path)
    SQL> select *
      2   from (select ename,nvl(sal,0) tot from emp
      3   GROUP BY ename,nvl(sal,0)
      4   )
      5   pivot xml (SUM(tot) for ename in ( select ename from emp where ename like 'S%' ) )
      6  ;
    ENAME_XML
    <PivotSet><item><column name = "ENAME">SCOTT</column><column name = "SUM(TOT)">3000</column></item><
    item><column name = "ENAME">SMITH</column><column name = "SUM(TOT)">800</column></item></PivotSet>Best regards
    Maxim

  • "not a GROUP BY expression" error when using EclipseLink

    I'm using EcliseLink 2.3.0
    The follow SQL can be executed successfully.
    select to_char(o.taskDate, 'YYYY/MM'), sum(o.plannedHrs) from TaskItem o group by to_char(o.taskDate, 'YYYY/MM');
    But the JPQL has an error when it gets excuted.
    select FUNC('to_char', o.taskDate, 'YYYY/MM'), sum(o.plannedHrs) from TaskItem o group by FUNC('to_char', o.taskDate, 'YYYY/MM')
    ERROR LOG:
    Local Exception Stack:
    Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00979: not a GROUP BY expression
    Error Code: 979
    Call: SELECT to_char(TASK_DATE, ?), SUM(PLANNED_HRS) FROM ORA47111.S_PROJ_PLAN_ITEM GROUP BY to_char(TASK_DATE, ?)
         bind => [2 parameters bound]
    Query: ReportQuery(referenceClass=TaskItemDAO sql="SELECT to_char(TASK_DATE, ?), SUM(PLANNED_HRS) FROM ORA47111.S_PROJ_PLAN_ITEM GROUP BY to_char(TASK_DATE, ?)")
         at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:644)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:535)
         at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:1702)
         at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:566)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:207)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:264)
         at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:646)
         at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2592)
         at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllReportQueryRows(ExpressionQueryMechanism.java:2535)
         at org.eclipse.persistence.queries.ReportQuery.executeDatabaseQuery(ReportQuery.java:846)
         at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:829)
         at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1056)
         at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:390)
         at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1144)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2863)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1501)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1483)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1457)
         at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:485)
         at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:742)
         at projapis.projrollup.beans.ManagedTaskItemDAOBean.calcResourcePlannedHrsInMonth(ManagedTaskItemDAOBean.java:329)
         at projapis.projrollup.beans.ManagedTaskItemDAOBean.main(ManagedTaskItemDAOBean.java:522)
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00979: not a GROUP BY expression
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:931)
         at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:607)
         ... 22 more
    Any suggestion?
    Thanks a lot.
    Edited by: sgao on Jul 19, 2011 11:13 PM

    Hello,
    Unfortunately it is the driver complaining about the SQL that is generated, but I see no major difference from the SQL in the exception:
    SELECT to_char(TASK_DATE, ?), SUM(PLANNED_HRS) FROM ORA47111.S_PROJ_PLAN_ITEM GROUP BY to_char(TASK_DATE, ?)
    and the SQL you state works other than it looks like JPQL not SQL: select to_char(o.taskDate, 'YYYY/MM'), sum(o.plannedHrs) from TaskItem o group by to_char(o.taskDate, 'YYYY/MM');
    Does it work if the SQL in the exception is executed as a native query? Since this the driver complaining about what looks correct, I would look at the driver/database versions to see if there is a later version that might have a bug that has been fixed.
    Best Regards,
    Chris

  • Missing File error when trying to install HP 5610xi using Windows 7 64 bit download

    I have tried several times to download and install the software and drivers for my old 5610xi on my new computer running Windows 7 Home Premium 64-bit OS. I keep getting a "missing file" message when trying to run the download, and it will not install. Can someone please help!?!?

    Hi computeir, sorry to hear that you are having issues with getting your printer installed on to your computer. If you are connecting the printer to the computer with a usb cable, please remove it from the printer and the computer and set it aside. Please click the link I have provided for the HP Printer Install Wizard for Windows.
    The installation will prompt you as to when to connect the usb cable. If you are still having issues, please feel free to write back.
    Thank you.
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • Pivot function and Missing expression error

    select * from (
    select T.PAT_MRN_ID, T.ABBREVIATION,CONCEPT_VALUE from TBL_WORKLFOw T
    pivot
    max(concept_value)
    for ABBREVIATION in (select ABBREVIATION from TBL_WORKLFOW )
    this query is throwing "missing expression"..error.
    Can some one help figuring out the problem.

    Hi, Parth,
    Parth Divekar wrote:
    So your suggestion is to have it in a procedure ...form a dynamic sql using values from query and then execute the sql..That's one thing you can do.
    You might also look into string aggregation, where you have one gargantuan column containing all the pivoted data from all the abbreviatons, no matter how many there are. That big column can be formatted so that it looks like several distinct columns.
    Assuming dynamic SQL is the best answer, I find it easier to do in SQL*Plus, using files or substitution variables, as shown below. That's just my preference; you may like PL/SQL better.
    How to Pivot a Table with a Dynamic Number of Columns
    This works in any version of Oracle
    The "SELECT ... PIVOT" feature introduced in Oracle 11
    is much better for producing XML output.
    Say you want to make a cross-tab output of
    the scott.emp table.
    Each row will represent a department.
    There will be a separate column for each job.
    Each cell will contain the number of employees in
         a specific department having a specific job.
    The exact same solution must work with any number
    of departments and columns.
    (Within reason: there's no guarantee this will work if you
    want 2000 columns.)
    Case 0 "Basic Pivot" shows how you might hard-code three
    job types, which is exactly what you DON'T want to do.
    Case 1 "Dynamic Pivot" shows how get the right results
    dynamically, using SQL*Plus. 
    (This can be easily adapted to PL/SQL or other tools.)
    PROMPT     ==========  0. Basic Pivot  ==========
    SELECT     deptno
    ,     COUNT (CASE WHEN job = 'ANALYST'  THEN 1 END)     AS analyst_cnt
    ,     COUNT (CASE WHEN job = 'CLERK'    THEN 1 END)     AS clerk_cnt
    ,     COUNT (CASE WHEN job = 'SALESMAN' THEN 1 END)     AS salesman_cnt
    FROM     scott.emp
    WHERE     job     IN ('ANALYST', 'CLERK', 'SALESMAN')
    GROUP BY     deptno
    ORDER BY     deptno
    PROMPT     ==========  1. Dynamic Pivot using Script  ==========
    --     *****  Start of dynamic_pivot.sql  *****
    -- Suppress SQL*Plus features that interfere with raw output
    SET     FEEDBACK     OFF
    SET     PAGESIZE     0
    SPOOL     p:\sql\cookbook\dynamic_pivot_subscript.sql
    SELECT     DISTINCT
         ',     COUNT (CASE WHEN job = '''
    ||     job
    ||     ''' '     AS txt1
    ,     'THEN 1 END)     AS '
    ||     job
    ||     '_CNT'     AS txt2
    FROM     scott.emp
    ORDER BY     txt1;
    SPOOL     OFF
    -- Restore SQL*Plus features suppressed earlier
    SET     FEEDBACK     ON
    SET     PAGESIZE     50
    SPOOL     p:\sql\cookbook\dynamic_pivot.lst
    SELECT     deptno
    @@dynamic_pivot_subscript
    FROM     scott.emp
    GROUP BY     deptno
    ORDER BY     deptno
    SPOOL     OFF
    --     *****  End of dynamic_pivot.sql  *****
    EXPLANATION:
    The basic pivot assumes you know the number of distinct jobs,
    and the name of each one.  If you do, then writing a pivot query
    is simply a matter of writing the correct number of ", COUNT ... AS ..."\
    lines, with the name entered in two places on each one.  That is easily
    done by a preliminary query, which uses SPOOL to write a sub-script
    (called dynamic_pivot_subscript.sql in this example).
    The main script invokes this sub-script at the proper point.
    In practice, .SQL scripts usually contain one or more complete
    statements, but there's nothing that says they have to.
    This one contains just a fragment from the middle of a SELECT statement.
    Before creating the sub-script, turn off SQL*Plus features that are
    designed to help humans read the output (such as headings and
    feedback messages like "7 rows selected.", since we do not want these
    to appear in the sub-script.
    Turn these features on again before running the main query.
    PROMPT     ==========  2. Dynamic Pivot using Substitution Variable  ==========
    --     *****  Preliminary Query:  *****
    COLUMN     sql_txt_col     NEW_VALUE     sql_txt
    WITH     all_jobs     AS
         SELECT DISTINCT
              job
         ,     DENSE_RANK () OVER (ORDER BY job)     AS r_num
         FROM     scott.emp
    SELECT     SYS_CONNECT_BY_PATH ( job || '''     THEN 1 END) AS '
                          || job
                          || '_CNT'
                          || CHR (10)               -- Newline, for legibility only
                       , ', COUNT (CASE WHEN job = '''     -- Delimiter, goes before each entry
                       )                                       AS sql_txt_col
    FROM     all_jobs
    WHERE     CONNECT_BY_ISLEAF     = 1
    START WITH     r_num = 1
    CONNECT BY     r_num = PRIOR r_num + 1
    --     *****  Main Query  *****
    SELECT     deptno
    &sql_txt     -- Ends with newline, so occupy that line
    FROM     scott.emp
    GROUP BY     deptno
    ORDER BY     deptno
    EXPLANATION:
    Using a substitution variable is very similar to using a script.
    The main difference is that the output of the preliminary query has to
    go into one row.  This is done with SYS_CONNECT_BY_PATH, and getting
    that requires that the jobs be numbered with consecutive integers, 1, 2, 3, ...
    which we get from DENSE_RANK.
    The NEWLINE character was added just to make the output line easier
    to read during debugging.
    */

  • ORA-0907 error when querying XMLDB Table using XMLExists

    Hi All,
    Get ORA-00907 error when trying to use XMLExists:
    SELECT *
    FROM tnmab_agreement_xml_binary A
    WHERE
    ( XMLExists('declare default element namespace "http://com.oocl.schema.tnm.agreementbuilder"; $XML/Agreement/ShippingPartyGroups/ShippingParties/CustomerHolder[SAP_ID="$ARG"]')
    passing agreements.AGREEMENT_XML as "XML", '5000003001' as "ARG")
    OR
    ( XMLExists('declare default element namespace "http://com.oocl.schema.tnm.agreementbuilder"; $XML/Agreement/NamedCustomerGroups/NamedCustomer/SAP_IDs/StringWrappers[Value="$ARG"]')
    passing agreements.AGREEMENT_XML as "XML", '5000003001' as "ARG")
    ORA-00907: missing right parenthesis
    *00907. 00000 - "missing right parenthesis"*
    **Cause:*
    **Action:*
    Error at Line: 6 Column: 176
    Any help is appreciated
    Thanks
    Auro

    XMLExists('declare default element namespace "http://com.oocl.schema.tnm.agreementbuilder"; $XML/Agreement/ShippingPartyGroups/ShippingParties/CustomerHolder[SAP_ID="$ARG"]'
    passing agreements.AGREEMENT_XML as "XML", '5000003001' as "ARG")no ')' after the closing quote

Maybe you are looking for

  • PDF files not getting generated

    Hi friends, Through our application we are generating PDF to network location. Suddenly it stoped from last month. I am not able to trace exact problem. forms version 6i we are using. PROCEDURE P_PRINT_GRN                                    (p_type V

  • Verizon lied for over a year.

    My husband who is a pilot had problems with his Droid X. Because he is gone all the time and travels all over the country it is very important for him to have a functioning phone. So when he goes to a Verizon store while on the road in January of 201

  • Help needed in EJB

    Hi friends , I need your help in EJB I have to perform these operations 1) Calling an Appl Service from a EJB module. 2) Calling an EJB module from an Appl Service. 3) Basics of JNDI. for the second part I am exposing the EJB module as an Web Service

  • Javascript menu problems in IE

    Hi I am using a javascript menu for a website I am trying to build, I have tested it on many browsers and thought it was working fine, it's fine on all the macintosh browsers, works fine on firefox on the PC but there seems to be problems on some ver

  • Possible GET_PRINT_DOCUMENT bug (signature 2)

    APEX 4.0.2 Oracle 11.2.0.1.0 Based on our testing, GET_PRINT_DOCUMENT only returns XML for report queries within the current application. i.e. It appears the GET_PRINT_DOCUMENT API ignores the value passed into p_application_id. I verified this behav