ORA-00913: too many values

Hello

I RAN
select T.bill_no,T.bill_date,T.vehicle_no,T.PARTY_NAME,SUM(T.AMOUNT),SUM(T.VAT_AMOUNT),
(select SUM(L.LABOUR_AMT),SUM(L.SERVICE_TAX_AMT) from LAB_WORK_DTL L where T.BILL_NO=L.BILL_NO(+)) from transaction_details T 
where T.BILL_NO =:P27_BILL_NO GROUP BY T.bill_no,T.bill_date,T.vehicle_no,T.PARTY_NAME
Then the results are:-ORA-00913: too many values

Why is this error. Where is the problem in my code.

Thank you

Hello Maury,
What exactly are you trying to achieve in this query

select SUM(L.LABOUR_AMT), SUM(L.SERVICE_TAX_AMT)
          from LAB_WORK_DTL L
         where T.BILL_NO = L.BILL_NO(+)

You can not have 2 values there SUM (L.LABOUR_AMT) and SUM (L.SERVICE_TAX_AMT).
Do you intend to add them or perform any other operation.
If no, and you need these values separately it is a way to do

select T.bill_no,
       T.bill_date,
       T.vehicle_no,
       T.PARTY_NAME,
       SUM(T.AMOUNT),
       SUM(T.VAT_AMOUNT),
       (select SUM(L.LABOUR_AMT)
          from LAB_WORK_DTL L
         where T.BILL_NO = L.BILL_NO) LABOUR_AMT,
       (select SUM(L.SERVICE_TAX_AMT)
          from LAB_WORK_DTL L
         where T.BILL_NO = L.BILL_NO) SERVICE_TAX_AMT
  from transaction_details T
 where T.BILL_NO = :P27_BILL_NO
 GROUP BY T.bill_no, T.bill_date, T.vehicle_no, T.PARTY_NAME

See you soon!
Bobin

Published by: Buga change request

Tags: Database

