Home » Server Options » Spatial » ORA-00939: too many arguments for function  () 1 Vote
ORA-00939: too many arguments for function [message #186416] Mon, 07 August 2006 21:30 Go to next message
cavinlam83
Messages: 24
Registered: August 2006
Location: MALAYSIA
Junior Member

CREATE OR REPLACE PROCEDURE "INSERT_GEOLOC"
(
I_UPI VARCHAR
)

IS
cur integer;
rc integer;
VAR_ONE_RECORD VARCHAR2(2498);
VAR_COMBINED_RECORD VARCHAR2(32767);

cursor order_cur IS select line1 from test
where lot=I
order by to_number(ordered);

Begin

OPEN order_cur;
VAR_COMBINED_RECORD := NULL;
VAR_ONE_RECORD := NULL;

LOOP
FETCH order_cur INTO VAR_ONE_RECORD;
EXIT WHEN order_cur%NOTFOUND;
VAR_COMBINED_RECORD := VAR_COMBINED_RECORD||VAR_ONE_RECORD;
END LOOP;
cur := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(cur, VAR_COMBINED_RECORD, DBMS_SQL.NATIVE);
rc := DBMS_SQL.EXECUTE(cur);
DBMS_SQL.CLOSE_CURSOR(cur);


CLOSE order_cur;

commit;

END INSERT_GEOLOC;





My VAR_COMBINED_RECORD consists of 15000 characters. After execute, I encounter error below,

ORA-00939: too many arguments for function
ORA-06512: at "SYS.DBMS_SYS_SQL", line 826
ORA-06512: at "SYS.DBMS_SQL", line 32
ORA-06512: at "NEW_PDUK.INSERT_GEOLOC", line 32
ORA-06512: at line 1



Any comments?? Thanks...
Re: ORA-00939: too many arguments for function [message #186422 is a reply to message #186416] Mon, 07 August 2006 22:04 Go to previous message
cavinlam83
Messages: 24
Registered: August 2006
Location: MALAYSIA
Junior Member

Inside variable VAR_COMBINED_RECORD consists of

INSERT INTO TEST12(GEOLOC) VALUES (MDSYS.SDO_GEOMETRY(2000, NULL, MDSYS.SDO_POINT_TYPE(31576.4215, 22206.9105, null), MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1), MDSYS.SDO_ORDINATE_ARRAY(32389.67, 21463.892,.............)))

total for VAR_COMBINED_RECORD = 15000 characters

After I execute the store procedure, it will insert those values into table TEST12. But after execute, I encounter error below,

ORA-00939: too many arguments for function
ORA-06512: at "SYS.DBMS_SYS_SQL", line 826
ORA-06512: at "SYS.DBMS_SQL", line 32
ORA-06512: at "NEW_PDUK.INSERT_GEOLOC", line 32
ORA-06512: at line 1
Previous Topic: ORA-13193: failed to allocate space for geometry
Next Topic: Host Variable?
Goto Forum:
  


Current Time: Wed Nov 26 17:18:42 CST 2014

Total time taken to generate the page: 0.08634 seconds