Home » SQL & PL/SQL » SQL & PL/SQL » ORA-00939: too many arguments for function
ORA-00939: too many arguments for function [message #186417] Mon, 07 August 2006 21:35 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

If VAR_COMBINED_RECORD consists of 11128 characters and below, then it will be fine.

Any comments?? Thanks...
Re: ORA-00939: too many arguments for function [message #186418 is a reply to message #186417] Mon, 07 August 2006 21:45 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>Any comments?? Thanks.
What problem are you really trying to solve?
What does VAR_COMBINED_RECORD contain at the time of the error?
Re: ORA-00939: too many arguments for function [message #186420 is a reply to message #186417] Mon, 07 August 2006 22:02 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: partitions
Next Topic: Cache memory
Goto Forum:
  


Current Time: Thu Dec 08 04:06:02 CST 2016

Total time taken to generate the page: 0.06413 seconds