Too many values when trying insert records by bulk collect

Hi
Can anyone advice on the bulk collect error please?
Following is my code where I am getting too many values error...
TYPE p_empid_type IS TABLE OF emp%ROWTYPE;
      v_empid               p_empid_type;
   BEGIN
      SELECT DISTINCT emp_id , 'ABC'
      BULK COLLECT INTO v_empid
                 FROM emp
                WHERE empid IN (SELECT ord_id
                                   FROM table_x
                                  WHERE column_x = 'ABC');
      FORALL i IN v_empid.FIRST .. v_empid.LAST
         INSERT INTO my_table
              VALUES v_empid(i);
      COMMIT;
PL/SQL: ORA-00913: too many values in line - BULK COLLECT INTO v_empid

Hello, since you're SELECTing a constant string, why not:
TYPE p_empid_type IS TABLE OF INTEGER;
      v_empid               p_empid_type;
   BEGIN
      SELECT DISTINCT emp_id
      BULK COLLECT INTO v_empid
                 FROM emp
                WHERE empid IN (SELECT ord_id
                                   FROM table_x
                                  WHERE column_x = 'ABC');
      FORALL i IN v_empid.FIRST .. v_empid.LAST
         INSERT INTO my_table
              VALUES v_empid(i), 'ABC';
Edit Untested: may not work
This would be the best BULK COLLECT of all:
INSERT /*+ APPEND */ INTO my_table
SELECT DISTINCT emp_id , 'ABC'
  FROM emp
WHERE empid IN (SELECT ord_id
      FROM table_x
     WHERE column_x = 'ABC');
      COMMIT;

