Select CLAUSE error using CURSORS & XSU.Please SEE.

Hi,
I need to create NESTED XML using the DBMS_XMLQuery package.
I was instructed to use this for a Test purpose:
SQL> set long 40000
SQL> SELECT dbms_xmlquery.getXML('select deptno, dname, '||
2 'cursor(select empno, ename, sal from emp e where e.deptno = d.deptno) employees '||
3 'from dept d where d.deptno in (10, 20)')
4 FROM dual
But am getting the error
DBMS_XMLQUERY.GETXML('SELECTDEPTNO'||'CURSORIS(SELECTEMPNOFROMEMPEWHEREE.DEPT=D.
<?xml version = '1.0'?>
<ERROR>oracle.xml.sql.OracleXMLSQLException: ORA-00923
: FROM keyword not found where expected
</ERROR>
CAN SOMEONE PLEASE Tell me WHAT I HAVE OVERLOOKED??

Do not forget to put spaces in the SQL string that you create at appropriate places (you forgot to put a space just before your FROM keyword).
SQL> set long 4000
SQL> select dbms_xmlquery.getXML('select deptno,' ||
  2  'cursor(select empno from emp e where e.deptno = d.deptno) EMPLOYEES' ||
  3  'from dept d where d.deptno = 10')
  4  FROM DUAL;
DBMS_XMLQUERY.GETXML('SELECTDEPTNO,'||'CURSOR(SELECTEMPNOFROMEMPEWHEREE.DEPTNO=D
<?xml version = '1.0'?>
<ERROR>oracle.xml.sql.OracleXMLSQLException: ORA-00923: FROM keyword not found w
here expected
</ERROR>
1 row selected.
SQL> set long 4000
SQL> select dbms_xmlquery.getXML('select deptno,' ||
  2  'cursor(select empno from emp e where e.deptno = d.deptno) EMPLOYEES ' ||
  3  'from dept d where d.deptno = 10')
  4  FROM DUAL;
DBMS_XMLQUERY.GETXML('SELECTDEPTNO,'||'CURSOR(SELECTEMPNOFROMEMPEWHEREE.DEPTNO=D
<?xml version = '1.0'?>
<ROWSET>
   <ROW num="1">
      <DEPTNO>10</DEPTNO>
      <EMPLOYEES>
         <EMPLOYEES_ROW num="1">
            <EMPNO>7782</EMPNO>
         </EMPLOYEES_ROW>
         <EMPLOYEES_ROW num="2">
            <EMPNO>7839</EMPNO>
         </EMPLOYEES_ROW>
         <EMPLOYEES_ROW num="3">
            <EMPNO>7934</EMPNO>
         </EMPLOYEES_ROW>
         <EMPLOYEES_ROW num="4">
            <EMPNO>1</EMPNO>
         </EMPLOYEES_ROW>
      </EMPLOYEES>
   </ROW>
</ROWSET>
1 row selected.
SQL> disconnect
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.3.0 - Production
SQL>

Similar Messages

  • Error using XMLForest(). Please see

    Hi,
    This is the ERROR encountered using XMLForest().
    Declare
        queryCtx  DBMS_XMLQuery.ctxType;
        v_xml     VARCHAR2(32767);
        v_xmlClob CLOB;
        BEGIN
        v_xml:='Select SYS_XMLAGG(XMLElement("SDI",
                                             XMLFOREST(sdi_num)))
        From sdi
        where sdi_num = 22261';
        queryCtx :=DBMS_XMLQuery.newContext(v_xml);
        v_xmlClob :=DBMS_XMLQuery.getXML(queryCtx);
        display_xml(v_xmlClob);
    End;
    CREATE OR REPLACE PROCEDURE  display_xml(result IN OUT NOCOPY CLOB)
    AS
         xmlstr varchar2(32767);
         line varchar2(2000);
    BEGIN
         xmlstr:=dbms_lob.SUBSTR(result,32767);
         LOOP
         EXIT WHEN xmlstr is null;
         line :=substr(xmlstr,1,instr(xmlstr,chr(10))-1);
         dbms_output.put_line('.'||line);
         xmlstr := substr(xmlstr,instr(xmlstr,chr(10))+1);
         END LOOP;
    end;
    SQL> /
    .<?xml version = '1.0'?>
    .<ERROR>oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an
    XML tag name.</ERROR>
    PL/SQL procedure successfully completed.
    SQL>If the the Select is written on the SQL Prompt
    it works fine.
    Can some one tell me why this is happening?

    can some one help me please?
    The SELECT statement seems to run on the SQL prompt
    with XMLForest but not in the PROCEDURE associated
    with it.
    Am i overlooking anything?

  • In a SQL statement, the SELECT clause is used to

    In a SQL statement, the SELECT clause is used to select
    (a) columns
    (b) rows
    (c) tables
    (d) none of the above
    can any one help Immediately

    Is used to select rows of specified column...
    SELECT column_name(s) FROM table_name

  • I can't download Lightroom for some reason.  I keep getting this error:  Exit Code: 7 Please see specific errors below for troubleshooting. For example,  ERROR: DW006 ...  -------------------------------------- Summary ------------------------------------

    I can't download Lightroom for some reason.  I keep getting this error:
    Exit Code: 7
    Please see specific errors below for troubleshooting. For example, ERROR: DW006 ...
    -------------------------------------- Summary --------------------------------------
    - 0 fatal error(s), 2 error(s)
    ----------- Payload: Adobe Photoshop Lightroom 5 5.4.0.0 Adobe Photoshop Lightroom 5.pkg_5.4 -----------
    ERROR: DW006: Apple Package failed to install successfully.
    ERROR: Third party payload installer Adobe Photoshop Lightroom 5.pkg failed with exit code: 1

    Link for Download & Install & Setup & Activation problems may help
    -Chat http://www.adobe.com/support/download-install/supportinfo/

  • Ora-00600 error on select distinct when using cursors

    Hi, we are using oracle9iFS version 9.0.1.1.0. When I execute the following query in sqlPlus an ora-00600 error occurs.
    Here is the query:
    SELECT     DISTINCT ODMV_FOLDER.NAME,
         CURSOR(SELECT ODMV_DOCUMENT.NAME
    FROM     ODMV_DOCUMENT
    WHERE     ODMV_DOCUMENT.ID = ODMV_FOLDERRELATIONSHIP.RIGHTOBJECT)as Document
    FROM     ODMV_FOLDER,
              ODMV_FOLDERRELATIONSHIP
    WHERE     ODMV_FOLDER.CREATOR = 96 /*this is the user 'system'*/
    AND (ODMV_FOLDER.ID = ODMV_FOLDERRELATIONSHIP.LEFTOBJECT)
    I have no clue why is this happening. I might be doing something wrong since a similar query with a nested cursor works with the scott/tiger schema. Your help is greatly appreciated. Thank you in advance.
    Alfonso.

    I was able to reproduce this error. This looks like a bug in the RDBMS; I would suggest posting on their newsgroup or working with support to handle this problem.

  • I have tried to install Adobe Ilustrator but I receive an error Exit Code: 6 Please see specific errors below for troubleshooting. For example,  ERROR:    -------------------------------------- Summary --------------------------------------   - 0 fatal er

    Exit Code: 6 Please see specific errors below for troubleshooting. For example,  ERROR:   -------------------------------------- Summary --------------------------------------  - 0 fatal error(s), 4 error(s)    ----------- Payload: Microsoft Visual C++ 2012 Redistributable Package (x64) 11.0.61030.0 {3E272A93-C06B-4206-AD02-0EBE02535E20} -----------  ERROR: Third party payload installer vcredist_x64.exe failed with exit code: -2147024546  ERROR: Failed to install Microsoft Visual C++ 2012 Redistributable Package (x64). Please try installing it by double clicking on the executable at "C:\Users\amorales\AppData\Local\Temp\{6A3B9341-4D14-415F-8A21-85327165545E}\Illustrator_18_LS20_win64\Adobe Illustrator CC 2014\payloads\Microsoft VC 2012 Redist (x64)\vcredist_x64.exe", or download and install the latest Microsoft Visual C++ 2012 Redistributable Package (x64) from Microsoft website - www.microsoft.com  ----------- Payload: Microsoft Visual C++ 2012 Redistributable Package (x86) 11.0.61030.0 {873BE68F-480F-49A6-9649-F98CAB056AFC} -----------  ERROR: Third party payload installer vcredist_x86.exe failed with exit code: -2147024546  ERROR: Failed to install Microsoft Visual C++ 2012 Redistributable Package (x86). Please try installing it by double clicking on the executable at "C:\Users\amorales\AppData\Local\Temp\{6A3B9341-4D14-415F-8A21-85327165545E}\Illustrator_18_LS20_win64\Adobe Illustrator CC 2014\payloads\Microsoft VC 2012 Redist (x86)\vcredist_x86.exe", or download and install the latest Microsoft Visual C++ 2012 Redistributable Package (x86) from Microsoft website - www.microsoft.com  -------------------------------------------------------------------------------------

    Errors "Exit Code: 6," "Exit Code: 7"
    Mylenium

  • Error using Cursors

    Hi
    I have a set of SQL server scripts that I ran thru a migration tool to make them Oracle (10G) compatible. The stored procedure is implemented using cusors as it returns a table in SQL server. I am getting the error below
    ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'SP_COURSE_GET' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
    Below is my stored procedure..
    CREATE OR REPLACE PROCEDURE SP_COURSE_GET
    course_id IN INT DEFAULT NULL,
    RCT1 IN OUT GLOBALPKG.RCT1
    AS
    BEGIN
    OPEN RCT1 FOR
    SELECT
    A .*,
    B.test_name,
    B.test_status
    FROM COURSES A,
    TESTS B
    WHERE A.xtest_id = B.test_id (+) and (A.course_id = SP_COURSE_GET.course_id);
    RETURN;
    END;
    And here is the associated package..
    CREATE OR REPLACE PACKAGE GLOBALPKG
    AS
    TYPE RCT1 IS REF CURSOR;
    TRANCOUNT INTEGER := 0;
    IDENTITY INTEGER;
    END;
    Can an expert please shed some light as to why I am getting this error? Thanks in advance for your advice
    Cheers

    Hmmm...never mind. I don't think that's the problem. I cut/pasted your code (changing your table to EMP) and it works fine for me:
    SQL> CREATE OR REPLACE PACKAGE GLOBALPKG
      2  AS
      3  TYPE RCT1 IS REF CURSOR;
      4  TRANCOUNT INTEGER := 0;
      5  IDENTITY INTEGER;
      6  END;
      7  /
    Package created.
    SQL> CREATE OR REPLACE PROCEDURE SP_COURSE_GET
      2  (
      3  course_id IN INT DEFAULT NULL,
      4  RCT1 IN OUT GLOBALPKG.RCT1
      5  )
      6  AS
      7  BEGIN
      8  OPEN RCT1 FOR
      9  SELECT
    10  ename,job
    11  from emp
    12  WHERE empno = SP_COURSE_GET.course_id;
    13  RETURN;
    14  END;
    15  /
    Procedure created.
    SQL> var vrct refcursor
    SQL> exec sp_course_get(7369,:vrct);
    PL/SQL procedure successfully completed.
    SQL> print vrct
    ENAME      JOB
    SMITH      CLERK

  • XML DOM Error in 8i. Please see.

    Hi,
    I am executing a SQL Script which has the xmldom.importNode()function.
    It compiles fully in 9I but when I run this on 8I,
    I get the error:
    Errors for FUNCTION MERGE_XML:
    LINE/COL ERROR
    28/12    PL/SQL: Statement ignored
    28/25    PLS-00302: component 'IMPORTNODE' must be declaredDoes 8I has a problem whilst executing the script?
    Do I need to install a patch in 8I?
    Can some one please help me?
    THE SQL script is as follows:
    CREATE OR REPLACE FUNCTION merge_xml(xmlTheirs IN OUT CLOB,
                                         xmlOurs   IN OUT CLOB
    RETURN clob
    AS
    dom1  xmldom.DOMDocument;
    dom2  xmldom.DOMDocument;
    p     xmlparser.Parser;
    n     xmldom.DOMNode;
    nn    xmldom.DOMNode;
    t_lob CLOB;
    BEGIN
           p := xmlparser.newParser;
           xmlparser.parseClob(p   => p,
                               doc => xmlTheirs);
           dom1 := xmlparser.getDocument(p => p);
           xmlparser.parseClob(p   => p,
                               doc => xmlOurs);
           dom2 := xmlparser.getDocument(p => p);
           xmlparser.freeParser(p => p);
           n := xmldom.getFirstChild(n => xmldom.makeNode(xmldom.getDocumentElement(doc => dom2)));
           WHILE (NOT xmldom.isNull(n))
           LOOP
               nn := xmldom.importNode(n       => dom1,
                                       srcNode => n,
                                       deep    => TRUE);
               nn := xmldom.appendChild(xmldom.makeNode(xmldom.getDocumentElement(doc => dom1)),
                                        nn);
               n  := xmldom.getNextSibling(n => n);
           END LOOP;
           dbms_lob.createtemporary(lob_loc => t_lob,
                                    cache   => TRUE);
           xmldom.writeToClob(dom1,
                              t_lob);
           xmldom.freeDocument(doc => dom1);
           xmldom.freeDocument(doc => dom2);
           xmldom.freeDocument(doc => dom2);
           RETURN(t_lob);
    END;

    iamabeefcake wrote:
    So I had to restore my computer to factory settings. Before I did that I read that I can save my thousands of itunes song ratings by creating a smart playlist for each rating and exporting them to xml.
    No need to export anything.
    Song ratings (and all other data) is saved in the iTunes library.itl file in the iTunes folder. Some of the data is also saved in the iTune slibrary.xml file.
    Did you by chance simply save the entire /Music/iTunes/ folder?
    If so, quit iTunes, copy it back to /Music/ then open iTunes.
    Your iTunes library will be exactly as it was before you erased & reinstalled.

  • I have problem to install lightroom 6. I have this error: xit Code: 20 Please see specific errors below for troubleshooting. For example,  ERROR:    -------------------------------------- Summary --------------------------------------   - 0 fatal error(s)

    Somebody help me?

    Hello, I solved my problem. Don't change the extraction path and keep the default path. My log message was Source Path not found.

  • Using Cursor in Select statements? How to do this?

    I am getting an error whilt passing a cursor to a select clause:
    SELECT dbms_xmlquery.getXML('select deptno, dname, '||
    'cursor(select empno, ename, sal from emp e where e.deptno = d.deptno) employees '||
    'from dept d where d.deptno in (10, 20)')
    FROM dual;
    DBMS_XMLQUERY.GETXML('SELECTDEPTNO'||'CURSORIS(SELECTEMPNOFROMEMPEWHEREE.DEPT=D.
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: ORA-00923
    : FROM keyword not found where expected
    </ERROR
    THIS IS DUE TO THE CURSOR AND ITS FROM STATEMENT?
    CAN ANY ONE PLEASE GUIDE AS TO HOW TO USE CURSORS IN A SELECT STATEMENT PLEASE?

    Another duplicate thread. See my response Select CLAUSE error using CURSORS & XSU.Please SEE..
    Cheers, APC

  • Fetching a value from a select statement inside select clause

    hello all,
    I have a problem executing a procedure it gives me a runtime error, what am doing is i have multiple select statement inside a select clause. am using the entire select statement for a ref cursor. when running the query seperately am able to get the records but it's not getting compiled.
    here is the piece of code which am working with
    create or replace procedure cosd_telecommute_procedure
    (p_from_date in date,
    p_to_date in date,
    p_rset in out sys_refcursor)
    as
    p_str varchar2(10000);
    begin
    p_str := 'select personnum, '||
    'fullname, '||
                   'personid, '||
         'hours, '||
         'applydtm, '||
    'paycodeid, '||
         'laborlev2nm, '||
         'laborlev3nm, '||
         'laborlev2dsc, '||
    'adjdate, '||
         'timeshtitemtypeid, '||
         '(select max(eff_dt) from cosd_telecommute_info_tbl '||
         'where emplid = cosd_vp_telecommute.personnum and '||
    'eff_dt between ''01-aug-2005'' and ''30-aug-2005'') thisyreffdt, '||
                   '(select elig_config7 from cosd_telecommute_info_tbl '||
                   'where emplid = cosd_vp_telecommute.personnum and '||
    'eff_dt = (select max(eff_dt) from cosd_telecommute_info_tbl '||
                   'where emplid = cosd_vp_telecommute.personnum and '||
    'eff_dt between ''01-aug-2005'' and ''30-aug-2005'')) thisyrmiles,'||
    '(select max(eff_dt) from cosd_telecommute_info_tbl '||
                   'where emplid = cosd_vp_telecommute.personnum and '||
    'eff_dt between trunc(p_from_date) and trunc(p_to_date)) fiscalyreffdt, '||
         '(select elig_config7 from cosd_telecommute_info_tbl '||
                   'where emplid = cosd_vp_telecommute.personnum and '||
    'eff_dt = (select max(eff_dt) from cosd_telecommute_info_tbl '||
                        'where emplid = cosd_vp_telecommute.personnum and '||
    'eff_dt between trunc(p_from_date) and trunc(p_to_date))) fiscalyrmiles '||
    'from cosd_vp_telecommute '||
    'where trunc(applydtm) '||
    'between p_from_date and p_to_date '||
                   'and personnum = ''029791''';
                   open p_rset for p_str;
    end cosd_telecommute_procedure;
    and here is the piece of error am getting
    ERROR at line 1:
    ORA-00904: invalid column name
    ORA-06512: at "TKCSOWNER.COSD_TELECOMMUTE_PROCEDURE", line 40
    ORA-06512: at line 5

    Did you run the query in SQL plus? Check whether all the column are valid in your database. Below is the query which i got from your procedure just run and check it out. It is really hard for us to tell you the problem without knowing the table structure
    select personnum, fullname, personid, hours, applydtm, paycodeid, laborlev2nm, laborlev3nm,
    laborlev2dsc, adjdate, timeshtitemtypeid,
    (select max(eff_dt) from cosd_telecommute_info_tbl
      where emplid = cosd_vp_telecommute.personnum
      and eff_dt between '01-aug-2005' and '30-aug-2005') thisyreffdt,
      (select elig_config7 from cosd_telecommute_info_tbl where emplid = cosd_vp_telecommute.personnum
      and eff_dt = (select max(eff_dt)
                    from cosd_telecommute_info_tbl
                    where emplid = cosd_vp_telecommute.personnum
                    and eff_dt between '01-aug-2005' and '30-aug-2005'
       ) thisyrmiles,
      (select max(eff_dt)
       from cosd_telecommute_info_tbl
       where emplid = cosd_vp_telecommute.personnum
       and eff_dt between trunc(p_from_date) and trunc(p_to_date)
       ) fiscalyreffdt,
       (select elig_config7 from cosd_telecommute_info_tbl where emplid = cosd_vp_telecommute.personnum
       and eff_dt = (select max(eff_dt)
                     from cosd_telecommute_info_tbl
                     where emplid = cosd_vp_telecommute.personnum
                     and eff_dt between trunc(p_from_date) and trunc(p_to_date)
       ) fiscalyrmiles
    from cosd_vp_telecommute
    where trunc(applydtm) between p_from_date and p_to_date
    and personnum = '029791'

  • Creating Object views using XSU PL/SQL.Please SEE.

    Hi,
    I am presently using XSU PL/SQL utility with Oracle 9i and using the
    DBMS_XMLQuery.newContext(<My Select clause goes here>,and the
    DBMS_XMLQuery.getXML()which generates an XML document.
    My query is:
    I have 2 tables (One master and the other detail table.).
    Table : DI_Master
    di_num
    00001
    Table: DI_Details
    di_num di_act
    00001 ABCD
    00001 ANCF
    00001 IOPP
    Now the XML I'd like is :
    <di_num>00001</di_num>
    <di_act>
    <val>ABCD</val>
    <val>ANCF</val>
    <val>IOPP</val>
    </di_act>
    Do I need to create object tables for this,insert data into object tables
    and then read this table? It will become an extremely tedious process
    I guess an OBJECT view can do what I want.Can anyone please tell me how
    to write an object view for the 2 tables please and the get the output as
    desired.?

    Supposing you have further
    nesting of the tables.Then how will you go about doing that.You can have multiple levels of CURSOR expressions (see an example below, not a real-life example, but illustrates the point).
    SQL> set long 4000
    SQL> select dbms_xmlquery.getXML('select deptno,' ||
      2  'cursor(select empno, cursor(select losal, hisal from salgrade) salgrades '||
      3   'from emp e where e.deptno = d.deptno and rownum < 3) EMPLOYEES ' ||
      4  'from dept d where d.deptno = 10')
      5  FROM DUAL;
    DBMS_XMLQUERY.GETXML('SELECTDEPTNO,'||'CURSOR(SELECTEMPNO,CURSOR(SELECTLOSAL,HIS
    <?xml version = '1.0'?>
    <ROWSET>
       <ROW num="1">
          <DEPTNO>10</DEPTNO>
          <EMPLOYEES>
             <EMPLOYEES_ROW num="1">
                <EMPNO>7782</EMPNO>
                <SALGRADES>
                   <SALGRADES_ROW num="1">
                      <LOSAL>700</LOSAL>
                      <HISAL>1200</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="2">
                      <LOSAL>1201</LOSAL>
                      <HISAL>1400</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="3">
                      <LOSAL>1401</LOSAL>
                      <HISAL>2000</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="4">
                      <LOSAL>2001</LOSAL>
                      <HISAL>3000</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="5">
                      <LOSAL>3001</LOSAL>
                      <HISAL>9999</HISAL>
                   </SALGRADES_ROW>
                </SALGRADES>
             </EMPLOYEES_ROW>
             <EMPLOYEES_ROW num="2">
                <EMPNO>7839</EMPNO>
                <SALGRADES>
                   <SALGRADES_ROW num="1">
                      <LOSAL>700</LOSAL>
                      <HISAL>1200</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="2">
                      <LOSAL>1201</LOSAL>
                      <HISAL>1400</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="3">
                      <LOSAL>1401</LOSAL>
                      <HISAL>2000</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="4">
                      <LOSAL>2001</LOSAL>
                      <HISAL>3000</HISAL>
                   </SALGRADES_ROW>
                   <SALGRADES_ROW num="5">
                      <LOSAL>3001</LOSAL>
                      <HISAL>9999</HISAL>
                   </SALGRADES_ROW>
                </SALGRADES>
             </EMPLOYEES_ROW>
          </EMPLOYEES>
       </ROW>
    </ROWSET>
    1 row selected.
    SQL>
    Also,isnt it a better option to create a VIEW of the
    Select clause and pass a view to the select clause? At the end of the day, you could use whatever you feel comfortable with, provided that it produces your expected output and looks clean. We are just giving you the ideas, how you implement it actually in your situation, depends upon a lot of factors, that only you know about.

  • When trying to create connection using Contribute 6.5, get error message "Unknown error.  Please see the log for detail."  The log says "Network connection timed out."  What do I do now?

    Have been using Contribute 6.5, and earlier versions, for years with Hostway without any problems.  All of a sudden I cannot create a connection to our website.  Tried to chat with Adobe a twice now and got no help.  Yesterday they started a chat with me, then ended the session without any communication!  My problem has been going on for several weeks now.  I uninstalled Contribute, downloaded and installed again, but it did not help.  Hostway had me connect with Zilla and everything worked fine.  So, they say the problem is with Adobe.    The last attempt ended with "Unknown error. Please see the log for detail."  The log says "Network operation timed out."  Does anyone have any suggestions?

    Hi There,
    Can you please try using any other Internet connection outside your company's network and see if it is working? Alternatively, Can you please try the below settings from the Advanced... Menu while creating the connection using FTP details and try to create the connection again:
    Regards,
    Mayank

  • Error in sales order when selecting a warranty item in configurator 'Please enter required information - Service Reference Type Code'

    Error in sales order when selecting a warranty item in configurator 'Please enter required information - Service Reference Type Code'
    Not able to book the sales order because of this issue

    Order Management does not support the inclusion of optional service items in a configured Model BOM (see Support article #1296751.1 for more detail).  Allowing for such would therefore require customization.
    As you've found, there's no modeling restriction that prevents you from creating a Model BOM that includes optional service items, nor is there any problem with creating a Configurator Model for it.  And required service items (such as a warranty item that is a required child of an optional BOM component) do not present a problem; they have nothing to do with Configurator, and would never appear as sub-lines in OM.  The problem arises in OM, which requires that any service item be "associated" to the item it's "servicing".  OM does not automatically make such an association with service sub-lines, even though it might be argued that an association may be inferred by the BOM structure (i.e., OM does not assume that an optional service sub-line is necessarily associated, from a service standpoint, with its BOM parent).  OM customization is therefore required in order to hook any service item up to its corresponding product item.  Many customers who configure service along with product have implemented such a customization.
    (Another gap in such a solution that may be relevant to you is that for an included optional service item requiring recurring billing, Order Management does not create the requisite Service Contract.  Customers have likewise developed customizations to address this, as well.)
    As this is not specifically a Configurator matter (you could have created your order without using Configurator at all, and you would have experienced the exact same behavior), please do not take my explanation as being either authoritative or comprehensive (I am a Configurator expert, and only knowledgeable enough about Order Management to be dangerous).  It would be advisable for you to seek more detailed information/recommendations from the Order Management forum.
    Eogan

  • How to use a function in select clause

    hi gems...good evening...
    I want to write a select clause from a function. The scenario is like below:
    function parameters
    CREATE OR REPLACE FUNCTION FUNCTION_DEMO(p_pid IN NUMBER,
    p_bankerNum IN NUMBER,
    p_banker_name IN VARCHAR2,
    p_business_num IN NUMBER,
    p_businesses IN table_typ_businesses)
    return table_typ_bankers
    as .......
    global object and table types
    CREATE OR REPLACE TYPE obj_typ_businesses AS OBJECT (businesses NUMBER);
    CREATE OR REPLACE TYPE table_typ_businesses AS TABLE OF obj_typ_businesses;
    CREATE OR REPLACE TYPE obj_typ_bankers AS OBJECT (banker_num NUMBER(10,0));
    CREATE OR REPLACE TYPE table_typ_bankers IS TABLE OF obj_typ_bankers;
    The select query
    select * from
    table(cast(FUNCTION_DEMO(1,
    2,
    'ALEX',
    2,
    table(cast(select businesses_id from reference_businesses) as table_typ_businesses) as table_typ_bankers)But it is giving error with Missing expression.
    My function is compiled successfully. I just want to make the select query to view the output given by the function i.e the table type "table_typ_bankers".
    Please help...thanks in advance..

    Hi ,
    You can check this and change your code by taking this as an example. I just noted down with simple one input and return as collection type
    and how to use/call it in select statement.
    SQL> CREATE OR REPLACE TYPE obj_typ_businesses AS OBJECT (businesses NUMBER)
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE table_typ_businesses AS TABLE OF obj_typ_businesses
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE obj_typ_bankers AS OBJECT (banker_num NUMBER(10,2))
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE table_typ_bankers IS TABLE OF obj_typ_bankers
      2  /
    Type created.
    /* Now creating a demo function and just focusing on your one input as collection type  */
    SQL> create or replace function f11 ( tab_rec  IN table_typ_businesses)
      2  return table_typ_bankers
      3  is
      4  t_val table_typ_bankers:= table_typ_bankers();
      5  begin
      6        dbms_output.put_line('tab_rec count -'||tab_rec.count);
      7
      8  for i in 1..tab_rec.count
      9              loop
    10               dbms_output.put_line ('tab_rec value ('||i||')'||tab_rec(i).businesses);
    11                       t_val.EXTEND;
    12                    t_val(i) := obj_typ_bankers(tab_rec(i).businesses * 12.50);
    13              end loop;
    14              return t_val;
    15  end;
    16  /
    Function created.
    /* To run your function by a select statement */
    SQL> SELECT * FROM TABLE(f11(table_typ_businesses(obj_typ_businesses(5),
      2                          obj_typ_businesses(12),
      3                                         obj_typ_businesses(18))
      4                                             ) )
      5  /
    BANKER_NUM
          62.5
           150
           225
    tab_rec count -3
    tab_rec value (1)5
    tab_rec value (2)12
    tab_rec value (3)18Hope this will help you... :)
    Thanks!
    Ashutosh

Maybe you are looking for

  • TS4009 How do I see the photos I have stored on my Icloud

    How do I see the photos I have stored on my Icloud

  • Text boilerplate has no contents

    Can anyone tell me how to delete this? I can't even locate on the report itself.

  • Salesforce CRM and SAP Integration

    Hello Experts, I am supposed to come up with salesforce integration with SAP. Can you please let me know how do I start? What is that I can pick up from SAP to integrate this with salesforce and what are the hardware details required? If somebody has

  • Photo Backup - 2 places ?

    I don't want my Photos backed up, or clouded After upgrading to ios8 I set up Backups, and shut off "Photos" in the iCloud menu. When it tried to backup this morning, it said not enough space. I see that it also has a setting in Storage/Manage Storag

  • Can't login to sites - Facebook,etc.

    Hi, I am running Mac OS x 10.5, latest version of Safari. Ever since I upgraded, Safari has issues in logging-in to web-sites. The problem started with Facebook - first time I could log onto Facebook but from the main page, I could not access any lin