PLS-00382: expression is of wrong type
Hi,
oracle 9.2
I have to write one simple procedure to retrieve some column records from the table.
In the Begin... end block...I have written select statement
Now, if i include all the columns in the select query then procedure gets compile without any error...but when I remove any one column or select specific columns in the select query of that procedure then I get below error..
PLS-00382: expression is of wrong type
can anybody explain ?
Regards
Hi,
below has been defined in the declaration part and using the below defined cur3 for the OUT parameter.
TYPE Rec3 IS RECORD
col1 tab.col1%TYPE,
col2 tab.col2%TYPE,
col3 tab.col3%TYPE,
col4 tab.col4%TYPE,
TYPE Cur3 IS REF CURSOR RETURN Rec3 ;
is it due to record type has been defined ?
Regards
Similar Messages
-
'expression is of wrong type' - but which and where..?
hello.
Hopefully this will be clear as day to someone.. Please could someone tell me why I'm getting the following error message..
[061010_042222995][][EXCEPTION] SQLException encounter while executing data trigger....
java.sql.SQLException: ORA-06550: line 4, column 20:
PLS-00382: expression is of wrong type
ORA-06550: line 4, column 1:
PL/SQL: Statement ignoreddata template where trigger is called..
<?xml version="1.0" encoding="utf-8" ?>
- <dataTemplate name="UofS_OutstandngExpenses_Report" defaultPackage="SUBIXCLT" dataSourceRef="FINDEV" version="1.0">
- <properties>
<property name="xml_tag_case" value="upper" />
<property name="include_parameters" value="true" />
<property name="debug_mode" value="on" />
</properties>
- <parameters>
<parameter name="p_claimant" dataType="character" defaultValue="" />
<parameter name="p_expense_date_from" dataType="date" defaultValue="" />
<parameter name="p_expense_date_to" dataType="date" defaultValue="" />
<parameter name="p_raisedby" dataType="character" defaultValue="" />
<parameter name="p_status" dataType="character" defaultValue="" />
<parameter name="p_ordered_by" dataType="varchar2" defaultValue="" />
</parameters>
- <dataQuery>
- <sqlStatement name="Q1">
- <![CDATA[
SELECT DISTINCT
erh.invoice_num,
pap.full_name EMP_CLAIMING,
DECODE(NVL(erh.expense_status_code, 'Not yet Submitted (NULL)'), 'CANCELLED', 'CANCELLED',
'EMPAPPR', 'Pending Individuals Approval', 'ERROR', 'Pending System Administrator Action',
'HOLD_PENDING_RECEIPTS ', 'Hold Pending Receipts', 'INPROGRESS', 'In Progress', 'INVOICED', 'Ready for Payment',
'MGRAPPR', 'Pending Payables Approval', 'MGRPAYAPPR', 'Ready for Invoicing', 'PAID', 'Paid',
'PARPAID', 'Partially Paid', 'PAYAPPR', 'Payables Approved', 'PENDMGR', 'Pending Manager Approval',
'PEND_HOLDS_CLEARANCE', 'Pending Payment Verification', 'REJECTED', 'Rejected', 'RESOLUTN', 'Pending Your Resolution',
'RETURNED', 'Returned', 'SAVED', 'Saved', 'SUBMITTED', 'Submitted', 'UNUSED', 'UNUSED',
'WITHDRAWN','Withdrawn', 'Not yet Submitted (NULL)') "EXPENSE_STATUS" ,
NVL(TO_CHAR(erh.report_submitted_date,'dd-MON-yyyy'),'NULL') SUBMIT_DATE,
NVL(TO_CHAR(erh.expense_last_status_date,'dd-MON-yyyy'),'NULL') LAST_UPDATE,
erh.override_approver_name ER_Approver,
fu.description EXP_ADMIN,
erh.total,
erh.description
FROM
AP_EXPENSE_REPORT_HEADERS_all erh,
per_all_people_f pap, fnd_user fu
WHERE erh.employee_id = pap.person_id
AND fu.user_id = erh.created_by
AND NVL(erh.expense_status_code, 'Not yet Submitted') NOT IN ('MGRAPPR', 'INVOICED', 'PAID', 'PARPAID')
AND pap.full_name = NVL(:p_claimant, pap.full_name)
AND TRUNC(erh.report_submitted_date) BETWEEN NVL(:p_expense_date_from, '01-JAN-1999') AND NVL(:p_expense_date_to,'31-DEC-2299')
AND fu.description = NVL(:p_raisedby,fu.description)
AND erh.expense_status_code = NVL(:p_status,erh.expense_status_code) &L_ORDERED_BY
]]>
</sqlStatement>
</dataQuery>
<dataTrigger name="beforeReport" source="SUBIXCLT.beforeReportTrigger" />
- <dataStructure>
- <group name="G_XP_CLM_TRACKNG" source="Q1">
<element name="INVOICE_NUM" value="INVOICE_NUM" />
<element name="EMP_CLAIMING" value="EMP_CLAIMING" />
<element name="EXPENSE_STATUS" value="EXPENSE_STATUS" />
<element name="SUBMIT_DATE" value="SUBMIT_DATE" />
<element name="LAST_UPDATE" value="LAST_UPDATE" />
</group>
</dataStructure>
</dataTemplate>and the package spec & body..
--THE SPEC...
CREATE OR REPLACE PACKAGE Subixclt IS
FUNCTION beforeReportTrigger RETURN VARCHAR2;
p_order_by VARCHAR2(50);
l_ordered_by VARCHAR2(350);
p_claimant VARCHAR2(80);
expense_date_from DATE;
expense_date_to DATE;
p_raisedby VARCHAR2(80);
p_status VARCHAR2(80);
p_ordered_by VARCHAR2(80);
--RETURN VARCHAR2;
END;
--THE BODY...
REATE OR REPLACE PACKAGE BODY Subixclt IS
FUNCTION BeforeReportTrigger RETURN VARCHAR2 IS
BEGIN
Fnd_File.PUT_LINE(Fnd_File.LOG,'L_ORDERED_by'||L_ORDERED_BY);
DECLARE
L_ORDERED_BY VARCHAR2(50);
P_ORDERED_BY VARCHAR2(50);
P_RAISEDBY VARCHAR2(50);
P_STATUS VARCHAR2(50);
P_CLAIMANT VARCHAR2(100);
P_EXPENSE_DATE_FROM DATE;
--P_EXPENSE_DATE_FROM VARCHAR2(50);
--P_EXPENSE_DATE_TO VARCHAR2(50);
P_EXPENSE_DATE_TO DATE;
BEGIN
IF (P_ORDERED_BY='Expense Report Number') THEN
L_ORDERED_BY :='order by 1 asc;';
ELSIF (P_ORDERED_BY='Person Claiming') THEN
L_ORDERED_BY :='order by 2 asc;';
ELSIF (P_ORDERED_BY='Submit Date') THEN
L_ORDERED_BY :='order by 4 asc;';
END IF;
RETURN(L_ORDERED_BY);
--RETURN NULL;
END;
END;
END;Many thanks for looking..
DThanks for the suggestion. I initially didnt have the RETURN TRUE after every IF statement and have since removed the 'WHEN OTHERS' section but I'm still getting the same error message. If its to be believed, doesn't it sound like its not finding any of the 3 possible parameter entries available? This can't be so, I've checked the ConC Program parameter name is correct, and the value set linked to it only has available the 3 options where I make the choice..
Body now reads:
CREATE OR REPLACE PACKAGE BODY Subixclt
AS
FUNCTION BEFOREREP (P_ORDERED_BY IN VARCHAR2)RETURN BOOLEAN IS
BEGIN
--FND_FILE.PUT_LINE(FND_FILE.LOG,'L_ORDERED_by'||L_ORDERED_BY);
DECLARE
L_ORDERED_BY VARCHAR2(50);
--P_RAISEDBY VARCHAR2(50);
--P_STATUS VARCHAR2(50);
--P_CLAIMANT VARCHAR2(100);
--P_EXPENSE_DATE_FROM DATE;
--P_EXPENSE_DATE_TO DATE;
BEGIN
IF (P_ORDERED_BY='Expense Report Number') THEN
L_ORDERED_BY :='order by 1 asc;';
ELSIF (P_ORDERED_BY='Person Claiming') THEN
L_ORDERED_BY :='order by 2 asc;';
ELSIF (P_ORDERED_BY='Submit Date') THEN
L_ORDERED_BY :='order by 4 asc;';
RETURN TRUE;
END IF;
-- EXCEPTION WHEN OTHERS THEN RETURN FALSE;
--RETURN(L_ORDERED_BY);
END;
END;
END;error log reads:
XDO Data Engine Version No: 5.6.3
Resp: 20707
Org ID : 102
Request ID: 2484872
All Parameters: p_raisedby=SUSAN HOLLIDAY:p_status=:p_claimant=:p_expense_date_from=:p_expense_date_to=:P_ORDERED_BY=Person Claiming
Data Template Code: SUBIXCLT
Data Template Application Short Name: PO
Debug Flag: N
{p_claimant=, p_expense_date_to=, p_status=, p_raisedby=SUSAN HOLLIDAY, p_expense_date_from=, P_ORDERED_BY=Person Claiming}
Calling XDO Data Engine...
[061110_114425280][][STATEMENT] Start process Data
[061110_114425282][][STATEMENT] Process Data ...
[061110_114425284][][STATEMENT] Executing data triggers...
[061110_114425284][][STATEMENT] BEGIN
SUBIXCLT.p_claimant := :p_claimant ;
SUBIXCLT.p_expense_date_from := :p_expense_date_from ;
SUBIXCLT.p_expense_date_to := :p_expense_date_to ;
SUBIXCLT.p_raisedby := :p_raisedby ;
SUBIXCLT.p_status := :p_status ;
SUBIXCLT.p_ordered_by := :p_ordered_by ;
:XDO_OUT_PARAMETER := 1;
END;
[061110_114425287][][STATEMENT] 1: :
[061110_114425287][][STATEMENT] 2:null :
[061110_114425287][][STATEMENT] 3:null :
[061110_114425288][][STATEMENT] 4:SUSAN HOLLIDAY :
[061110_114425288][][STATEMENT] 5: :
[061110_114425288][][STATEMENT] 6:null :
[061110_114425291][][STATEMENT] Executing data triggers...
[061110_114425292][][STATEMENT] Declare
l_flag Boolean;
BEGIN
l_flag := SUBIXCLT.beforerep(:p_ordered_by) ;
if (l_flag) then
:XDO_OUT_PARAMETER := 1;
end if;
end;
[061110_114425293][][STATEMENT] 1:null :
[061110_114425302][][EXCEPTION] SQLException encounter while executing data trigger....
java.sql.SQLException: ORA-06503: PL/SQL: Function returned without value
ORA-06512: at "APPS.SUBIXCLT", line 27
ORA-06512: at line 4Many thanks for staying with this..
S -
I have a procedure (below) that is invalid. Last night the instance of the database I'm working in got refreshed (data only) and a few of my procedures were invalidated, including this one. When I tried to recreate it I got the following error:
PLS-00382: expression is of wrong type
I don't understand why it's now not working (worked fine yesterday), or what this error means in relation to the statement.
Does anyone know what I'm doing wrong here?
Thanks,
Pete
SQL> CREATE OR REPLACE PROCEDURE nyp.WBS_NOTE
2 IS
3 CURSOR C_WBS_NOTES IS
4 SELECT * FROM WBS_NOTES;
5 V_WBS_ID NUMBER;
6 V_WBSMEMO_ID NUMBER;
7 V_PROJ_ID NUMBER;
8 V_WBS_VAL VARCHAR2(200);
9 V_WBS_PARENT VARCHAR2(200);
10
11 BEGIN
12 UPDATE
13 WBS_NOTES W
14 SET W.TEXT = REPLACE(W.Text, 'CHR(13)', '
15 ');
16 INSERT INTO WBS_NOTE_PROJ_NOT_FOUND
17 SELECT *
18 FROM WBS_NOTES W WHERE EXISTS(
19 SELECT 'A'
20 FROM ACC_CONV_PROJ_NOT_FOUND P
21 WHERE W.Project_num = P.Project_num);
22 DELETE
23 FROM WBS_NOTES W WHERE EXISTS(
24 SELECT 'A'
25 FROM ACC_CONV_PROJ_NOT_FOUND P
26 WHERE W.Project_num = P.Project_num);
27 FOR NOTES IN C_WBS_NOTES LOOP
28 SELECT P.PROJ_ID
29 INTO V_PROJ_ID
30 FROM PROJECT P
31 WHERE P.PROJ_SHORT_NAME = NOTES.PROJECT_NUM;
32 V_WBS_VAL := NOTES.WBS;
33 V_WBS_PARENT := SUBSTR(V_WBS_VAL, 1, INSTR(V_WBS_VAL, '.', -1) - 1);
34 WHILE INSTR(V_WBS_PARENT, '.') <> 0 LOOP
35 V_WBS_PARENT := SUBSTR(V_WBS_PARENT, INSTR(V_WBS_PARENT, '.') + 1, 200);
36 END LOOP;
37 V_WBS_VAL := SUBSTR(V_WBS_VAL, INSTR(V_WBS_VAL, '.') + 1, 200);
38 WHILE INSTR(V_WBS_VAL, '.') <> 0 LOOP
39 V_WBS_VAL := SUBSTR(V_WBS_VAL, INSTR(V_WBS_VAL, '.') + 1, 200);
40 END LOOP;
41 SELECT W.WBS_ID
42 INTO V_WBS_ID
43 FROM PROJWBS W
44 , PROJWBS PW
45 WHERE UPPER(W.WBS_NAME) = UPPER(V_WBS_VAL)
46 AND PW.PROJ_ID = V_PROJ_ID
47 AND PW.WBS_ID = W.PARENT_WBS_ID
48 AND UPPER(PW.WBS_SHORT_NAME) = UPPER(V_WBS_PARENT);
49 GETNEXTKEYS('wbsmemo_wbs_memo_id', 1, V_WBSMEMO_ID);
50 EXECUTE IMMEDIATE
51 ' INSERT INTO WBSMEMO ' ||
52 ' SELECT ' || V_WBSMEMO_ID ||
53 ', ''' || V_PROJ_ID || '''' ||
54 ', ''' || V_WBS_ID || '''' ||
55 ', MT.MEMO_TYPE_ID ' ||
56 ', ''' || NOTES.TEXT || '''' ||
57 ' FROM MEMOTYPE MT ' ||
58 ' WHERE MT.MEMO_TYPE = ''' || NOTES.NTBKTYPE || '''';
59 END LOOP;
60 END;
61 /
Warning: Procedure created with compilation errors.
SQL> SHOW ERRORS
Errors for PROCEDURE NYP.WBS_NOTE:
LINE/COL ERROR
50/2 PL/SQL: Statement ignored
51/2 PLS-00382: expression is of wrong typeThere could be data type mis-match within the time you re-compiled the program. Check the data type for which you are Inserting / Updating with the values you are actually using to populate.
Note:
Insert into TABLE1
Select * from TABLE2.
It is not advisible to have the above statement
eventhough this will work as long as
the fields in table TABLE1 and TABLE2 are same.
Instead of "*" use the filed names.
CRAMANA -
Hi There,
being really new to Oracle I was looking through the samples that are installed when you install Oracle. Under PACKAGES/SCOTT there is a single package that is valid, under PROCEDURES/SCOTT is a single procedure that is invalid, when compiling it gives the above errors.
Could anyone shed some light into my darkness please.
Thanks
SteveThe procdure source and error stack is.....
SQL> create or replace procedure EmployeeInfoProc
2 (empcursor IN OUT
3 EmployeeInfo.EmployeeCursor)
4 As
5 Begin
6 Open empcursor For
7 select * from emp;
8 End;
9 /
Warning: Procedure created with compilation errors.
SQL> show errors
Errors for PROCEDURE EMPLOYEEINFOPROC:
LINE/COL ERROR
6/1 PL/SQL: SQL Statement ignored
7/1 PLS-00382: expression is of wrong type
SQL>
The version is 8.1.6 and the package and procedure are those that come with the software
Thanks
Steve -
create or replace TRIGGER MS_TRIGG_PRICE_CHANGE before INSERT
ON MS_OBIEE_PRICE_CHANGE
FOR EACH ROW
declare
L_xpricechghrdtl_tbl "RIB_XPriceChgHrDtl_TBL" := NULL;
L_xpricechghrdtl_rec_1 "RIB_XPriceChgHrDtl_REC" := NULL;
L_xpricechgdesc_rec_1 "RIB_XPriceChgDesc_REC" := NULL;
L_xpricechgexcst_tbl "RIB_XPriceChgExcSt_TBL" := NULL;
L_xpricechgexcst_rec_1 "RIB_XPriceChgExcSt_REC" := NULL;
O_STATUS_CODE VARCHAR2(255) := null;
O_ERROR_MESSAGE RTK_ERRORS.RTK_TEXT%TYPE := null;
L_message_type VARCHAR2(20) := 'XPRICECHGMOD';
O_rib_error_tbl RIB_ERROR_TBL := NULL;
program_error exception;
BEGIN
L_xpricechghrdtl_rec_1 := "RIB_XPriceChgHrDtl_REC"(50,:new.loc);
L_xpricechghrdtl_tbl := "RIB_XPriceChgHrDtl_TBL"();
L_xpricechghrdtl_tbl.extend();
L_xpricechghrdtl_tbl(1) := L_xpricechgdesc_rec_1;
It shows the error
SQL> show err
Errors for TRIGGER MS_TRIGG_PRICE_CHANGE:
LINE/COL ERROR
21/4 PL/SQL: Statement ignored
21/31 PLS-00382: expression is of wrong type
Please let me know the possible reasons behind the error.I created a trigger for a table that creates a recordtype for posting to a function that expects a recordtype as an input parameter.
THe full trigger code is as follows:
create or replace TRIGGER MS_TRIGG_PRICE_CHANGE before INSERT
ON MS_OBIEE_PRICE_CHANGE
FOR EACH ROW
declare
L_xpricechghrdtl_tbl "RIB_XPriceChgHrDtl_TBL" := NULL;
L_xpricechghrdtl_rec_1 "RIB_XPriceChgHrDtl_REC" := NULL;
L_xpricechgdesc_rec_1 "RIB_XPriceChgDesc_REC" := NULL;
L_xpricechgexcst_tbl "RIB_XPriceChgExcSt_TBL" := NULL;
L_xpricechgexcst_rec_1 "RIB_XPriceChgExcSt_REC" := NULL;
O_STATUS_CODE VARCHAR2(255) := null;
O_ERROR_MESSAGE RTK_ERRORS.RTK_TEXT%TYPE := null;
L_message_type VARCHAR2(20) := 'XPRICECHGMOD';
BEGIN
L_xpricechghrdtl_rec_1 := "RIB_XPriceChgHrDtl_REC"(50,:new.loc);
L_xpricechghrdtl_tbl := "RIB_XPriceChgHrDtl_TBL"();
L_xpricechghrdtl_tbl.extend();
L_xpricechghrdtl_tbl(1) := L_xpricechgdesc_rec_1;
L_xpricechgdesc_rec_1 := "RIB_XPriceChgDesc_REC"('MS_TRIGG_PRICE_CHANGE', -- namespace
:new.item, -- Item number
'', -- diff_id
:new.selling_unit_retail, --Selling Unit Retail
'EA', -- selling UOM
'', -- multi units
'', -- multi unit retail
'', -- multi selling uom
:new.currency_code, -- currency_code
'', -- country
'S', -- hier_level
L_xpricechghrdtl_tbl,
L_xpricechgexcst_tbl);
RMSSUB_XPRICECHG.CONSUME (O_status_code,
O_error_message,
L_xpricechgdesc_rec_1,
L_message_type);
if O_status_code <> 'S' and O_status_code is NOT NULL then
:new.status := 'Failed';
:new.error := O_error_message;
end if;
end;
The function called is RMSSUB_XPRICECHG.CONSUME. -
PLS-00382 Type error in the select statement in the Cursor.
Hi,
I am trying to combine several different sql statements to form one large cursor for my java layer. I have attached the PL/SQL procedure that I am using and when I am trying to compile it is giving PLS-00382 error. Please help me.
PL/SQL Code.
CREATE OR REPLACE PROCEDURE test IS
tmpVar NUMBER;
TYPE checkRecord is RECORD (
name1 APPS.EMCSV_R25_DIST_PROF_TBL.distmgrfname%TYPE,
name2 APPS.EMCSV_R25_DIST_PROF_TBL.distmgrfname%TYPE,
name3 APPS.EMCSV_R25_DIST_PROF_TBL.distmgrfname%TYPE,
name4 APPS.EMCSV_R25_DIST_PROF_TBL.distmgrfname%TYPE,
oppstatus1 APPS.EMCSV_R25_DIST_PROF_TBL.oppstatus%TYPE,
oppcount1 APPS.EMCSV_R25_DIST_PROF_TBL.oppcount%TYPE,
oppamount1 APPS.EMCSV_R25_DIST_PROF_TBL.oppamount%TYPE,
oppstatus2 APPS.EMCSV_R25_DIST_PROF_TBL.oppstatus%TYPE,
oppcount2 APPS.EMCSV_R25_DIST_PROF_TBL.oppcount%TYPE,
oppamount2 APPS.EMCSV_R25_DIST_PROF_TBL.oppamount%TYPE,
oppstatus3 APPS.EMCSV_R25_DIST_PROF_TBL.oppstatus%TYPE,
oppcount3 APPS.EMCSV_R25_DIST_PROF_TBL.oppcount%TYPE,
oppamount3 APPS.EMCSV_R25_DIST_PROF_TBL.oppamount%TYPE,
oppstatus4 APPS.EMCSV_R25_DIST_PROF_TBL.oppstatus%TYPE,
oppcount4 APPS.EMCSV_R25_DIST_PROF_TBL.oppcount%TYPE,
oppamount4 APPS.EMCSV_R25_DIST_PROF_TBL.oppamount%TYPE);
TYPE checkCur IS REF CURSOR RETURN checkRecord;
checkCurVal checkCur;
checkCurRec checkRecord;
chechcurVal checkCur;
NAME: test
PURPOSE:
REVISIONS:
Ver Date Author Description
1.0 3/8/2006 1. Created this procedure.
NOTES:
Automatically available Auto Replace Keywords:
Object Name: test
Sysdate: 3/8/2006
Date and Time: 3/8/2006, 10:01:59 AM, and 3/8/2006 10:01:59 AM
Username: (set in TOAD Options, Procedure Editor)
Table Name: (set in the "New PL/SQL Object" dialog)
BEGIN
tmpVar := 0;
OPEN checkCurVal FOR
SELECT
a.distmgrfname,
a.distmgrlname,
a.salesrepfname,
a.salesreplname,
cursor (
SELECT b.oppstatus,
b.oppcount,
b.oppamount
from APPS.EMCSV_R25_DIST_PROF_TBL b
where b.userid = '100000001' AND
b.reportid = 'ISARPTR25' AND
b.oppstatus = 'Open' AND
b.isoppstatusselected = 'Y'),
cursor (
SELECT c.oppstatus,
c.oppcount,
c.oppamount
from APPS.EMCSV_R25_DIST_PROF_TBL c
where c.userid = '100000001' AND
c.reportid = 'ISARPTR25' AND
c.oppstatus = 'Commit' AND
c.isoppstatusselected = 'Y'),
cursor (
SELECT
d.oppstatus,
d.oppcount,
d.oppamount
from APPS.EMCSV_R25_DIST_PROF_TBL d
where d.userid = '100000001' AND
d.reportid = 'ISARPTR25' AND
d.oppstatus = 'Closed-Won' AND
d.isoppstatusselected = 'Y'),
cursor (
SELECT
e.oppstatus,
e.oppcount,
e.oppamount
from APPS.EMCSV_R25_DIST_PROF_TBL e
where e.userid = '100000001' AND
e.reportid = 'ISARPTR25' AND
e.oppstatus = 'Closed-Lost' AND
e.isoppstatusselected = 'Y')
from APPS.EMCSV_R25_DIST_PROF_TBL a
where a.userid = '100000001' AND
a.reportid = 'ISARPTR25' AND
a.isoppstatusselected = 'Y' ;
LOOP
FETCH checkCurVal INTO checkCurRec;
EXIT WHEN checkCurVal%NOTFOUND;
DBMS_OUTPUT.PUT_LINE (checkCurRec.name1 ||
checkCurRec.name2 ||
checkCurRec.name3 ||
checkCurRec.name4 ||
checkCurRec.oppstatus1 ||
checkCurRec.oppcount1 ||
checkCurRec.oppamount1 ||
checkCurRec.oppstatus2 ||
checkCurRec.oppcount2 ||
checkCurRec.oppamount2 ||
checkCurRec.oppstatus3 ||
checkCurRec.oppcount3 ||
checkCurRec.oppamount3 ||
checkCurRec.oppstatus4 ||
checkCurRec.oppcount4 ||
checkCurRec.oppamount4);
END LOOP;
END test;
/Thanks for Replying.
I am trying to build a cursor to fetch the records from the table. Table structure is something like this.
reportid VARCHAR2(10) NOT NULL,
distmgrid NUMBER DEFAULT 0,
salesrepid NUMBER DEFAULT 0,
distmgrfname VARCHAR2(40 CHAR) DEFAULT 'rfname',
distmgrlname VARCHAR2(40 CHAR) DEFAULT 'rlname',
salesrepfname VARCHAR2(40 CHAR) DEFAULT 'afname',
salesreplname VARCHAR2(40 CHAR) DEFAULT 'aname',
issalesrepselected CHAR(1 CHAR) DEFAULT 'Y',
oppstatus VARCHAR2(40 CHAR) DEFAULT 'oppstatus',
isoppstatusselected CHAR(1 CHAR) DEFAULT 'Y',
oppcount NUMBER DEFAULT 0,
oppamount NUMBER DEFAULT 0,
oppquote NUMBER DEFAULT 0,
Attribute1 VARCHAR2(10 CHAR),
Attribute2 VARCHAR2(15 CHAR),
Attribute3 NUMBER,
Attribute4 NUMBER
But from the above table, I am trying to build a report for which I need a cursor which I listed in the proc. Is it not possible to build a cursor within a cursor?
Yes each individual cursor return only one row. -
PLS-00320: the declaration of the type of this expression is incomplete or malformed
hello my friend please help
I have this Error in PL /SQL procedure
ORA-06550: line 6, column 12:
PLS-00320: the declaration of the type of this expression is incomplete or malformed
ORA-06550: line 6, column 12:
PL/SQL: Item ignored
where this is my procedure
CREATE OR REPLACE PROCEDURE MOAMALAT."IO_EMP_REP"
P_FROMDATE IN NUMBER,
P_TODATE IN NUMBER,
P_EMPID IN NUMBER,
RCT1 OUT GLOBALPKG.RCT1
AS
BEGIN
OPEN RCT1 FOR
SELECT COUNT (I.CORRESPONDENCENUMBER) cont,
EMP.FULLNAME empname,
D.DEPARTMENTNAME deptname
FROM MOAMALAT.IO_INCOMING i,
MOAMALAT.IO_EMPLOYEES emp,
MOAMALAT.IO_DEPARTMENTS d
WHERE I.RECEIVEDBY = (SELECT EM.USERID
FROM MOAMALAT.IO_EMPLOYEES em
WHERE EM.EMPLOYEEID = P_EMPID)
AND I.RECEIVEDBY LIKE EMP.USERID
--and EMP.DEPARTMENTID=1900
AND I.RECEIVEDBYDEPARTMENTID = D.DEPARTMENTID
AND I.CORRESPONDENCEDATE BETWEEN P_FROMDATE AND P_TODATE
GROUP BY EMP.FULLNAME, D.DEPARTMENTNAME
UNION ALL
SELECT COUNT (o.CORRESPONDENCENUMBER) cont,
EMP.FULLNAME empname,
D.DEPARTMENTNAME deptname
FROM MOAMALAT.IO_OUTGOING o,
MOAMALAT.IO_EMPLOYEES emp,
MOAMALAT.IO_DEPARTMENTS d
WHERE O.SENTBY = (SELECT EM.USERID
FROM MOAMALAT.IO_EMPLOYEES em
WHERE EM.EMPLOYEEID = P_EMPID)
AND EMP.USERID LIKE EMP.USERID
AND EMP.USERID LIKE O.SENTBY
AND O.SENTBYDEPARTMENTID = D.DEPARTMENTID
AND O.CORRESPONDENCEDATE BETWEEN P_FROMDATE AND P_TODATE
GROUP BY EMP.FULLNAME, D.DEPARTMENTNAME;
END;aymanhamdan01 wrote:
thanks for replay
sb92075
this line 6: RCT1 OUT GLOBALPKG.RCT1
does Oracle (& you) know what datatype GLOBALPKG.RCT1 is? -
Hi all
Please find where i am wrong
function F_4FormatTrigger return boolean is
a varchar2(100);
b varchar2(100);
begin
A:='On Hold';
B:='Go Ahead';
if :performa_type = 'N/A' then
return(False);
elsif
:performa_type ='PERFORMA' THEN
return('A');
ELSIF
:performa_type ='PERFORMA PAID' THEN
return('B');
ELSE
return (TRUE);
end if;
end;ERROR 382 at line 11,column 10
expression is wrong type
WRROR 0 At line 11, column 4
Statement Ignored
ERROR 382 at line 14,column 10
expression is wrong type
WRROR 0 At line 14, column 4
Statement Ignored
Thanks And Regards
Vikas Singhalhi,
I saw u r coding.
The format trigger only returning the boolean value true or false.
so u have the remove declaration part and elsif condition statement of retur(A) and upto return(B) statement .
function F_4FormatTrigger return boolean is
begin
if :performa_type = 'N/A' then
return(False);
ELSE
return (TRUE);
end if;
end;
otherwise if u want to print the value of A abd B u can write the same code in formula column. -
Hi everybody. I wrote de following type
create or replace TYPE ALMACEN AS OBJECT
id_almacen number(10),
descripcion varchar2(40),
existencias number(6),
precio number(4),
member function movimiento (p_num number) return boolean
create or replace TYPE BODY ALMACEN AS
member function movimiento (p_num number) return boolean AS
v_inf boolean;
n number(6);
BEGIN
if self.existencias+p_num>=0 then
self.existencias:=existencias+p_num;
return TRUE;
else return FALSE;
end if;
END movimiento;
END;
I have Oracle 11g release I.
In previous releases it worked, but now SQLDeveloper marks
self.existencias:=existencias+p_num;
Error PLS 00363 expression "string" cannot be used as an assignment target in sentence
Please, What's wrong?
Thanking in advanceHi,
Not quite a PL/SQL XML question but anyway...
Since the member function modifies the object instance, the implicit argument "self" must be declared explicitly as "IN OUT" :
member function movimiento (self in out nocopy almacen, p_num number) return boolean -
Hello,
I'm trying to run a PLSQL script containing an ORACLE API but its failing on compilation with the message:
'PLS-00363: expression '<expression>' cannot be used as an assignment target'.
As far as I understand its connected to my IN-OUT parameters but I can't figure out which (I must admit I'm still hiking up a steep learning curve here and I've cut and pasted someone elses example and modified it).
I would be most grateful if one of you pro's could read through my code and advise..
SET serveroutput ON SIZE 1000000 FORMAT WRAPPED
SET verify OFF
SET feedback OFF
DECLARE
error_msg varchar2(2000) := '';
l_status varchar2(10) := 'True';
l_validate_cnt number;
l_ass_count number;
l_business_group_id number := 0;
l_validate BOOLEAN DEFAULT FALSE;
l_city varchar2(30);
l_mode varchar2(20) := 'UPDATE';
l_sup_join_date date;
l_organization_id hr_organization_units.organization_id%type;
l_person_id per_all_people_f.person_id%type;
l_object_version_number per_all_assignments_f.object_version_number%type;
l_job_id per_jobs.job_id%type;
l_position_id per_positions.position_id%type;
l_location_id number := 233; -- number;
l_grade_id number := 3; -- per_grades.grade_id%type;
l_supervisor_id number := 2; -- per_all_assignments_f.supervisor_id%type;
l_assignment_status_type_id number;
l_pay_basis_id number := 33;
l_join_date date;
l_assignment_id per_all_assignments_f.assignment_id%type;
l_soft_coding_keyflex_id per_all_assignments_f.soft_coding_keyflex_id%type;
l_people_group_id per_all_assignments_f.people_group_id%type;
l_payroll_id per_all_assignments_f.payroll_id%type;
l_effective_start_date per_all_assignments_f.effective_start_date%type;
l_effective_end_date per_all_assignments_f.effective_end_date%type;
l_assignment_sequence per_all_assignments_f.assignment_sequence%type;
l_comment_id per_all_assignments_f.comment_id%type;
l_concatenated_segments varchar2(240);
l_group_name varchar2(100);
l_other_manager_warning boolean;
l_org_now_no_manager_warning boolean;
l_spp_delete_warning boolean;
l_entries_changed_warning varchar2(200);
l_tax_district_changed_warning boolean;
l_special_ceiling_step_id number;
l_no_managers_warning boolean;
l_other_manager_warnings boolean;
l_cagr_grade_def_id number;
l_cagr_concatenated_segments varchar2(100);
l_total_records number := 0;
l_success_records number := 0;
l_failure_records number := 0;
BEGIN
dbms_output.put_line('#############################################################');
dbms_output.put_line('Data Migration Of Employee Assignments :');
dbms_output.put_line('#############################################################');
dbms_output.put_line('Start Time : ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
l_person_id := null;
l_object_version_number := null;
l_organization_id := 0;
l_location_id := null;
l_grade_id := null;
l_job_id := null;
l_position_id := null;
l_supervisor_id := null;
l_assignment_status_type_id := null;
error_msg := null;
l_status := 'True';
hr_assignment_api.update_emp_asg_criteria
p_validate => l_validate
,p_effective_date => sysdate --to_date('11-Jan-2009','DD-MON-YYYY')
,p_datetrack_update_mode => l_mode
,p_assignment_id => l_assignment_id
,p_object_version_number => l_object_version_number +1
,p_organization_id => l_organization_id
,p_location_id => l_location_id --assignment_v.location_id
,p_grade_id => l_grade_id
,p_job_id => l_job_id
,p_position_id => l_position_id
,p_payroll_id => l_payroll_id --21--hardcoding this you should change this
-- ,p_segment1 => assignment_v.people_group
-- ,p_employment_category => assignment_v.employee_category
,p_pay_basis_id => l_pay_basis_id
,p_special_ceiling_step_id => l_special_ceiling_step_id
,p_people_group_id => l_people_group_id
,p_group_name => l_group_name
,p_org_now_no_manager_warning => l_org_now_no_manager_warning
,p_effective_start_date => l_effective_start_date
,p_effective_end_date => l_effective_end_date
,p_other_manager_warning => l_other_manager_warning
,p_spp_delete_warning => l_spp_delete_warning
,p_entries_changed_warning => l_entries_changed_warning
,p_tax_district_changed_warning => l_tax_district_changed_warning
hr_assignment_api.update_emp_asg
p_validate => l_validate --false
,p_effective_date => to_date('11-Jan-2009','DD-MON-YYYY') --assignment_v.date_of_change
,p_datetrack_update_mode => 'CORRECTION'
,p_assignment_id => l_assignment_id
,p_object_version_number => l_object_version_number
,p_supervisor_id => l_supervisor_id
,p_normal_hours => '7.5'
,p_frequency => 'D'
,p_time_normal_start => '09:30'
,p_time_normal_finish => '17:30'
,p_soft_coding_keyflex_id => l_soft_coding_keyflex_id
,p_comment_id => l_comment_id
,p_effective_start_date => l_effective_start_date
,p_effective_end_date => l_effective_end_date
,p_concatenated_segments => l_concatenated_segments
,p_no_managers_warning => l_no_managers_warning
,p_other_manager_warning => l_other_manager_warnings
,p_cagr_grade_def_id => l_cagr_grade_def_id
,p_cagr_concatenated_segments => l_cagr_concatenated_segments
dbms_output.put_line('End Time : ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
dbms_output.put_line('
END;
commit;
exit;many thanks,
StevenThanks for the suggestions people. Here's the other API description requested:
PROCEDURE UPDATE_EMP_ASG
Argument Name Type In/Out Default?
P_VALIDATE BOOLEAN IN DEFAULT
P_EFFECTIVE_DATE DATE IN
P_DATETRACK_UPDATE_MODE VARCHAR2 IN
P_ASSIGNMENT_ID NUMBER IN
P_OBJECT_VERSION_NUMBER NUMBER IN/OUT
P_SUPERVISOR_ID NUMBER IN DEFAULT
P_ASSIGNMENT_NUMBER VARCHAR2 IN DEFAULT
P_CHANGE_REASON VARCHAR2 IN DEFAULT
P_ASSIGNMENT_STATUS_TYPE_ID NUMBER IN DEFAULT
P_COMMENTS VARCHAR2 IN DEFAULT
P_DATE_PROBATION_END DATE IN DEFAULT
P_DEFAULT_CODE_COMB_ID NUMBER IN DEFAULT
P_FREQUENCY VARCHAR2 IN DEFAULT
P_INTERNAL_ADDRESS_LINE VARCHAR2 IN DEFAULT
P_MANAGER_FLAG VARCHAR2 IN DEFAULT
P_NORMAL_HOURS NUMBER IN DEFAULT
P_PERF_REVIEW_PERIOD NUMBER IN DEFAULT
P_PERF_REVIEW_PERIOD_FREQUENCY VARCHAR2 IN DEFAULT
P_PROBATION_PERIOD NUMBER IN DEFAULT
P_PROBATION_UNIT VARCHAR2 IN DEFAULT
P_SAL_REVIEW_PERIOD NUMBER IN DEFAULT
P_SAL_REVIEW_PERIOD_FREQUENCY VARCHAR2 IN DEFAULT
P_SET_OF_BOOKS_ID NUMBER IN DEFAULT
P_SOURCE_TYPE VARCHAR2 IN DEFAULT
P_TIME_NORMAL_FINISH VARCHAR2 IN DEFAULT
P_TIME_NORMAL_START VARCHAR2 IN DEFAULT
P_BARGAINING_UNIT_CODE VARCHAR2 IN DEFAULT
P_LABOUR_UNION_MEMBER_FLAG VARCHAR2 IN DEFAULT
P_HOURLY_SALARIED_CODE VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE_CATEGORY VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE1 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE2 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE3 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE4 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE5 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE6 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE7 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE8 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE9 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE10 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE11 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE12 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE13 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE14 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE15 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE16 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE17 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE18 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE19 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE20 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE21 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE22 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE23 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE24 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE25 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE26 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE27 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE28 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE29 VARCHAR2 IN DEFAULT
P_ASS_ATTRIBUTE30 VARCHAR2 IN DEFAULT
P_TITLE VARCHAR2 IN DEFAULT
P_SEGMENT1 VARCHAR2 IN DEFAULT
P_SEGMENT2 VARCHAR2 IN DEFAULT
P_SEGMENT3 VARCHAR2 IN DEFAULT
P_SEGMENT4 VARCHAR2 IN DEFAULT
P_SEGMENT5 VARCHAR2 IN DEFAULT
P_SEGMENT6 VARCHAR2 IN DEFAULT
P_SEGMENT7 VARCHAR2 IN DEFAULT
P_SEGMENT8 VARCHAR2 IN DEFAULT
P_SEGMENT9 VARCHAR2 IN DEFAULT
P_SEGMENT10 VARCHAR2 IN DEFAULT
P_SEGMENT11 VARCHAR2 IN DEFAULT
P_SEGMENT12 VARCHAR2 IN DEFAULT
P_SEGMENT13 VARCHAR2 IN DEFAULT
P_SEGMENT14 VARCHAR2 IN DEFAULT
P_SEGMENT15 VARCHAR2 IN DEFAULT
P_SEGMENT16 VARCHAR2 IN DEFAULT
P_SEGMENT17 VARCHAR2 IN DEFAULT
P_SEGMENT18 VARCHAR2 IN DEFAULT
P_SEGMENT19 VARCHAR2 IN DEFAULT
P_SEGMENT20 VARCHAR2 IN DEFAULT
P_SEGMENT21 VARCHAR2 IN DEFAULT
P_SEGMENT22 VARCHAR2 IN DEFAULT
P_SEGMENT23 VARCHAR2 IN DEFAULT
P_SEGMENT24 VARCHAR2 IN DEFAULT
P_SEGMENT25 VARCHAR2 IN DEFAULT
P_SEGMENT26 VARCHAR2 IN DEFAULT
P_SEGMENT27 VARCHAR2 IN DEFAULT
P_SEGMENT28 VARCHAR2 IN DEFAULT
P_SEGMENT29 VARCHAR2 IN DEFAULT
P_SEGMENT30 VARCHAR2 IN DEFAULT
P_CONCAT_SEGMENTS VARCHAR2 IN DEFAULT
P_CONTRACT_ID NUMBER IN DEFAULT
P_ESTABLISHMENT_ID NUMBER IN DEFAULT
P_COLLECTIVE_AGREEMENT_ID NUMBER IN DEFAULT
P_CAGR_ID_FLEX_NUM NUMBER IN DEFAULT
P_CAG_SEGMENT1 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT2 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT3 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT4 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT5 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT6 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT7 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT8 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT9 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT10 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT11 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT12 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT13 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT14 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT15 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT16 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT17 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT18 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT19 VARCHAR2 IN DEFAULT
P_CAG_SEGMENT20 VARCHAR2 IN DEFAULT
P_NOTICE_PERIOD NUMBER IN DEFAULT
P_NOTICE_PERIOD_UOM VARCHAR2 IN DEFAULT
P_EMPLOYEE_CATEGORY VARCHAR2 IN DEFAULT
P_WORK_AT_HOME VARCHAR2 IN DEFAULT
P_JOB_POST_SOURCE_NAME VARCHAR2 IN DEFAULT
P_SUPERVISOR_ASSIGNMENT_ID NUMBER IN DEFAULT
P_CAGR_GRADE_DEF_ID NUMBER IN/OUT
P_CAGR_CONCATENATED_SEGMENTS VARCHAR2 OUT
P_CONCATENATED_SEGMENTS VARCHAR2 OUT
P_SOFT_CODING_KEYFLEX_ID NUMBER IN/OUT
P_COMMENT_ID NUMBER OUT
P_EFFECTIVE_START_DATE DATE OUT
P_EFFECTIVE_END_DATE DATE OUT
P_NO_MANAGERS_WARNING BOOLEAN OUT
P_OTHER_MANAGER_WARNING BOOLEAN OUT
P_HOURLY_SALARIED_WARNING BOOLEAN OUT
P_GSP_POST_PROCESS_WARNING VARCHAR2 OUT On looking on the web I've found that my latest error message - ORA-20001: The primary key specified is invalid
Cause: The primary key values specified are invalid and do not exist in
the schema.
Action: Check the primary key values... - relates to incorrect combination of person_id,object_version_number,effective_start_date and effective_end_date - all of which seem OK to me - her's my latest version of my code.. Many thanks again.
SET serveroutput ON SIZE 1000000 FORMAT WRAPPED
SET verify OFF
SET feedback OFF
DECLARE
error_msg varchar2(2000);
l_status varchar2(10);
l_validate_cnt number;
l_ass_count number;
l_validate BOOLEAN DEFAULT FALSE;
l_city varchar2(30);
l_mode varchar2(20) := 'UPDATE';
l_organization_id number;
l_effective_date date := '12-FEB-09';
l_person_id number := '29987';
l_object_version_number number := '3';
l_effective_start_date date := '12-FEB-09';
l_effective_end_date date := '12-FEB-56';
l_job_id per_jobs.job_id%type;
l_position_id per_positions.position_id%type;
l_location_id number;
l_grade_id number;
l_supervisor_id number;
l_assignment_status_type_id number;
l_pay_basis_id number;
l_join_date date;
l_soft_coding_keyflex_id number;
l_people_group_id per_all_assignments_f.people_group_id%type;
l_payroll_id per_all_assignments_f.payroll_id%type;
l_assignment_sequence per_all_assignments_f.assignment_sequence%type;
l_comment_id per_all_assignments_f.comment_id%type;
l_normal_end varchar2(15) := '17:30';
l_normal_start varchar2(15) := '09:30';
l_frequency varchar2(10) := 'D';
l_normal_hours varchar2(25) := '7.5';
l_assignment_id number := '29884';
l_gsp_post_process_warning varchar2(30);
l_entries_changed varchar2(30);
l_old_obj_ver_number per_addresses.OBJECT_VERSION_NUMBER%type;
l_segment1 varchar2(25);
l_segment2 varchar2(25);
l_segment3 varchar2(25);
l_concatenated_segments varchar2(240);
l_group_name varchar2(100);
l_other_manager_warning boolean;
l_org_now_no_manager_warning boolean;
l_spp_delete_warning boolean;
l_entries_changed_warning varchar2(200);
l_tax_district_changed_warning boolean;
l_special_ceiling_step_id number;
l_no_managers_warning boolean;
l_other_manager_warnings boolean;
l_cagr_grade_def_id number;
l_cagr_concatenated_segments varchar2(100);
l_datetrack_update_mod varchar2(10);
l_total_records number := 0;
l_success_records number := 0;
l_failure_records number := 0;
BEGIN
dbms_output.put_line('#############################################################');
dbms_output.put_line('Data Migration Of Employee Assignments :');
dbms_output.put_line('#############################################################');
dbms_output.put_line('Start Time : ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
l_person_id := null;
l_object_version_number := null;
l_organization_id := null;
l_location_id := null;
l_grade_id := null;
l_job_id := null;
l_position_id := null;
l_supervisor_id := null;
l_assignment_status_type_id := null;
error_msg := null;
l_status := 'True';
hr_assignment_api.update_emp_asg_criteria (
p_effective_date => l_effective_date ,p_datetrack_update_mode => l_datetrack_update_mod ,p_assignment_id => l_assignment_id ,p_called_from_mass_update => NULL ,p_grade_id => l_grade_id ,p_position_id => l_position_id ,p_job_id => l_job_id ,p_payroll_id => l_payroll_id ,p_location_id => l_location_id ,p_organization_id => l_organization_id ,p_pay_basis_id => l_pay_basis_id
,p_segment1 => l_segment1
,p_segment2 => l_segment2
,p_segment3 => l_segment3 ,p_employment_category => NULL ,p_concat_segments => NULL ,p_contract_id => NULL ,p_establishment_id => NULL ,p_scl_segment1 => NULL ,p_grade_ladder_pgm_id => NULL ,p_supervisor_assignment_id => NULL ,p_object_version_number => l_old_obj_ver_number ,p_special_ceiling_step_id => l_special_ceiling_step_id ,p_people_group_id => l_people_group_id ,p_soft_coding_keyflex_id => l_soft_coding_keyflex_id ,p_group_name => l_group_name ,p_effective_start_date => l_effective_start_date ,p_effective_end_date => l_effective_end_date ,p_org_now_no_manager_warning => l_org_now_no_manager_warning ,p_other_manager_warning => l_other_manager_warning ,p_spp_delete_warning => l_spp_delete_warning ,p_entries_changed_warning => l_entries_changed ,p_tax_district_changed_warning => l_tax_district_changed_warning ,p_concatenated_segments => l_concatenated_segments ,p_gsp_post_process_warning => l_gsp_post_process_warning);
hr_assignment_api.update_emp_asg
p_validate => l_validate
,p_effective_date => l_effective_date
,p_datetrack_update_mode => l_datetrack_update_mod --'CORRECTION'
,p_assignment_id => l_assignment_id
,p_object_version_number => l_object_version_number
,p_supervisor_id => l_supervisor_id
,p_normal_hours => l_normal_hours --'7.5'
,p_frequency => l_frequency --'D'
,p_time_normal_start => l_normal_start --'09:30'
,p_time_normal_finish => l_normal_end --'17:30'
,p_soft_coding_keyflex_id => l_soft_coding_keyflex_id
,p_comment_id => l_comment_id
,p_effective_start_date => l_effective_start_date
,p_effective_end_date => l_effective_end_date
,p_concatenated_segments => l_concatenated_segments
,p_no_managers_warning => l_no_managers_warning
,p_other_manager_warning => l_other_manager_warnings
,p_cagr_grade_def_id => l_cagr_grade_def_id
,p_cagr_concatenated_segments => l_cagr_concatenated_segments
dbms_output.put_line('End Time : ' || TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
dbms_output.put_line('
END;
commit;
exit; -
"An expression of non-boolean type specified in a context where a condition
I have below query and its respective result set "0 and NoofRows" in Execute SQL task
select count(*) from TEMP_InterfaceSAP_LoadFile
where (timeid = '20110100' and ([ENTITY_AFF] in (N'6050')))
When I run the task individually, there is no issue at all, but when I tried run it as whole, I'm getting below error.
"[Execute SQL Task] Error: Executing the query "select count(*) from TEMP_PM_InterfaceSAP_LoadFile..." failed with the following error: "An expression of non-boolean type specified in a context where a condition is expected, near ')'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."I have below query and its respective result set "0 and NoofRows" in Execute SQL task
select count(*) from TEMP_InterfaceSAP_LoadFile
where (timeid = '20110100' and (ENTITY_AFF in (N'6050')))
When I run the task individually, there is no issue at all, but when I tried run it as whole, I'm getting below error.
"Execute SQL Task Error: Executing the query "select count(*) from TEMP_PM_InterfaceSAP_LoadFile..." failed with the following error: "An expression of non-boolean type specified in a context where a condition is expected, near ')'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."
======================================================================
Hi Prabhu0505,
You may enclose the string with ' ' in SQL task if you use SQL command, then you need to adjust your delimeter to avoid wrong interepretation. I cannot say how you can fix the problem, but I remember there was more ' such as '''6050''' and so on, please find out correct SQL expression in an eclosed string.
This is one of thing I remember, I used ADO connection in SQL script task in SSIS and there were lots of SQL in command, the ' quatation is tricky one.
Regards,
YH Seo -
PLS-00363: expression '' cannot be used as an assignment target - HELP :-(
Hi Guys,
This is a procedure I have in the body of a package:
PROCEDURE SUM_EVENTS (p_trial_no IN NUMBER,
p_country_resion IN VARCHAR2,
p_loc_no IN NUMBER,
p_setup_flag IN VARCHAR2,
p_event_changed IN OUT NUMBER) ISWhen I call this in SQLplus with this:
exec DB_CALC.sum_events(340,'USA',1,'Y',3700);I get this:
ERROR at line 1:
ORA-06550: line 1, column 54:
PLS-00363: expression '3700' cannot be used as an assignment target
ORA-06550: line 1, column 7:
PL/SQL: Statement ignoredAny ideas what I'm doing wrong?
Thanks!p_event_changed is declared as an IN OUT parameter. You need to provide a variable in which the OUT values can be written to..
something like
declare
out_val number := 3700;
begin
DB_CALC.sum_events(340,'USA',1,'Y',out_val);
end; -
Wrong type for decimal on PpostgreSQL
I am faced with fixing a bug which says that
[i]The torque-generated sql scripts contain a wrong type for decimal on PostgreSQLwhere we get DECIMAL instead of DECIMAL(16,4), which is equivalent to INTEGER.
It is working fine for other database like oracle, db2 etc.
There seems to be the problem in torque-gen-3.1 jar because it
works fine if we use torque-gen-3.2.
torque-gen-3.1 doesent seem to deal with size attribute for postgresSQL.
I am trying this for the past 3 days but still havent managed to get any solution.
Pls help,Thanks in advance.
Regards,
jaayit works fine if we use torque-gen-3.2That looks like a solution to me. What's your problem
with it?Actually my Boss is not agreeing.He says we have to make changes
only in torque-gen-3.1 only , not to use torque-gen-3.2 -
Receiving an export file error: wrong type
I have created a movie several times in FCP and then exported the movie to QT without any problems. Now all of a sudden, I can't get the movie to export correctly. After the 2 hour export, I'll check on FCP to find that the program has shut down without an "Unexpected Shut Down" message. I check for the exported movie which I find in the saved folder. I click to open and verify the completed job, but find that I get an error instead : "Error: Wrong Type".
The last successful movie I created was September 14th, prior to the QT 7.5.5 upgrade. I thought it was the upgrade, as I found out that FCP does not do well with the new QT version, so I reverted to QT 7.5, but I am still experiencing the same problem with FCP quitting and the movie not being able to read.
What is going on? Can anyone help?Francois:
This is a crazy solution, but this happened to me last week and this solution enabled me to open my files again -- they were all greyed out and I thought I'd lost them. I took my drive in to an Apple Store Genius Bar without resolution and spend 2 hours online with ProApps (FCE/FCP) tech support, also with no resolution.
This fix is based on the fact that FCP when it is started, it automatically opens the project that was open when it was closed. First, in FCP save the current project (this can be any project -- I created a placeholder project -- to a dummy name -- I used "save me". Close FCP and delete the dummy name ("save me") project. Now rename the project that is greyed out and provides the File Error: Wrong Type message that you would like to open to the dummy name, so that it's now called "save me". Now open FCP again. Now save the recuperated file using the original name.
Maarten
Here's what you do. -
'PLS-00363: expression..' error when executing a stored procedure with in o
Hello,
I'm trying to run a PLSQL script containing an ORACLE API but its failing on compilation with the message:
'PLS-00363: expression '<expression>' cannot be used as an assignment target'.
As far as I understand its connected to my IN-OUT parameters but I can't figure out which (I must admit I'm still hiking up a steep learning curve here and I've cut and pasted someone elses example and modified it).
I would be most grateful if one of you pro's could read through my code and advise..
many thanks,
Steveni guess you are trying to store value in your IN parameter.
here is an example
SQL> create or replace procedure pr(p in integer)
2 as
3 begin
4 p := 1;
5 end;
6 /
Warning: Procedure created with compilation errors.
SQL> show err
Errors for PROCEDURE PR:
LINE/COL ERROR
4/2 PL/SQL: Statement ignored
4/2 PLS-00363: expression 'P' cannot be used as an assignment targetSee it also gives the exact line in which the error has occurred. so see that and fix it.
Edited by: Karthick_Arp on Feb 12, 2009 1:57 AM
Maybe you are looking for
-
How can i calculate distance on Image in a pictureBox ?
This is a screenshot of what i mean: In the screenshot i have a cone. The cone is moving around 360 degrees. In the form1 top i have this: private float distanceFromCenterKm = 200F; //in kilometers private float distanceFromCenterPixels; //in pixels
-
Disabled combo boxes don't display properly after loading a movie.
Hi, I have a main movie that contains some combo boxes. Some of them may be disabled. By pressing a button I load another movie using loadMovie. The loaded movie also contains combo boxes. When the button is pressed, the clip that shows the combo box
-
Listening for objects in a Vector changing attributes.
Can anybody help me with this problem? A Vector has a number of objects contained in it. How can I determine if any of the contained objects have had thier attribute(s) changed? Would an ObjectChangeListener be something that I could use on the Vecto
-
BEA Weblogic 9.0/Open LDAP communication
We have BEA Weblogic 9.0 and OpenLDAP running on two different machines. I am running a stress/load/performance test on my app and found that there are repetitive calls between Weblogic and OpenLDAP, even though I have configured caching thru Weblogi
-
Error when trying to activate PS
I deactivated PS on my old laptop and I verified the deactivation. I cannot start it again, without being asked for the serial number. However I cannot activate it on my new laptop now. It tells me "Time Limit for activation is exceeded" and that I h