Similar Messages

  • Digital Editions - too many activations when trying on Windows 8.1 system  HELP!

    Digital Editions - too many activations when trying on Windows 8.1 system  HELP!

    This is the Reader mforum. The Digital Editions one is here:
    http://forums.adobe.com/community/adobe_digital_editions

  • ORA-00913: too many values when running a Delete

    Hi When I run the both the select statements inlcuding the minus it works,
    but when I run the Delete statement it gives me error ORA-00913: too many values
    Can someone tell me if there is anything I am missing
    DELETE FROM tablename where rowid in
    select rowid,
    to_number(lndr_spcl_allow_int_rate_pct),
    tablename.lndr_spcl_end_prin_bal_amt,
    tablename.lndr_spcl_avg_dly_prin_bal_amt,
    tablename.lndr_spcl_adj_avg_dly_prin_amt,
    tablename.calculated_amt,
    tablename.paid_amt,
    tablename.reported_amt,
    --tablename.processing_date_id, this date changes 
    tablename.date_paid_id,
    tablename.lndr_spcl_allwnc_ctgry_id,
    tablename.affected_period_qtr_date_id,
    tablename.loan_type_id,
    tablename.lndr_id,
    tablename.report_fiscal_qtr_date_id,
    tablename.report_qtr_date_id,
    tablename.lndr_geography_id,
    tablename.lndr_billing_code_id,
    tablename.orig_billing_code,
    tablename.orig_allowance_category,
    tablename.form_id,
    tablename.srvcr_id,
    tablename.document_long_desc,
    tablename.document_date_id,
    tablename.affected_period_qtr_date_desc,
    tablename.document_type
    from tablename
    where lndr_spcl_allow_int_rate_pct not like ('%V%')
    and lndr_spcl_allow_int_rate_pct not like ('N%')
    minus
    select min(rowid),
    to_number(lndr_spcl_allow_int_rate_pct),
    tablename.lndr_spcl_end_prin_bal_amt,
    tablename.lndr_spcl_avg_dly_prin_bal_amt,
    tablename.lndr_spcl_adj_avg_dly_prin_amt,
    tablename.calculated_amt,
    tablename.paid_amt,
    tablename.reported_amt,
    --tablename.processing_date_id, this date changes 
    tablename.date_paid_id,
    tablename.lndr_spcl_allwnc_ctgry_id,
    tablename.affected_period_qtr_date_id,
    tablename.loan_type_id,
    tablename.lndr_id,
    tablename.report_fiscal_qtr_date_id,
    tablename.report_qtr_date_id,
    tablename.lndr_geography_id,
    tablename.lndr_billing_code_id,
    tablename.orig_billing_code,
    tablename.orig_allowance_category,
    tablename.form_id,
    tablename.srvcr_id,
    tablename.document_long_desc,
    tablename.document_date_id,
    tablename.affected_period_qtr_date_desc,
    tablename.document_type
    from tablename
    where lndr_spcl_allow_int_rate_pct not like ('%V%')
    and lndr_spcl_allow_int_rate_pct not like ('N%')
    group by to_number(lndr_spcl_allow_int_rate_pct),
    tablename.lndr_spcl_end_prin_bal_amt,
    tablename.lndr_spcl_avg_dly_prin_bal_amt,
    tablename.lndr_spcl_adj_avg_dly_prin_amt,
    tablename.calculated_amt,
    tablename.paid_amt,
    tablename.reported_amt,
    --tablename.processing_date_id, this date changes 
    tablename.date_paid_id,
    tablename.lndr_spcl_allwnc_ctgry_id,
    tablename.affected_period_qtr_date_id,
    tablename.loan_type_id,
    tablename.lndr_id,
    tablename.report_fiscal_qtr_date_id,
    tablename.report_qtr_date_id,
    tablename.lndr_geography_id,
    tablename.lndr_billing_code_id,
    tablename.orig_billing_code,
    tablename.orig_allowance_category,
    tablename.form_id,
    tablename.srvcr_id,
    tablename.document_long_desc,
    tablename.document_date_id,
    tablename.affected_period_qtr_date_desc,
    tablename.document_type)

    Perhaps this should be your final query ->
    DELETE FROM tablename
    where rowid in (
                      select rowid
                      from tablename
                      where lndr_spcl_allow_int_rate_pct not like ('%V%')
                      and lndr_spcl_allow_int_rate_pct not like ('N%')
                      minus
                      select min(rowid)
                      from tablename
                      where lndr_spcl_allow_int_rate_pct not like ('%V%')
                      and lndr_spcl_allow_int_rate_pct not like ('N%')
                      group by to_number(lndr_spcl_allow_int_rate_pct),
                      tablename.lndr_spcl_end_prin_bal_amt,
                      tablename.lndr_spcl_avg_dly_prin_bal_amt,
                      tablename.lndr_spcl_adj_avg_dly_prin_amt,
                      tablename.calculated_amt,
                      tablename.paid_amt,
                      tablename.reported_amt,
                      --tablename.processing_date_id, this date changes
                      tablename.date_paid_id,
                      tablename.lndr_spcl_allwnc_ctgry_id,
                      tablename.affected_period_qtr_date_id,
                      tablename.loan_type_id,
                      tablename.lndr_id,
                      tablename.report_fiscal_qtr_date_id,
                      tablename.report_qtr_date_id,
                      tablename.lndr_geography_id,
                      tablename.lndr_billing_code_id,
                      tablename.orig_billing_code,
                      tablename.orig_allowance_category,
                      tablename.form_id,
                      tablename.srvcr_id,
                      tablename.document_long_desc,
                      tablename.document_date_id,
                      tablename.affected_period_qtr_date_desc,
                      tablename.document_type
                    );N.B.: Not Tested...
    Regards.
    Satyaki De.

  • 'disk too slow' problems when trying to record ONE TRACK on my ibook.

    okay- help guys. my new ibook freezes after not even a minute of one track live recording and i ge the disk too slow error. i'm using a basic m-audio usb interface with the internal (4200 rpm) hard drive. i know this isn't a fast hard drive, but SURELY. one track? i've been in touch with m audio, reinstalled driver, repaired hard disk permissions. still no good. i only ever need to record two live tracks at a time, but then i do need to stack them up a bit. is my ibook really incapable of that? i'm shocked if it is. anyone want to buy an ibook?
    any advice much appreciated as i'm going out of my mind.
    happy christmas,
    adam gilhespy

    Adam:
    You haven't given a lot of info, but here are a couple of ideas:
    1) What sample rate are you using? You should be at 44.1 or 48 kHz. Don't even think of anything higher.
    2) Are you recording in a new arrange window? Or are you overdubbing to existing tracks? If so, freeze all your existing tracks.
    3) Are you attempting to use any plugins while you're recording? If you are, turn them off for now.
    4) How much RAM do you have installed? You need at least 768 MB; more preferably.
    5) You're going to need an external drive eventually, but to record one track should be easily done.

  • Insert ORA-00913: too many values  --  urgent help

    Hi there
    Its pretty urgent, got  stuck up....
    To avoid the undo snapshot error, I am using this procedure to migrate the smaller chunks of  huge volume of  table data into new tables. This below code works well if the columns  are very less. And this procedure is not working if the tables columns are morethan 30 columns and throwing the error   PL/SQL: ORA-00913: too many values
    CREATE OR REPLACE PROCEDURE migration AS
       TYPE array_tp IS TABLE OF tranproc%ROWTYPE;
       l_array array_tp;
       CURSOR c IS
          select * from tranproc p where trunc(date)<=trunc(sysdate)-180;
       l_cnt1 NUMBER :=0;
       l_cnt2 NUMBER :=0;
       l_cnt3 NUMBER :=0;
    BEGIN
       OPEN c;
       LOOP
          FETCH c BULK COLLECT INTO l_array LIMIT 10000;
          EXIT WHEN l_array.COUNT = 0;
          l_cnt1 := c%ROWCOUNT;
          FORALL i IN 1 .. l_array.COUNT
             INSERT INTO TMP_Transpoc VALUES l_array(i);
          l_cnt2 := l_cnt2 + SQL%rowcount;
       END LOOP;
       l_cnt3 := c%ROWCOUNT;
       CLOSE c;
       END;
    16    22    PL/SQL: ORA-00913: too many values
    its falling
    line 16: INSERT INTO TMP_Transpoc VALUES l_array(i);
    Above table i.e tranproc  has around 80 columns .
    i am not pl/sql expert, kindly advise how to resolve it.. i am fine with  alternative approach, just i need a smaller chunk commit.

    Actually, Direct Path does not necessarily require NOLOGGING. If you successfully invoke Direct Path (look for LOAD AS SELECT or DIRECT LOAD INTO in the execution plan) then you are inserting into blocks above the high-water mark (HWM) and there is virtually no UNDO generated for the changes in the table segment.
    However, the index maintenance (if any) will require UNDO, and it may be a lot. If this is going into a new table, then you should be able to create the index after the table is populated.
    Also beware of the NOLOGGING advice. In many cases, an individual SQL statement can not disable logging. And yet, if you do bypass REDO logging, be very sure you understand the consequences for your ability to recover.

  • I tried to send a mail message to too many addees. when the rejection came back "cannot send message using the server..." the window is too long to be able to see the choices at the bottom of it. how can i see the choices at the bottom of that window?

    I tried to send a mail message to too many addees. when the rejection came back "cannot send message using the server..." the window is too long to be able to see the choices at the bottom of it. how can I see the choices at the bottom of that window?

    I tried to send it through gmail and the acct is  a POP acct
    I'm not concerned about sending to the long address list. I just can't get the email and window that says "cannot send emai using the server..." to go away. The default must be "retry", because although I cannot see the choices at the bottom of the window if I hit return it trys again... and then of course comes back with the very long pop up window that I cannot see the bottom of so I can tell it to quit trying...

  • HELP! Safari says cant open the page, too many redirects occurred trying to open (web address) when trying to access research paper sites - doesnt happen elsewhere

    Hi there,
    Ive been trying to open research articles through google scholar, when i click to open the page it doesnt load and comes up with Safari cant open the page, too many redirect occured trying to open (then the web address). This might occur if you open a page that is redirected to open another page which is then redirected to open the original page.
    This also happens when i access the databases through my universitys library web page - and it still wont let me load even the actual webpage let along particular article.
    This is happening on my ipad as well - but this is not happening on my iphone or on my other lap top which is not an APPLE.
    i know its not my internet as i used the same internet on the other comp and i also used it as wifi and without out wifi on my iphone.
    PLEASE HELP! i need to study!!
    thanks

    Safari 6
    Empty Caches
    Safari > Preference > Advanced
    Checkmark the box for "Show Develop menu in menu bar".
    Develop menu will appear in the Safari menu bar.
    Click Develop and select "Empty Caches" from the dropdown.
    Remove website data.
    Safari > Preferences > Privacy > "Remove All Website Data".
    http://support.apple.com/kb/TS3320

  • ROWTYPE and "Too many values" error...

    I'm in the middle of trying to understand the inner workings of %ROWTYPE and how I can copy the structure of a table with it. I think I'm understanding the gist of it, but I continue to fail in pinpointing the actual values I try to insert with an example tutorial I'm using at the moment and was hoping someone could help me understand my problem better so that I can bridge this mental gap I seem to be slipping into...
    That said, I have the following table: ct_employee
    The columns of this table (and their schema settings) are as follows:
    empno - NUMBER(4,0)
    ename - VARCHAR2(20)
    job - VARCHAR2(20)
    mgr - NUMBER(4,0)
    hiredate - DATE
    sal - NUMBER(7,2)
    comm - NUMBER(7,2)
    ct_department - NUMBER(2,0)The SQL I'm using in all this is the following:
    SET VERIFY OFF
    DEFINE emp_num = 7369;
    DECLARE
      emp_rec ct_retired_emps%ROWTYPE;
    BEGIN
      SELECT *
      INTO emp_rec
      FROM ct_employee
      WHERE empno = &emp_num;
      emp_rec.leavedate := SYSDATE;
      UPDATE ct_retired_emps SET ROW = emp_rec
      WHERE empno = &emp_num;
    END;As I hope you can tell from the above, I'm trying to create a variable (emp_rec) to store the structure of ct_employee where upon I then copy a record into emp_rec if and only if the empno column from ct_employee matches that of the emp_num "7369".
    I'm using SQL*PLUS with 10g in all this (+a program I love, by the way; it's really easy to use and very informative+) and when I press the "Run Script" button, I receive the following Script Output:
    Error report:
    ORA-06550: line 6, column 3:PL/SQL: ORA-00913: too many values
    ORA-06550: line 4, column 3:
    PL/SQL: SQL Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:>
    What I translate from this is that there's either a column number mismatch or else there's some value being attempted to be inserted into the variable I created that isn't matching the structure of the variable.
    Anyway, if someone around here could help me with this, you would make my day.

    It's still not updating the table. :(
    Here's where I am...
    I currently have the following pl/sql:
    SET VERIFY OFF
    DEFINE emp_num = 7369;
    DECLARE
      emp_rec ct_retired_emps%ROWTYPE;
    BEGIN
      SELECT *
      INTO emp_rec
      FROM ct_employee
      WHERE empno = &emp_num;
      emp_rec.leavedate := SYSDATE;
      UPDATE ct_retired_emps SET ROW = emp_rec
      WHERE empno = &emp_num;
    END;I'm trying to avoid as much hard-coding as possible, hence my use of the all selector, but because of this, SQL*Plus is now giving me a run-time error of the following:
    Error report:ORA-06550: line 6, column 3:
    PL/SQL: ORA-00913: too many values
    ORA-06550: line 4, column 3:
    PL/SQL: SQL Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:>
    So to remedy this, I then try the following revised PL/SQL:
    SET VERIFY OFFDEFINE emp_num = 7369;
    DECLARE
    emp_rec ct_retired_emps%ROWTYPE;
    BEGIN
    SELECT empno, ename, job, mgr, hiredate, SYSDATE as leavdate, sal, comm, ct_department
    INTO emp_rec
    FROM ct_employee
    WHERE empno = &emp_num;
    UPDATE ct_retired_emps SET ROW = emp_rec
    WHERE empno = &emp_num;
    END;>
    This time, everything runs smoothly, however, no information is updated into the ct_retired_emps! Ha!
    I've verified that there's a record in ct_employee that has "7369" for its empno column value, so there should be no missing value concern from all this. The only other thing I can think of is that there must be something askew with my logic, but as to what, I have no clue. Below are my columns for both tables:
    ct_employee -
    empno, ename, job, mgr, hiredate, sal, comm, ct_department
    ct_retired_emps -
    empno, ename, job, mgr, hiredate, leavedate, sal, comm, deptno
    My immediate questions:
    1.) I know nothing about debugging or troubleshooting PL/SQL, but I do know that I need to review the contents of the emp_rec variable above to see what all is inside it so that I can better assess what's going on here. I've tried to use DBMS_OUTPUT.PUT_LINE(emp_rec) but this does nothing and only creates another run-time error. What's a way in which I can output the contents of this regardless of run-time success? Would I need to code in an EXCEPTION section and THEN use DBMS_OUTPUT...?
    2.) SELECTING * in the first snippet above meant that I was disallowed the use of the emp_rec.leavedate := SYSDATE; after the SELECT. How might oneself SELECT * AND+ use emp_rec.leavedate := SYSDATE; in the same EXECUTION section?
    3.) With everything I've provided here, do you see any obvious issues?
    It doesn't take a genius to realize I'm new at this stuff, but I am trying to provide everything I can to learn here so if any of you can help this poor guy out, he'd be very grateful.

  • JDBC receiver error - ORA-00913: too many values

    Hi all,
    Facing a strange issue with proxy-jdbc issue.
    Message fails with error - ORA-00913: too many values
    Handling the missing fields from the source with - Empty String in the comm. Channel
    Empty string handling works fine - whenever there is no value coming form souce, null is inserted into the field value on the DB.
    Trying to insert the same data manually, it works fine. But gives this error END2END.
    When testing END2END, if the field values are made couple of chars less in length, that works fine....fails with the actual data.....seems to be the issue with the field lenghts on the DB.
    Increased all the lengths by 10 chars..still does not work.
    Except the key fields of the DB table, all others are nullable.
    Is there anything else, I am missing...
    Note: Generally, ORA-00913: too many values comes when the number of fields and the number of values donot match in an INSERT/UPDATE statement.
    reg

    Hi
    When testing END2END, if the field values are made couple of chars less in length, that works fine....fails with the actual data.....seems to be the issue with the field lenghts on the DB.
    Increased all the lengths by 10 chars..still does not work
    Well the error you mention generally occurs when the insert statement has more fields mention than in the table .ie you are mentioning extra field .aur this error is due to the field lenght of any of the filed you had to check in the oracle itself  by using the command DESCRIBE there you ll be able to see the field lenght of each and every field .
    hope your problem got resolved :
    Regard's
    Chetan Ahuja

  • SQL question too many values?

    Hey guys I have written an SQL script but it keeps erroring saying too many values I have this at the moment
    SELECT DISTINCT Student.studentID, Student_medical.medical_complaint, Student_medical.medical_treatment
    FROM Student, student_medical
    IN (SELECT Student.studentID, Matron.staffno
    FROM Student, Matron)
    Group by Student.studentID;
    Basically what I'm trying to do is match the student ID to the medical complaint and treatment they have had and then match the student ID to the Matron that gave the treatment
    Any help you can provide would be greatly appreciated :)
    Thanks for reading.

    SomeoneElse wrote:
    Your subquery is wrong. You're using an in clause with one column but your subquery has two columns.
    Also, you have two tables in the subquery but no join condition.
    Can you include the matron table in the join with your other tables instead of a subquery?I tried this but it when I do the where clause to match up the matron that treated the student I for some reason get a result where the student ID = the matron ID so student ID is 9 the matron ID will be 9 and next row the STUDENT ID could be 1 and the MATRON ID will be 1 which is wrong :(! so I'm not sure what to do

  • Pl/Sql block returning too many values

    Hi
    Below is simple pl/sql block.while excecuting this i'm getting too many values exception
    declare
    attrib QW_ACCT_ATTR%ROWTYPE;
    begin
    SELECT ATTR_END_DATE, ATTR_NM, ATTR_VAL INTO attrib FROM (SELECT ATTR_END_DATE, ATTR_NM, ATTR_VAL FROM QW_ACCT_ATTR where CUST_ACCT_ID='5158660414' AND ATTR_NM = 'SS' ORDER BY ATTR_END_DATE DESC) where rownum = 1;
    DBMS_OUTPUT.PUT_LINE('end daate is...'||attrib.ATTR_END_DATE);
    end;
    could anybody please help me how to rewrite this qwery to get only one record.
    we are not supposed to use cursors here,
    thanks

    I am just changing your logic,
    declare
    attrib QW_ACCT_ATTR%ROWTYPE;
    begin
    SELECT ATTR_END_DATE, ATTR_NM, ATTR_VAL INTO attrib FROM (SELECT ATTR_END_DATE, ATTR_NM, ATTR_VAL FROM QW_ACCT_ATTR where CUST_ACCT_ID='5158660414' AND ATTR_NM = 'SS' ORDER BY ATTR_END_DATE DESC where rownum = 1) ;
    DBMS_OUTPUT.PUT_LINE('end daate is...'||attrib.ATTR_END_DATE);
    end;

  • Too many values issues in sub query

    Hi ALL,
    I have a sql query like below :
    SELECT A,B,C,(SELECT D,E,F,G FROM ABC,DEF,... WHERE ABC.ID=DEF.ID......) NAME FROM TEST1,TEST2 WHERE .......
    So my subquery is throwing an error as too many values so how can i get column values in my subquery through single select statement.
    Please help me on this

    user13424229 wrote:
    Hi ALL,
    I have a sql query like below :
    SELECT A,B,C,(SELECT D,E,F,G FROM ABC,DEF,... WHERE ABC.ID=DEF.ID......) NAME FROM TEST1,TEST2 WHERE .......
    So my subquery is throwing an error as too many values so how can i get column values in my subquery through single select statement.Select Sub-Query can Select only 1 Column and 1 Record at a Time.
    If you wish to cater it, you will have to write the same select statement for all the columns individually. viz. D, E, F, G shall amount to 4 individual selects in your main select statement.

  • Multiple Selects = Too many values?

    Hi. I have a table of employees, a table of departments (called accounts), and a table containing test results. Every employee is supposed to have a test each year, unless the test was "positive" in a previous year.
    I want a query that lists everyone that hasn't taken the test, but I don't want to include the ones that were "positive".
    I did some incremental query building, making sure each query returned what I wanted before making it more complex (for me). Apologies if I'm providing too much information.
    This returns just the test results that are positive.
    -- Get list of result codes that are positive
    SELECT ResultID FROM Result WHERE ResultTreatAsPositive = 1;
    This returns everyone that has had a positive result at any time.
    -- Get list of people having positive results at any time
    SELECT DISTINCT empID, empFName, empLName, empAcctNum, actDescription
    FROM Employee, Account, TestResult
    WHERE empID = testEmployeeID
    AND empAcctNum = actNumber
    AND empActive = 1
    AND testResult IN (SELECT ResultID FROM Result WHERE ResultTreatAsPositive = 1)
    ORDER BY actDescription;
    This returns everyone that had a test during the previous year
    -- Get everyone having any results during date range
    SELECT DISTINCT empID, empFName, empLName, empAcctNum, actDescription
    FROM Employee, Account, TestResult
    WHERE empID = testEmployeeID
    AND empAcctNum = actNumber
    AND testReadDate BETWEEN to_date('2005/01/01', 'yyyy/mm/dd') AND to_date('2005/12/31', 'yyyy/mm/dd')
    AND empActive = 1
    ORDER BY actDescription;
    So far, so good. However, when I try to put all of these together, I get errors:
    This should return all employees minus ones with a positive result (at any time) and minus any test taken this year
    -- Get everyone else
    SELECT DISTINCT empID, empFName, empLName, empTitle, empAcctNum, actDescription
    FROM Employee, Account, TestResult
    WHERE empID = testEmployeeID
    AND empAcctNum = actNumber
    AND empActive = 1
    AND (empID NOT IN (SELECT DISTINCT empID, empFName, empLName, empAcctNum, actDescription FROM Employee, Account, TestResult WHERE empID = testEmployeeID AND empAcctNum = actNumber AND empActive = 1 AND testResult IN (SELECT ResultID FROM Result WHERE ResultTreatAsPositive = 1)))
    AND (empID NOT IN (SELECT DISTINCT empID, empFName, empLName, empAcctNum, actDescription FROM Employee, Account, TestResult WHERE empID = testEmployeeID AND empAcctNum = actNumber AND testReadDate BETWEEN to_date('1988/01/01', 'yyyy/mm/dd') AND to_date('2007/01/01', 'yyyy/mm/dd') AND empActive = 1))
    ORDER BY actDescription, empLName, empFName;
    I get ERROR at line 6: (my first empID NOT IN line)
    ORA-00913: too many values.
    How can I write this query so that it works? Any tips are appreciated, even those that point out I can't write a query very well!
    --G                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Missed that one and was thrown off by those 2005, 1998, 2007 dates …
    Looks like you’re on the right track though.Sorry. I cobbled that code from some of my tests (grab everything -- seeing multiple rows makes me feel better!)
    Looking at your suggestion on TRUNC, I can't really do that, as user can specify everyone that doesn't qualify for a single month -- apparently, some departments are assigned a month to have their tests, while others can go the entire year.
    Thanks for the help.
    --G                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ORA-00913: too many values - how to change decimal separator?

    I want to use SQL Developer's database export and need advice how to tweak the decimal separator from , to . in the sql-inserts created.
    Preferrably in SQL Developer, because this error can be easily happen and is hard to catch during import.+
    See below how to reproduce this:
    h3. 1.) ddl (ugly)
    set SERVEROUTPUT on
    CREATE TABLE AADECIMEXPORT
    "DECIMALNUMBER" NUMBER
    , "HUBBABUBBA" varchar2(20 byte)
    CREATE TABLE succeeded.
    h3. 2.) inserts by hand
    insert into AADECIMEXPORT(DECIMALNUMBER,HUBBABUBBA) values(10,'smells integer');
    insert into AADECIMEXPORT(DECIMALNUMBER,HUBBABUBBA) values(3.141592654,'smells rounded pi');
    1 rows inserted
    1 rows inserted
    ¨
    h3. 3.) select * from AADECIMEXPORT
    DECIMALNUMBER HUBBABUBBA
    10 SMELLS INTEGER
    3,141592654 smells rounded pi
    h3. 4.) then use sqldevelopers Tools-"database export" to export this table
    -- File created - tiistai-marraskuu-23-2010
    -- DDL for Table AADECIMEXPORT
    CREATE TABLE "AADECIMEXPORT"
    (     "DECIMALNUMBER" NUMBER,
         "HUBBABUBBA" VARCHAR2(20)
    -- DATA FOR TABLE AADECIMEXPORT
    -- FILTER = none used
    REM INSERTING into AADECIMEXPORT
    Insert into AADECIMEXPORT (DECIMALNUMBER,HUBBABUBBA) values (10,'smells integer');
    Insert into AADECIMEXPORT (DECIMALNUMBER,HUBBABUBBA) values (3,141592654,'smells rounded pi');
    -- END DATA FOR TABLE AADECIMEXPORT
    h3. 5.) Test the insert
    Insert into AADECIMEXPORT (DECIMALNUMBER,HUBBABUBBA) values (3,141592654,'smells rounded pi');
    Error starting at line 49 in command:
    Insert into AADECIMEXPORT (DECIMALNUMBER,HUBBABUBBA) values (3,141592654,'smells rounded pi')
    Error at Command Line:49 Column:12
    Error report:
    SQL Error: ORA-00913: too many values
    00913. 00000 - "too many values"
    *CAUSE:   
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    About
    Oracle SQL Developer 2.1.1.64
    Version 2.1.1.64
    Build MAIN-64.45
    Copyright © 2005,2009 Oracle. All Rights Reserved.
    IDE Version: 11.1.1.2.36.55.30
    Product ID: oracle.sqldeveloper
    Product Version: 11.1.1.64.45
    Version
    Component     Version
    =========     =======
    Java(TM) Platform     1.6.0_14
    Oracle IDE     2.1.1.64.45
    Versioning Support     2.1.1.64.45

  • PL/SQL: ORA-00913: too many values

    I don't find out why i'mg getting an "ORA-00913: too many values" Error
    This Example works fine:
    DECLARE
    TYPE session_type IS TABLE OF v$session%ROWTYPE ;
    blocking_sessions session_type;
    BEGIN
    select * bulk collect into blocking_sessions from v$session where blocking_session is not null;
    END;
    But in this Example i'm getting an ORA-00913. Can anybody tell me what i'm doing wrong?
    DECLARE
    TYPE session_type IS TABLE OF v$session%ROWTYPE ;
    blocking_sessions session_type;
    BEGIN
    select distinct blocking_session bulk collect into blocking_sessions from v$session where blocking_session is not null;
    END;
    select distinct blocking_session bulk collect into blocking_sessions from v$session where blocking_session is not null;
    ERROR at line 7:
    ORA-06550: line 7, column 70:
    PL/SQL: ORA-00913: too many values
    ORA-06550: line 7, column 1:
    PL/SQL: SQL Statement ignored

    OK this one works also:
    DECLARE
    TYPE session_type IS TABLE OF NUMBER ;
    blocking_sessions session_type;
    BEGIN
    select distinct blocking_session bulk collect into blocking_sessions from v$session where blocking_session is not null;
    END;
    But when i'm selecting for about 20 columns of a table with 30 columns. Do I have to declare every single column?

