Home » Server Options » Spatial » ORA-0939: too many arguments for function
ORA-0939: too many arguments for function [message #75825] Tue, 24 February 2004 05:30 Go to next message
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 #75860 is a reply to message #75825] Tue, 08 February 2005 11:27 Go to previous messageGo to next message
Max Ryvkin
Messages: 1
Registered: February 2005
Junior Member
i was looking for an answer to the same question.
Jusst wondering, since it has been a while since you posted the question, have you been able to resolve this issue and have more then 500 point line stores in a record?
Thank you,
Max
Re: ORA-0939: too many arguments for function [message #111486 is a reply to message #75860] Wed, 16 March 2005 14:17 Go to previous messageGo to next message
Frank Naude
Messages: 4420
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 #111891 is a reply to message #111486] Mon, 21 March 2005 10:42 Go to previous messageGo to next message
nsibille
Messages: 4
Registered: March 2005
Junior Member
Hi,

yes for this syntax but I have 1600 coordinates and i don't see who to do this

Thanks

Bye
Re: ORA-0939: too many arguments for function [message #111987 is a reply to message #111891] Tue, 22 March 2005 04:30 Go to previous messageGo to next message
Frank Naude
Messages: 4420
Registered: April 1998
Senior Member
Why not? Please post your attempt (using the provided syntax) so we can look at it.

Best regards.

Frank
Re: ORA-0939: too many arguments for function [message #112017 is a reply to message #75825] Tue, 22 March 2005 07:37 Go to previous messageGo to next message
nsibille
Messages: 4
Registered: March 2005
Junior Member
Hi,

I want insert into a geometry 1500-1600 coordinates (500 points : x,y,z)
These coordinates provides from file. I try to insert this since VB + 0040 and with PL/SQL
but I am stop by size request.

Best regards.

Nicolas
Re: ORA-0939: too many arguments for function [message #112066 is a reply to message #112017] Tue, 22 March 2005 15:02 Go to previous messageGo to next message
Frank Naude
Messages: 4420
Registered: April 1998
Senior Member
What are you talking about? Please post your PL/SQL code with the complete error so we can look into it.

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 Go to previous messageGo to next message
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 #152244 is a reply to message #112120] Wed, 21 December 2005 19:03 Go to previous messageGo to next message
drohrer159
Messages: 1
Registered: December 2005
Junior Member
CAn someone tell me what the technical limitation is for the number of vertices of a polygon in Oracle Spatial?

thanks
Re: ORA-0939: too many arguments for function [message #185297 is a reply to message #112066] Tue, 01 August 2006 02:04 Go to previous messageGo to next message
satishkumarvarma
Messages: 1
Registered: July 2006
Location: hyderabad
Junior Member


yes i find one solution using this syntax but i face one more problem. if you have any solution then reply back



SQL> alter type mdsys.sdo_ordinate_array modify limit 1148576 cascade;
alter type mdsys.sdo_ordinate_array modify limit 1148576 cascade
*
ERROR at line 1:
ORA-22324: altered type has compilation errors
ORA-22332: a dependent object in schema "CHENNAISVG" has errors.
ORA-04045: errors during recompilation/revalidation of MDSYS.SPATIAL_INDEX
ORA-06552: PL/SQL: Declaration ignored
ORA-06553: PLS-201: identifier 'PRVT_IDX' must be declared
ORA-06552: PL/SQL: Declaration ignored
ORA-06553: PLS-201: identifier 'PRVT_IDX' must be declared


SQL> show errors
No errors.
SQL> desc MDSYS.SPATIAL_INDEX
ERROR:
ORA-04045: errors during recompilation/revalidation of MDSYS.SPATIAL_INDEX
ORA-06552: PL/SQL: Declaration ignored
ORA-06553: PLS-201: identifier 'PRVT_IDX' must be declared
Re: ORA-0939: too many arguments for function [message #400743 is a reply to message #185297] Wed, 29 April 2009 07:12 Go to previous messageGo to next message
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)
Re: ORA-0939: too many arguments for function [message #442565 is a reply to message #111486] Tue, 09 February 2010 02:16 Go to previous message
sueazri
Messages: 2
Registered: February 2010
Location: malaysia
Junior Member

hi frank..

may i know which part to insert the coordinates?

i have more than 1000 points to be inserted into the database.

according to your pl/sql code, which part to insert the coordinate?

SQL> DECLARE
2 ord sdo_ordinate_array := sdo_ordinate_array(is it this part??);
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 /
Previous Topic: Querying only SDO_ORDINATES information from SDO_GEOMETRY Object
Next Topic: SDO_NN error
Goto Forum:
  


Current Time: Tue Sep 23 11:27:51 CDT 2014

Total time taken to generate the page: 0.10024 seconds