Microsoft
Software
Hardware
Network
Question : ORA error-too many values
When I debug, I see the problem was with the execute immediate statement. The table where cursor is selecting the data from is a temporary table available for that session.
PROCEDURE PROGRAMASSIGNMENT_CONV (P_CLIENTID IN NUMBER) IS
TYPE PROGRAMASSIGNMENT_TAB IS TABLE OF PROGRAMASSIGNMENT%ROWTYPE INDEX BY SIMPLE_INTEGER;
L_PROGRAMASSIGNMENT PROGRAMASSIGNMENT_TAB;
-- L_PROGRAMASSIGNMENTID PROGRAMASSIGNMENT.PROGRAMA
SSIGNMENTI
D%TYPE;
L_LIMIT PLS_INTEGER := 500000;
CURSOR CUR_PROGRAMASSIGNMENT IS
SELECT PROGRAMASSIGNMENTID_SEQ.NE
XTVAL,
A.CLIENTID,
A.VENDORID,
A.PID,
A.SUBPID,
A.PROGRAMID,
A.TRIAGEFILTERID,
A.CASEID,
A.CLIENTCASENO,
A.WORKFLOWSTATUS,
A.APPLICATIONID,
A.ISPRIMARYIND,
A.STATUSCHANGEREASONID,
A.INTERVENTIONLEVELID,
A.DMINTERVENTIONTYPEID,
A.PROGRAMRANK,
A.IDENTIFIEDDATE,
A.SELECTEDDATE,
A.OPENEDDATE,
A.CLOSEDDATE,
A.DECLINEDDATE,
A.INTAKEDATE,
A.INTAKESOURCEID,
A.REFERRALID,
A.INSERTEDBY,
sysdate,
A.RUNID
FROM CDRLOAD.GTEMP_BSC_PROGRAMA
SSIGNMENT A;
l_clientname VARCHAR2 (100);
BEGIN
-- populate cdrload.gtemp_bsc_programa
ssignment from sql server thru DBLINK
l_clientname := getclientname (p_clientid, 'CDR_PROGRAMASSIGNMENT_CON
V');
EXECUTE IMMEDIATE 'INSERT INTO cdrload.gtemp_bsc_programa
ssignment SELECT * FROM ' || l_clientname;
SELECT A.RUNID
INTO L_RUNID
FROM CDRLOAD.GTEMP_BSC_PROGRAMA
SSIGNMENT A
WHERE ROWNUM = 1;
OPEN CUR_PROGRAMASSIGNMENT;
LOOP
FETCH CUR_PROGRAMASSIGNMENT BULK COLLECT
INTO L_PROGRAMASSIGNMENT LIMIT L_LIMIT;
RUNIDTRACKING_PKG.STATUS_T
RACKING(P_
CLIENTID,
'conversion_pkg.CDR_PROGRA
MASSIGNMEN
T_CONV',
'Bulk collect count for INSERT',
L_PROGRAMASSIGNMENT.COUNT,
L_RUNID);
-- insert into programassignment table
FORALL I IN 1 .. L_PROGRAMASSIGNMENT.COUNT
INSERT INTO PROGRAMASSIGNMENT VALUES L_PROGRAMASSIGNMENT (I);
EXIT WHEN CUR_PROGRAMASSIGNMENT%NOTF
OUND;
END LOOP;
CLOSE CUR_PROGRAMASSIGNMENT;
EXCEPTION
WHEN OTHERS THEN
RUNIDTRACKING_PKG.STATUS_T
RACKING(P_
CLIENTID,
'conversion_pkg.CDR_PROGRA
MASSIGNMEN
T_CONV',
SQLERRM,
0,
L_RUNID);
END PROGRAMASSIGNMENT_CONV;
Answer : ORA error-too many values
You need to use your column names.
I don't know your table structures. You need to get the column names from gtemp_bsc_programassignmen
t and CDR_PROGRAMASSIGNMENT_CONV
and insert them explicitly into the insert statement:
INSERT INTO cdrload.gtemp_bsc_programa
ssignment(
----INSERT
YOUR COLUN NAMES HERE-----)
SELECT (----INSERT YOUR COLUN NAMES HERE-----) FROM IngersollRand.CDR_PROGRAMA
SSIGNMENT_
CONV@INGES
T;
Random Solutions
SEP Deployment via Symantec Console or AD Group Policy
asp.net: How to determine if a when a user login. is an Admin Account, * the menu is selected to show admin pages & reports.
url rewrite on iis7
MS Outlook - Count emails
Padding Emptry spaces with Zero's in VB.NET
Unable to access certain domains
Is there a way to use the recovery partition to reinstall the OS if the drive won't boot or put it on a new hard drive?
XP Pro SP 3 - Ordinal 423 could not be located in the dynamic link library urlmon.dll
Restoring a Dell studio 1535 to factory default
Sort columns in pivot table.