Similar Questions

  • Problem with Oracle Fusion of declarations (PL/SQL: ORA-00913: too many values)

    Hi all

    I use the Sub merge statement and I'm getting too many questions of lines when I'm compiling.

    BEGIN

    FOR te_rec IN (SELECT / * + parallel(ts,4) * / telcos_eligible te.dtv_acct_num you, telcos_setup ts, tp telcos_partners)
    WHERE tp.telcos_name = UPPER ((p_telcos_name))
    AND ts.partner_id = tp.partner_id
    AND te.ts_id = ts.ts_id) LOOP


    MERGE INTO tcs_accounts
    WITH THE HELP OF)
    SELECT / * + DRIVING_SITE (a) * / account_id, a.subscriber_id, status, account_type FROM account@tcs_to_paris an a.subscriber_id WHERE the = te_rec.dtv_acct_num
    ) paris_accounts
    WE (tcs_accounts.subscriber_id = paris_accounts.subscriber_id)

    WHEN MATCHED THEN
    GAME UPDATE
    account_type = paris_accounts.account_type,
    subscriber_id = paris_acounts.subscriber_id,
    status = paris_accounts.status
    WHEN NOT MATCHED THEN
    INSERT (account_id, subscriber_id, status_account_type)
    VALUES (paris_accounts.account_id, paris_accounts.subscriber_id, paris_accounts.status, paris_accounts.account_type);



    END LOOP;

    END;

    Can you let me know what is the problem here.

    Thank you
    MK.

    >
    WHEN NOT MATCHED THEN
    INSERT (account_id, subscriber_id, status_account_type) - the problem here: STATUS_ACCOUNT_TYPE
    VALUES (paris_accounts.account_id, paris_accounts.subscriber_id, paris_accounts.status, paris_accounts.account_type);
    >

    Comma after STATUS instead of underscore (_), otherwise, you have only three columns instead of four:
    (.. STATUS, ACCOUNT_TYPE)

  • Error (11,15): PL/SQL: ORA-00913: too many values

    CREATE OR REPLACE TRIGGER TBI_POSCUSTXREF_IDU BEFORE INSERT OR UPDATE OR DELETE ON pos_cust_xref FOR EACH ROW 
      DECLARE 
      l_cod_action CHAR; 
      BEGIN 
      IF INSERTING THEN 
      l_cod_action := 'I'; 
      ELSIF UPDATING THEN 
      l_cod_action := 'U'; 
      ELSIF DELETING THEN 
      l_cod_action := 'D'; 
      END IF; 
      INSERT INTO at_pos_cust_xref VALUES (
      :new.DIST_NUMBER, 
      :new.DIST_BRANCH, 
      :new.DIST_NUMBER,                                                                                                                                                                                  
    :new.DIST_BRANCH    ,                                                                                                                                                                                                           
    :new.DAYS_PRICE_PROT    ,                                                                                                                                                                                    
    :new.TAPE_DAYS_PRICE_PROT ,                                                                                                                                                                                             
    :new.DAYS_IN_TRANSIT    ,                                                                                                                                                                                              
    :new.ACTIVE_IND    ,                                                                                                                                                                                                      
    :new.COMM_IND    ,                                                                                                                                                                                                         
    :new.SHORT_NAME   ,                                                                                                                                                                                               
    :new.SG_BILL_TO_CUST_NO   ,                                                                                                                                                                                           
    :new.TAPE_BILL_TO_CUST_NO   ,                                                                                                                                                                                               
    :new.SG_SHIP_TO_CUST_NO   ,                                                                                                                                                                                               
    :new.TAPE_SHIP_TO_CUST_NO  ,                                                                                                                                                                                                
    :new.NAME_FLAG           ,                                                                                                                                                                                                   
    :new.ADMIN_GLOBAL_ID   ,                                                                                                                                                                                                     
    :new.ZIP_CODE_PREFIX    ,                                                                                                                                                                                                     
    :new.DAILY_POS          ,                                                                                                                                                                                                         
    :new.PRIMARY_SALES_OUT   ,                                                                                                                                                                                                       
    :new.PRIMARY_COUNTRY_FLAG ,                                                                                                                                                                                                      
    :new.PRIMARY_START_DATE  ,                                                                                                                                                                                                          
    :new.CWAC_ID           ,                                                                                                                                                                                                      
    :new.COMMENT_ID        ,                                                                                                                                                                                             
    :new.LAST_UPD_BY       ,                                                                                                                                                                                                    
    :new.LAST_UPD_DATE      ,                                                                                                                                                                                                             
    :new.DESIGN_IN_IND       ,                                                                                                                                                                                                          
    :new.CLAIM_PROCESSOR     ,                                                                                                                                                                                                     
    :new.PRE_APPROVER_ID     ,                                                                                                                                                                                                     
    :new.CLAIMS_WITHIN_DAYS   ,                                                                                                                                                                                             
    :new.SG_AREA_CODE         ,                                                                                                                                                                                                    
    :new.CLAIM_TYPE          ,                                                                                                                                                                                                    
    :new.ART_APPROVER_ID     ,                                                                                                                                                                                                    
    :new.ACCT_PAY_ID          ,                                                                                                                                                                                                     
    :new.TAPE_ACCT_PAY_ID    ,                                                                                                                                                                                                      
    :new.POS_CORP_CODE        ,                                                                                                                                                                                                     
    :new.POS_CUST_NAME       ,                                                                                                                                                                                                    
    :new.POS_COUNTRY         ,                                                                                                                                                                                                     
    :new.POS_STREET_ADDR     ,                                                                                                                                                                                                     
    :new.POS_CITY           ,                                                                                                                                                                                                       
    :new.POS_STATE          ,                                                                                                                                                                                                       
    :new.POS_ZIP           ,                                                                                                                                                                                                        
    :new.INDIRECT_DISTI       ,                                                                                                                                                                                                         
    :new.ARCHIVE_DATE        ,                                                                                                                                                                                                             
    :new.CONT_CUST_EFFDATE    ,                                                                                                                                                                                                            
    :new.LSID                ,                                                                                                                                                                                              
    :new.POS_COUNTRY_CODE     ,                                                                                                                                                                                                   
    :new.SEGMENTATION         ,                                                                                                                                                                                                   
    :new.POS_STREET_ADDR2    ,                                                                                                                                                                                                     
    :new.INVENTORY_AUDIT_DATE ,                                                                                                                                                                                                            
    :new.PROCESS_REGION       ,                                                                                                                                                                                                      
    :new.CATEGORY_TYPE         ,                                                                                                                                                                                                   
    :new.OVERRIDE_ZIPCODE      ,                                                                                                                                                                                                    
    :new.OVERRIDE_COUNTRYCODE   ,                                                                                                                                                                                                    
    :new.OVERRIDE_COM_FLAG     ,                                                                                                                                                                                                     
    :new.POS_STREET_ADDR3     ,                                                                                                                                                                                                     
    :new.POS_STREET_ADDR4     ,                                                                                                                                                                                                   
    :new.POS_STREET_ADDR5     ,                                                                                                                                                                                                   
    :new.POS_STREET_ADDR6    ,                                                                                                                                                                                                    
    :new.POS_STATE_CODE         ,                                                                                                                                                                                                  
    :new.DIST_NUMBER_CE         ,                                                                                                                                                                                                  
    :new.SG_BILL_TO_CUST_NO_CE  ,                                                                                                                                                                                                  
    :new.DIST_NUMBER_RTL           ,                                                                                                                                                                                                
    :new.SG_BILL_TO_CUST_NO_RTL   ,                                                                                                                                                                                                 
    :new.DIST_NUMBER_MXO         ,                                                                                                                                                                                                 
    :new.SG_BILL_TO_CUST_NO_MXO    ,                                                                                                                                                                                               
    :new.SRP_CATEGORY            ,                                                                                                                                                                                                  
    :new.PTPP_DIST_NUMBER         ,                                                                                                                                                                                                 
    :new.BOOKED_REVENUE          ,                                                                                                                                                                                                
    :new.GROUP_DIST_NUMBER_ZYME       ,                                                                                                                                                                                             
    :new.ZYME_CUTOVER_DATA_DATE     ,                                                                                                                                                                                                     
    :new.DIST_TIMEZONE              ,                                                                                                                                                                                               
    :new.CURRENCY_CODE              ,                                                                                                                                                                                              
      systimestamp, 
      l_cod_action); 
      END; 
    Published by: user9093700 on March 7, 2012 11:58
    :new.DIST_NUMBER,
    :new.DIST_BRANCH,
    :new.DIST_NUMBER,
    :new.DIST_BRANCH,
    

    Why you insert DIST_NUMBER and DIST_BRANCH two times each? Remove each one and your problem will be solved.

  • An error of Dimension to slow variation: too many values

    Hello
    Trying to implement using the CPCS? IKM dimension to slow variation on all columns with their descriptions

    but, when I execute the lines 8 old Historize interface, that it was not

    Error message:

    913: 42000: java.sql.SQLException: ORA-00913: too many values

    java.sql.SQLException: ORA-00913: too many values

    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)

    I have only on 93 records

    can someone help me on this?

    Thank you
    Saichand.v

    Published by: André Varanasi on October 4, 2010 16:26

    SAI,

    The query I've deduced the following:
    1. natural key is DATASOURCE_ID
    2. you have 2 columns marked as end IFL stamp - T.AUX_DATE2, T.AUX_DATE4
    3. you have 3 columns marked as IFL Start Timestamp - S.INS_EXP_DT, S.AUX_DATE1, S.AUX_DATE3

    Apart from the error you are getting, there is another error you get - not enough columns.
    >
    Set)
    T.FLAG
    ,
    T.AUX_DATE2,
    T.AUX_DATE4
    ) = (
    Select 0
    ,
    S.INS_EXP_DT,
    S.AUX_DATE1,
    S.AUX_DATE3
    André. ' ' I$ _WC_CAR_Test "S
    >
    You try to define 3 columns, while the select statement has 4 columns.
    And this is due to the fact that you have more columns marked as start date of the SCD and SCD End Date.
    I met this interesting scenario, I think that the KMs are built to handle only a single column to be marked as SCD Start Date and another a column to be marked as SCD End Date.
    And it is consistent with the definition of the Type 2 SCD.

    Now, the error you get currently - as you have mentioned earlier that your Datasource_id is constant = 1. So, you have a natural key which is always 1 for all 93 records!
    Don't you think that it is good natural key?

  • ORA-00939: too many arguments for works by using zones in xquery

    Running on the Oracle 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production database

    CREATE TABLE "ORT"."SAMPLE"
       ( "THEDATE" DATE,
    "THETIMESTAMP" TIMESTAMP (6),
    "STARTTIMESTAMP" TIMESTAMP (6) WITH LOCAL TIME ZONE,
    "ENDTIMESTAMP" TIMESTAMP (6) WITH LOCAL TIME ZONE
       );
    
    
    
    

    REM INSERTING into SAMPLE
    SET DEFINE OFF;
    Insert into SAMPLE (THEDATE,THETIMESTAMP,STARTTIMESTAMP,ENDTIMESTAMP) values (to_date('13-06-10 14:07:52','RR-MM-DD HH24:MI:SS'),to_timestamp('13-06-19 14:27:52.000000000','RR-MM-DD HH24:MI:SS.FF'),to_timestamp('13-06-19 10:34:04.586000000','RR-MM-DD HH24:MI:SS.FF'),to_timestamp('13-06-19 15:05:38.805000000','RR-MM-DD HH24:MI:SS.FF'));
    
    
    
    

    the following query triggers ora-00939

    SELECT XMLQUERY('for $v in fn:collection("oradb:/ORT/SAMPLE")
    let $date1 := $v/ROW/STARTTIMESTAMP/text()
    let $date2 := $v/ROW/ENDTIMESTAMP/text()
    return if ($date1 < $date2) then (concat($date1," date is less than ", $date2)) else (concat($date1," date is greater than ", $date2)) ' returning content) from dual;
    
    

    ORA-00939: too many arguments to function

    00939 00000 - "too many arguments for the function.

    * Cause:

    * Action:

    any ideas?

    This is a bug related to the rewriting of XQuery.

    It works with the NO_XML_QUERY_REWRITE indicator:

    SELECT / * + no_xml_query_rewrite * /.

    XMLQUERY)

    but you should probably open a SR for this.

  • Too many values are related...

    Hi all


    I generate the report in dev and tested, working fine.i have exported and imported prod, have too many values in a cell.

    Can someone tell me what is the problem...


    Thank you

    I could be totally wrong, but I think I remember a question like that. Modification of data query optimization settings solved a similar problem. Reading this: http://docs.oracle.com/cd/E12825_01/epm.111/fr_user/25000334.html-and play with couple of different parameters. I would start by comparing the settings in different environments.

    See you soon,.
    Mehmet

  • Dashboard quickly too many values of constraint

    I have a requirement where the user wants to select among the thousands of available records. When you create a dashboard prompt that it takes only 250 values and remaining wrote too many values.

    My question is why you would build a prompt with the values a lot? I know you said the 'user wants', but sometimes you have to educate the (and when I say 'them' several times, it's a few loud people who just shout the loudest and so achieve their ends) that what they want isn't always the best. I think that it is virtually impossible to have to sift through thousands of values to find the one you want.

    However, if the values are to be given, I would recommend penetrate blocked guests indicating on the label invited a range of values, so that each of them has a 'reasonable' values list and the user can directly access which "invites the high-end" will contain the value he wants.

  • Filter - too many values

    Hello

    Is it possible to change the thresholds of recoverable to a quick filter to dashboard. I see "too many values" in a filter and would like the opportunity to view all values.

    Can anyone help?

    Thank you

    Hello

    Drop-down list can handle a maximum of 256 values but if we want more drop-down list

    Add the code below in instanceconfig.xml under tag ServerInstance


    10000

    * Restart services presentation
    Reference: http://varanasisaichand.blogspot.com/2010_03_01_archive.html

    Kind regards
    Srikanth

  • Drop-down list invites 'TOO MANY VALUES' from the list

    I did a dashboard quickly with a list box down and I'm getting "too many values at the end of the fall to the bottom of the list box.

    I want that all the values to display.

    Anyone has a solution, thanks

    I saw in the FAQ about the instanceconfig.xml file and the tag

    value of < guests > < MaxDropDownValues > you must < / MaxDropDownValues > < / guest >

    But I did not work for me, I use the KISS we and not POET...

    Published by: Jim Nolette on June 4, 2010 09:07

    You've restarted services? and location also tags important, it should be inside tags serverinstance.

  • UTL_SMTP. ORA-30678: too many open connections. Why?

    Hello

    I use UTL_SMTP for sending email to support staff in some scenarios. IT everything has worked until today, we got following error in Java logs. I searched and found a similar position at [http://asktom.oracle.com/pls/asktom/f/f?p=100:11:0:P11_QUESTION_ID:255615160805 #611756800346679486]
    - Caused By (java.sql
    .SQLException: ORA-20005: prc_my_sp - ORA-30678: too many open connections
    ORA-06512: at "SYS.UTL_TCP", line 28
    ORA-06512: at "SYS.UTL_TCP", line 257
    ORA-06512: at "SYS.UTL_SMTP", line 115
    ORA-06512
    ORA-06512: at "MY_PKG", line 1378
    {code}Still, I'm not able to make out how to resolve this error.
    
    We use 
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    "CORE     10.2.0.4.0     Production"
    TNS for Solaris: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    
    Please throw some light on cause and resolution.
    
    
    
    Thanks,
    Sam
    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    Yes, you need to open the connection outside of the loop.

  • ORA-02020: too many links from database in use

    Hello


    I have a procedure with a loop like this:


    ---------------------
    loop
    ...
    -set the values of the variables otable1 and otable2;
    otable1: = 'tspace1.table1@dblink1 ';
    otable2: = 'tspace2.table2@dblink2 ';
    ...
    osql: = "insert" | otable1 | ' Select * from ' | '. otable2;
    ...
    run immediately (osql)
    ...
    commit;
    end loop;
    ---------------------


    This program worked until the number of lines increased and over several servers and I got the error ora-02020.


    I have a dozen servers, in which this procedure should be able to copy the data from all servers in ten courses on a backup server.


    I put init.ora - open_links = 500 - the server running the dynamic SQL code, which is not the source or destination server.


    Any suggestions are greatly appreciated

    Sorry, confusion:

    user652257 wrote:
    It seems like these settings change have not been rewarded (default = 4):

    Open_links = 500
    open_links_per_instance = 500

    I reboot all servers.

    The init.ora file is common here: c:\oracle11g\dbs

    This means that you do not use the SPFILE in problem servers?

  • ORA-02045: too many local sessions involved in the overall transaction

    Hello
    It has to do with the solution I got from my previous in post

    change the column using the trigger

    This solution works in my local scheme. But when this test in the real application.
    I got above error.

    may I know what is the reason?

    Thank you

    You are most welcome ;)

  • 3D SDO_GEOMETRY too many arguments problem

    Hello world

    I have a problem when creating a sdo_geometry with many surfaces and encountered the problem that: ORA-00939: too many arguments for function 00939. 00000 - "too many arguments for the function.

    To be more precise, in our work, we will generate some points to form a solid or a multi-surface as a form of query to run SDO_ANYINTERACTION. However, there are a lot of affected areas. I used the following function, where the number of surface is 20, it works fine. When I use 30 or 60 with matching sdo_elem_info_array and sdo_ordinate_array surfaces, it would not work with the above error.

    CB.NAME SELECT the name OF CB DEMO_3D where SDO_ANYINTERACT (CB. GEOM, SDO_GEOMETRY (3007, 2157, NULL, SDO_ELEM_INFO_ARRAY (1 100 620, 1, 1003, 1.37, 1003, 1.73, 1003, 1 109, 1003, 1 145, 1003, 1 181, 1003, 1 217, 1003, 1 253, 1003, 1 289, 1003, 1 325, 1003, 1 361, 1003, 1 397, 1003, 1 433, 1003, 1 469, 1003, 1 505, 1003, 1 541, 1003, 1 577, 1003)) (((, 1 613, 1003, 1 649, 1003, 1 685, 1003, 1 721, 1003, 1 757, 1003, 1 793, 1003, 1 829, 1003, 1 865, 1003 1 901, 1003, 1 937, 1003, 1 973, 1003, 1,1009, 1003, 1,1045, 1003, 1,1081, 1003, 1,1117, 1003, 1,1153, 1003, 1,1189, 1003, 1,1225, 1003, 1,1261, 1003, 1,1297, 1003, 1,1333, 1003, 1,1369, 1003, 1,1405, 1003, 1), SDO_ORDINATE_ARRAY (...))) = "TRUE";

    Right now, we use the Oracle 11 g release 1
    Anyone know if there is any restriction specifying surfaces how we can have in the SDO_ELEM_INFO_ARRAY, or something else. Thanks in advance.

    --------------------------------------update----------------------------------
    I just tested, the total number allowed is 27 surfaces in the SDO_ELEM_INFO_ARRAY and the SDO_ORDINATES. Thank you

    Best regards
    Junjun

    Published by: sandrine on October 21, 2010 14:57

    Hi, -.
    Links see the link for an insert for example.
    Your case will be similar to the following:

    SQL> set serveroutput on
    SQL>  declare
      2  ords sdo_ordinate_array;
      3   result varchar2(20);
      4  begin
      5  ords:= sdo_ordinate_array(1,2,10);
      6   execute immediate 'select  sdo_geom.relate(sdo_geometry (3001, 2157, null, sdo_elem_info_array(1,1,1), sdo_ordinate_array(1,2,11)), ''anyinteract'', sdo_geometry(3001,2157, null,sdo_elem_info_array(1,1,1)'||
      7   ' , :ords), 0.0005)  from dual' into result using ords;
      8   dbms_output.put_line('result is: '|| result);
      9  end;
     10  /
    result is: FALSE
    
    PL/SQL procedure successfully completed.
    

    In your case, please replace #5 with your details (in parentheses) line.
    Your immediate statement execution online #6 & #7 will be something like:

    execute immediate 'SELECT CB.NAME name FROM DEMO_3D CB where SDO_ANYINTERACT(CB.GEOM, SDO_GEOMETRY(3007, 2157, NULL, SDO_ELEM_INFO_ARRAY(1,1006,20, 1, 1003, 1,37, 1003, 1,73, 1003, 1,109, 1003, 1,145, 1003, 1,181, 1003, 1,217, 1003, 1,253, 1003, 1,289, 1003, 1,325, 1003, 1,361, 1003, 1,397, 1003, 1,433, 1003, 1,469, 1003, 1,505, 1003, 1,541, 1003, 1,577, 1003, 1,613, 1003, 1,649, 1003, 1,685, 1003, 1,721, 1003, 1,757, 1003, 1,793, 1003, 1,829, 1003, 1,865, 1003, 1,901, 1003, 1,937, 1003, 1,973, 1003, 1,1009, 1003, 1,1045, 1003, 1,1081, 1003, 1,1117, 1003, 1,1153, 1003, 1,1189, 1003, 1,1225, 1003, 1,1261, 1003, 1,1297, 1003, 1,1333, 1003, 1,1369, 1003, 1,1405, 1003, 1) ' ||
    ', : ords)) =''TRUE'' ' into result using ords;
    

    Note that "is not double quotes.
    I hope this helps.
    Thank you

  • too many return values for a single node

    I have a table with two columns

    the table structure
    ----------------------
    string school_name type
    xmltype obj_xml

    Row1
    ----------
    abc_school,
    < student >
    < student >
    < id > 101 / < ID >
    < teacher > CBA < / teacher >
    < / student >
    < student >
    < id > 102 / < ID >
    XYZ < teacher > < / teacher >
    ONP < teacher > < / teacher >
    RSM < teacher > < / teacher >
    < / student >
    < / students >

    row2
    -----------
    def_school,
    < student >
    < student >
    < id > 301 / < ID >
    pqr < teacher > < / teacher >
    < / student >
    < student >
    < id > 302 / < ID >
    XYZ < teacher > < / teacher >
    < / student >
    < / students >


    is it possible to display data in the format using a query oracle below.
    ---------------------------------------------------------------------------------------------------
    teacher id school_name
    --------------------- ------- ------------
    abc_school 101 abc
    abc_school 102 xyz
    abc_school 102 onp
    RSM abc_school 102


    I used the slot request, throwing an error - too many return values for a single node

    SELECT school_name, teacher
    ExtractValue (value (x), ' / / key ') like student_id
    extractValue (value (x), ' / / value ') AS teacher
    SCHOOL t,.
    TABLE)
    XMLSequence (extract (obj_xml, ' / students/pupils '))
    ) x

    Please post How can I modify this query, the teacher tags may vary for each student

    Published by: user7955917 on May 8, 2012 04:00

    As mentioned in your other thread today, it would be helpful if you could post your exact version of db.
    Samples of work would be appreciated too, the XML data, you gave are not correct.

    I would do it with two XMLTables, like this:

    SQL> SELECT school_name
      2       , x1.id
      3       , x2.teacher
      4  FROM school t
      5     , XMLTable('/students/student'
      6         passing t.obj_xml
      7         columns id       number   path 'id'
      8               , teachers xmltype  path 'teacher'
      9       ) x1
     10     , XMLTable('/teacher'
     11         passing x1.teachers
     12         columns teacher  varchar2(30) path '.'
     13       ) x2
     14  ;
    
    SCHOOL_NAME                            ID TEACHER
    ------------------------------ ---------- ------------------------------
    abc_school                            101 abc
    abc_school                            102 xyz
    abc_school                            102 onp
    abc_school                            102 rsm
    def_school                            301 pqr
    def_school                            302 xyz
    
    6 rows selected
     
    
  • PLS-00307: too many statements of 'F' is this call

    Hi friends,

    I created a package (OL) using procedure overloading.

    Package specifications:

    CREATE or REPLACE package SDR_SPRUSR.ol as
    f procedure (number p);
    f procedure (p varchar2);
    f procedure (p q number, varchar2);
    f procedure (p number, q varchar2);
    f procedure (number p, q, r varchar2);
    end;
    /

    Package body:

    CREATE or REPLACE package body SDR_SPRUSR.ol as
    f procedure (number of p) is
    Start
    dbms_output.put_line ('f < number > called');
    end;

    f procedure (p varchar2) is
    Start
    dbms_output.put_line ('f < varchar > called');
    end;

    f procedure (p varchar2, number of q) is
    Start
    dbms_output.put_line ('f < varchar > called, called < number > f');
    end;

    f procedure (number, varchar2 q p) is
    Start
    dbms_output.put_line ('f < number > called, called < varchar > f');
    end;

    f procedure (p, q number, varchar2 r number) is
    Start
    dbms_output.put_line ('< number > f called < number > called f, f < varchar > called');
    end;

    end;
    /

    But here's the problem:
    When I pass NULL as a parameter like

    BEGIN
    SDR_SPRUSR. OL. F (NULL);
    END;

    I get an error in SQL * more:

    ERROR at line 3:
    ORA-06550: line 3, column 4:
    PLS-00307: too many statements of 'F' is this call
    ORA-06550: line 3, column 4:
    PL/SQL: Statement ignored

    How can I get this error? Please give me a solution...
    (My requirement is to display a friendly message when NULL is passed).

    Thank you.

    Kind regards
    Vivek

    Published by: 847837 on March 28, 2011 01:35
    Can't we display a user friendly message showing "PASS SUFFICIENT VALUES"? 
    

    Why so no change your function as follows

    procedure f (p number) is
    begin
    if p is null then
      dbms_output.put_line('f  called ==> pass sufficient values');
    end if;
    end;
    

    But even in this case you need to qualify your input parameter with to_number to_char for overload to work properly

    or give the default value for your setting if possible

    Best regards

    Mohamed Houri

Maybe you are looking for