Maybe you are looking for

  • How can i use reuse_alv_fieldcatalog_merge function module

    I am using below steps for populating the final internal table.How can I use reuse_alv_fieldcatalog_merge function module in the place of declaring all these fields.How canI put title of the report in reuse_alv_fieldcatalog_merge function module. FOR

  • Re: kernel_data_inpage_error blue screen on Equium L40

    does anyone know how to help solve my problem please? I get a blue screen of death randomly and then it takes around 30 mins or longer to load my laptop up properly again. It won't boot sometimes and I have to restart until in the f12 option I can se

  • CS5 Image Processor - One script, different image sizes and save locations

    Hello guys! is it possible to make one script to convert several images to different image sizes which should be saved in different locations? The xml structure is clear, but photoshop accepts only the second "script" if i load a test xml file with t

  • Any way to re-capture logged clips to anamorphic setting?

    Hello- I have an FCP project with containing clips with a 16:9 aspect ratio captured with 4:3 aspect ratio setting. I'd like to recapture all of the logged clips using the anamorphic capture setting. However, all the capture information is embedded i

  • I have a problem when i use fetch LAZY

    Hi All i have faced a problem when i have tried FETCH LAZY instead of FETCH EAGER The problem is the table generator return null instead of valid primary key value I dont get what is the problem every thing is ok With the FETCH EAGER please help me i