| ORA-0939: too many arguments for function [message #75825] |
Tue, 24 February 2004 05:30  |
Aaron Messages: 13 Registered: January 2002 |
Junior Member |
|
|
Hi All,
Have a program that loads some GEOM objects. I have around 1200 points (2400 actual lat/lon) to describe one object and I get the ORA-00939 error. What is the work. Is anyone else getting real bored of the damn 1000 array limits. I hit this limit in Oracle on regular basis.
TIA
Aaron
PS remove NO from email
|
|
|
|
| Re: ORA-0939: too many arguments for function [message #111486 is a reply to message #75860] |
Wed, 16 March 2005 14:17   |
Frank Naude Messages: 4179 Registered: April 1998 |
Senior Member |
|
|
Hi,
If you need to insert more than 999 values into the SDO_ELEM_INFO or SDO_ORDINATES arrays, load the data from a program or use PL/SQL to load the data. Here is a quick example:
SQL> CREATE TABLE test_geom (id NUMBER, g1 mdsys.sdo_geometry);
Table created.
SQL>
SQL> DECLARE
2 ord sdo_ordinate_array := sdo_ordinate_array();
3 BEGIN
4 FOR i IN 1 .. 5000 LOOP
5 ord.EXTEND;
6 ord(i) := i; -- Initialize a large ordinate array...
7 END LOOP;
8
9 INSERT INTO test_geom VALUES (1,
10 sdo_geometry(2001, null, null,
11 sdo_elem_info_array(1, 1, 6),
12 ord));
13 END;
14 /
PL/SQL procedure successfully completed.
Best regards.
Frank
|
|
|
|
|
|
|
| Re: ORA-0939: too many arguments for function [message #112120 is a reply to message #75825] |
Wed, 23 March 2005 02:30   |
nsibille Messages: 4 Registered: March 2005 |
Junior Member |
|
|
Hi,
Since my email, I have find a solution but I don't know if it's better. In my program I'm create table temporary and I insert into coordinates, next I use this routine PL/SQL and it's means OK (I have not end all test) :
Declare
CURSOR C_EMP IS Select * From VERTEX_TMP;
ord mdsys.sdo_ordinate_array := mdsys.sdo_ordinate_array();
indice number(4) := 1;
Begin
For Cur IN C_EMP Loop
ord.EXTEND;
ord(indice) := cur.PT;
indice := indice + 1;
End loop ;
INSERT INTO TEST VALUES (1,mdsys.sdo_geometry(3003, null, null,mdsys.sdo_elem_info_array(1, 1003, 1),ord));
End ;
/
I do all with Visual Basic 5 and Oracle InProc Server 4.0 Type Library.
Best regards.
Nicolas
|
|
|
|
|
| Re: ORA-0939: too many arguments for function [message #400743 is a reply to message #185297] |
Wed, 29 April 2009 07:12  |
PavelR Messages: 1 Registered: April 2009 |
Junior Member |
|
|
Warning:
executing "alter type mdsys.sdo_ordinate_array modify limit 1148576 cascade;"
can take really long time and if it does not finished correctly, it breaks SDO_xxx types, functions, views, etc. on all instances on a server.
I stopped the script after 3 hours of execution and some objects of MDSYS schema was not "compilable".
The only solution for fixing this situation was to run catmd.sql script (as SYS user).
(Oracle version: 10g)
|
|
|