ORA-06550 PLS-00382: expression is of the wrong type
Please help me with the following script:declare
cursor c1 is
Select prod_country_id
of prod_country
where eccnum = "NOCLASS-SG" and ccode = 'SG ';
New_data_type TYPE IS TABLE C1% ROWTYPE;
new_data_tab new_data_type;
Start
Open c1;
loop
collect fetch c1 into bulk
in new_data_tab limit 500000;
OUTPUT WHEN c1% NOTFOUND;
ForAll i in 1... new_data_tab. Count
Update prod_country
Set eccnum = "NOCLASS".
where prod_country_id = new_data_tab (i);
end loop;
Close c1;
commit;
end;
Gives following error:
ORA-06550: line 17, column 32:
PLS-00382: expression is of the wrong type
Please help immediately.
Need to update block.
Thanks in advance
user13759851 wrote:
Just change my query and now its execution without the previous error:
So what? It is always wrong.
The correct way using just SQL to perform the update - which is the most effective and scalable way. And much faster.
As for your code? Everything is fake.
You read the update lines. Without locking of these lines. And these same lines are changed in the code. This is false.
Then you agree inside the loop. This is false.
You now get a cursor (where the lines are not locked) and changes of committng to these same lines. It is a violation of the standard ANSI SQL - get everywhere is committed. You consume more resources Oracle doing this. If this process crashes - and there is an excellent chance that Oracle will not provide a coherent reading/snapshot while the data are changed and committed - you what? A process that has changed some data and no other data. We ask that the corruption of data. A total lack of data integrity.
You set the limit to a ridiculous 500000. This is false.
It's not faster than with a 1000 limit. But she will consume 500 times more memory. And not just any memory. The more expensive server memory that a process of PL/SQL can consume - PGA.
You have provided a perfect example of How not to Code for Oracle+.
Now trash. You never forget retry such an erroneous approach. Use a single SQL UPDATE statement. And then a COMMIT.
Tags: Database
Similar Questions
-
pls 00382 expression is of the wrong type as he returned a record
Hi Experts,
I returned a record type variable in the function below. but I'm getting pls 00382 expression is of the wrong type error
Could you please all you please solve this problem.
{format} {format}
CREATE or REPLACE TYPE vp40.t_attr_list_tab AS TABLE OF VARCHAR2 (4000);
CREATE or REPLACE TYPE vp40.t_fin_tab () AS OBJECT
object_id NUMBER (8),
object_name VARCHAR2 (50)
);
create or replace type vp40.t_objects_info
AS AN OBJECT
(
node_id number,
NUMBER THE OBJECT_ID,
OBJECT_NAME VARCHAR2 (200)
);
/ * Formatted on 2013/09/03 07:58 (trainer more v4.8.8) * /.
(Vp40.findobjects) FUNCTION to CREATE or REPLACE
i_object_type_id in NUMBERS
i_l_filter_list IN VARCHAR2,
i_scope_node_id NUMBER
)
RETURN t_fin_tab
AS
l_tab t_attr_list_tab: = t_attr_list_tab ();
TYPE t_objects_info_arr IS TABLE OF THE t_objects_info
INDEX BY PLS_INTEGER;
l_obj_info t_objects_info_arr;
TYPE t_fin_tab_arr IS TABLE OF THE t_fin_tab
INDEX BY PLS_INTEGER;
l_fin_tab t_fin_tab_arr;
l_text VARCHAR2 (32767): = i_l_filter_list | ',';
l_idx NUMBER;
BEGIN
LOOP
l_idx: = INSTR (l_text, ",");
OUTPUT WHEN NVL (l_idx, 0) = 0;
l_tab. EXTEND;
l_tab (l_tab. (Last): = TRIM (SUBSTR (l_text, 1, l_idx - 1));
l_text: = SUBSTR (l_text, l_idx + 1);
END LOOP;
SELECT t_objects_info (n.node_id, o.object_id, o.NAME)
LOOSE COLLECTION l_obj_info
FROM (SELECT n.node_id, n.object_id
N nodes
START WITH n.node_id = i_scope_node_id
N.node_id CONNECT BY PRIOR = n.parent_node_id) n
JOIN IN-HOUSE
objects o ON o.object_id = n.object_id
WHERE o.object_type_id = i_object_type_id;
IF l_obj_info. COUNT > 0
THEN
BECAUSE me IN l_obj_info. FIRST... l_obj_info. LAST
LOOP
FOR j IN l_tab. FIRST... l_tab. LAST
LOOP
BEGIN
SELECT t_fin_tab (o.object_id, o.NAME)
LOOSE COLLECTION l_fin_tab
O objects, ATTRIBUTES att
WHERE o.object_id = l_obj_info (i) .object_id;
AND att. VALUE = l_tab (j);
EXCEPTION
WHEN NO_DATA_FOUND
THEN
raise_application_error
(- 20004,
"Attribute values do not match."
);
WHILE OTHERS
THEN
raise_application_error (-20005, "an error has occurred.");
END;
END LOOP;
END LOOP;
END IF;
RETURN l_fin_tab;
END;
/
{format} {format}
Hello
Sorry, I don't understand,
mbb774 wrote:
...
-for example with node_id = 100 and object_type_id = 200
-Suppose we get 4 items
...
Do you have after the bad examples of data? I don't see numbers of 100 or 200 anywhere in the sample data you posted.
-
PLS-00382: expression is of the wrong type
Hello
PL/SQL code
Compile errorsCREATE OR REPLACE TYPE prof_ctab_value_rec_t AS OBJECT ( prof_id INTEGER ,ctabv_id INTEGER ,ctab_id INTEGER ) CREATE OR REPLACE TYPE prof_ctab_value_table_t IS TABLE OF prof_ctab_value_rec_t FUNCTION get_prof_ctab_value RETURN prof_ctab_value_table_t PIPELINED IS v_sql VARCHAR2(4000); v_cursor SYS_REFCURSOR; v_result_set prof_ctab_value_table_t; BEGIN v_sql := 'select .....'; EXECUTE IMMEDIATE v_sql USING OUT v_cursor; LOOP FETCH v_cursor INTO v_result_set; EXIT WHEN v_cursor%NOTFOUND; PIPE ROW(v_result_set); END LOOP; END;
Error: PLS-00382: expression is of the wrong type
Text: PIPE ROW (v_result_set);
Error: PL/SQL: statement ignored
Text: PIPE ROW (v_result_set);
Please tell me wht causes the compile error. Thanks in advance.I don't know what you're trying to do... Probably, this will help you...
SQL> create or replace FUNCTION get_prof_ctab_value 2 RETURN prof_ctab_value_table_t PIPELINED 3 IS 4 v_sql VARCHAR2(4000); 5 v_cursor SYS_REFCURSOR; 6 v_result_set prof_ctab_value_rec_t := 7 prof_ctab_value_rec_t(null,null,null); 8 BEGIN 9 v_sql := 'select 1,2,3 from dual union all select 4,5,6 from dual'; 10 open v_cursor for v_sql; 11 LOOP 12 FETCH v_cursor INTO 13 v_result_set.prof_id, 14 v_result_set.ctabv_id, 15 v_result_set.ctab_id; 16 EXIT WHEN v_cursor%NOTFOUND; 17 PIPE ROW(v_result_set); 18 END LOOP; 19 return; 20 END; 21 / Function created. SQL> select * 2 from table(get_prof_ctab_value); PROF_ID CTABV_ID CTAB_ID ---------- ---------- ---------- 1 2 3 4 5 6
-
ERROR MESSAGE PLS-00382 - expression is of the wrong type
I read similar publication on the web. I tried everything, but I still get the error message. Please note planner_id was defined as a varchar2 when the table was created.
---------------------------------------------------------------------------------------------------------------------------------------------------------------
SEE SPECIFICATIONS BELOW
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
type labour_rec is MADE
(
labour_cell VARCHAR2 (300));
Type cur_labour is REF CURSOR RETURN labour_rec;
FUNCTION labour_record (l_planner_id in rcl.copq_raw_labour.planner_id%type) return cur_labour;
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SEE BELOW IN THE BODY
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Cur_labour return of labour_record (l_planner_id in rcl.copq_raw_labour.planner_id%type) FUNCTION IS
my_cur_labour cur_labour;
BEGIN
OPEN FOR My_cur_labour
Select c1.transaction_date, c1.workorder, c1.seq_no, c1.resource_id, c1.warehouse_id, c1.planner_id, c1.employee_id, c1.hours_worked
copq_raw_labour C1
where c1.planner_id = l_planner_id;
close my_cur_labour;
-return my_cur_labour;
end labour_record;user13046875 wrote:
So, how define a Ref Cursor low... Please note that I am still new to Pl/SQl developer.Use SYS_REFCURSOR instead of your strongly typed cur_labour.
create or replace package mmmm_hmmmm as 3 function do_something return SYS_REFCURSOR; end; / create or replace package body mmmm_hmmmm as function do_something return SYS_REFCURSOR is o_cursor SYS_REFCURSOR; begin open o_cursor for select 'something', 'something else' from dual; return o_cursor; end; end; / Package created. Elapsed: 00:00:00.13 TUBBY_TUBBZ?TUBBY_TUBBZ? 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Package body created. Elapsed: 00:00:00.11
-
Sys_RefCursor - expression is of the wrong type
Greetings,
I'm having a problem when compiling the code, and I wonder if you can help me.
===============
CREATE OR REPLACE PROCEDURE RA
v_cursor sys_refcursor;
BEGIN
FOR I IN 1.3 LOOP
query_str: = 'SELECT DISTINCT STAGE_NAME, SUN |
i: ' _MEMBER_NAME OF EXT_STG WHERE DIM' |
i: ' _MEMBER_NAME AS "A: %" ';
V_cursor OPEN FOR query_str; - error here
V_cursor CLOSE;
END LOOP;
END;
===============
This Code gives me the following error: rError (43.23): PLS 00382: expression is of the wrong type
I read askTom: http://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:492620500346758810
This code is supposed to work, so I don't understand this error.
He also reffers that versions before 11g this code fails. However, my version is: PL/SQL Release 11.2.0.2.0 - Production
Thanks for your help.>
NVARCHAR2 (200)
>Try VARCHAR2 (200)
http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28370/openfor_statement.htm
documentation
>
syntaxA string literal, a string variable or string expression that represents a select (without the final semicolon) several cursor_variable_name associated lines. It must be of type CHAR, VARCHAR2 or CLOB (not NCHAR or NVARCHAR2).
>Published by: user6806750 on 09.12.2011 03:41
-
"expression is of the wrong type" - but who and where... ?
Hello.
I hope that it will be clear as day to someone... Please could someone tell me why I get the following error message...
data model when the trigger is called...[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 ignored
specifications of the package and the body...<?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>
Thank you very much for looking...--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;
DHi Steven,
your settings are not correctly spread. P_ORDERED_BY in your package does not get the value of the report parameter.
Can you please send me the full source code by email? XML, spec data definition package & body? (name (at) melexis.com)
Thank you
David. -
expression is of the wrong type
Hello
I have this function
Please ignore any syntax error if it is changed, I am more concern about its input parameter and the call to this functionFUNCTION MY_F_SUB_EXISTS ( p_email_address IN cnsmr.email_addr%TYPE, p_question_cd IN ref_cd.quest_num%TYPE, p_language IN ref_cd.language%TYPE) RETURN BOOLEAN AS CURSOR cur_exists ( l_email_address IN cnsmr.email_addr%TYPE, l_question_cd IN ref_cd.quest_num%TYPE) IS SELECT 1 FROM queue_consumers qc, queue_consumer_subsc qcs WHERE qcs.queue_consumer_id = qc.queue_consumer_id AND qcs.question_cd = l_question_cd AND LOWER (qc.email_address) = LOWER (l_email_address); -- CURSOR cur_rtr_exists ( l_email_address IN cnsmr.email_addr%TYPE, l_question_cd IN ref_cd.quest_num%TYPE, l_language IN ref_cd.language%TYPE) IS SELECT 1 FROM cnsmr idv, cnsmr_opt idv_sbc, ref_cd sbsc WHERE idv_sbc.indiv_id = idv.indiv_id AND idv_sbc.subsc_cd = sbsc.subsc_cd AND idv_sbc.subsc_prod_cd = sbsc.subsc_prod_cd AND idv_sbc.subsc_chnl_cd = sbsc.subsc_chnl_cd AND sbsc.quest_num = l_question_cd AND sbsc.language = l_language AND LOWER (idv.email_addr) = LOWER (l_email_address); -- v_exist NUMBER DEFAULT NULL; BEGIN -- OPEN cur_exists (p_email_address, p_question_cd); FETCH cur_exists INTO v_exist; -- IF cur_exists%FOUND THEN CLOSE cur_exists; RETURN TRUE; ELSE -- CLOSE cur_exists; OPEN cur_rtr_exists (p_email_address, p_question_cd, p_language); FETCH cur_rtr_exists INTO v_exist; -- IF cur_rtr_exists%FOUND THEN CLOSE cur_rtr_exists; RETURN TRUE; ELSE CLOSE cur_rtr_exists; RETURN FALSE; END IF; END IF; -- EXCEPTION WHEN OTHERS THEN raise_application_error ( -20001, 'error in MY_F_SUB_EXISTS:' || SQLCODE || '-' || SQLERRM); END MY_F_SUB_EXISTS;
My question is
While call you that
I get this errorselect MY_F_SUB_EXISTS('[email protected]','SUB-F','EN') from dual;
what I'm missing here?ORA-06552: PL/SQL: Statement ignored ORA-06553: PLS-382: expression is of wrong type
BOOLEAN cannot be used in SQL:
SQL> create or replace function bla 2 return boolean 3 as 4 begin 5 return true; 6 end; 7 / Function created. SQL> select bla from dual; select bla from dual * ERROR at line 1: ORA-06552: PL/SQL: Statement ignored ORA-06553: PLS-382: expression is of wrong type
Only in PL/SQL.
-
ORA-06550: PLS-00394: wrong number of values in the list INTO a mesh FETCH
Dear friends,
I ask you a suggestion:
The following code inserts a table errors (errori_work), the IDS of the records repeat (in the work of the table), but gives me this error:
ORA-06550: PLS-00394: wrong number of values in the list of a FETCH statement INTO.
The work of the table has the 78 columns: the problem of the fields used in the slider flew against the 78% ROWTYPE fields?
I could use a record declared as the cursor (rec_tabwork cu_tabwork % ROWTYPE;), but in the MANUAL I need a field (ID_WORK) is not present in the cursor.
declare
CURSOR cu_tabwork IS
SELECT CD_STRUTTURA, CD_SUB_STRUTTURA, NR_PRATICA, likelihood
Work
CD_STRUTTURA, CD_SUB_STRUTTURA, NR_PRATICA, applications GROUP
HAVING COUNT (rowid) > 1
UNION ALL
SELECT CD_STRUTTURA, CD_SUB_STRUTTURA, NR_PRATICA, likelihood
Work
CD_STRUTTURA, CD_SUB_STRUTTURA, NR_PRATICA, applications GROUP
After HAVING COUNT (rowid) > 2.
rec_tabwork work % ROWTYPE;
BEGIN
Open cu_tabwork;
loop
extract the cu_tabwork in rec_tabwork;
If FOUND then % cu_tabwork
dbms_output.put_line (rec_tabwork. (ASL); -test
INSERT INTO errori_work
(cd_errore, note, ID_WORK)
)
VALUES ("ACC", "Record ripetuto nella table work", rec_tabwork.ID_WORK)
);
end if;
EXIT WHEN cu_tabwork % NOTFOUND;
end loop;
close cu_tabwork;
end;
Can you help me?
Thank you
LeoHello
I loaded your data and ran the query. It's coz the NR_RICETTA contains a null value, so your State A.NR_RICETTA = B.NR_RICETTA will fail when it checks for NULL = NULL. Here is your output from the query
PRAZY@orcl> select count(ID_AMBS) FROM WORK A 2 WHERE A.ROWID > ANY (SELECT B.ROWID FROM WORK B 3 WHERE A.CD_PRESIDIO =B.CD_PRESIDIO 4 AND A.GGMM_CONTATTO =B.GGMM_CONTATTO 5 AND A.NR_RICETTA =B.NR_RICETTA 6 AND A.CD_CONT_PRESCR =B.CD_CONT_PRESCR 7 AND A.NR_PROG_INT =B.NR_PROG_INT 8 AND A.DESTINAZIONE =B.DESTINAZIONE) 9 / COUNT(ID_AMBS) -------------- 48 Elapsed: 00:00:00.00
Therefore, I have included NVL to A.NR_RICETTA, which will produce true when it finds null checking 0 = 0 and you will get your result. and this is what you are looking for
PRAZY@orcl> select count(ID_AMBS) FROM WORK A 2 WHERE A.ROWID > ANY (SELECT B.ROWID FROM WORK B 3 WHERE A.CD_PRESIDIO =B.CD_PRESIDIO 4 AND A.GGMM_CONTATTO =B.GGMM_CONTATTO 5 AND NVL(A.NR_RICETTA,0) =NVL(B.NR_RICETTA,0) 6 AND A.CD_CONT_PRESCR =B.CD_CONT_PRESCR 7 AND A.NR_PROG_INT =B.NR_PROG_INT 8 AND A.DESTINAZIONE =B.DESTINAZIONE) 9 / COUNT(ID_AMBS) -------------- 61 Elapsed: 00:00:00.01
If you want to insert the duplicate ID in a Table of errors, do an insert with the following select statement.
INSERT INTO errori_work(cd_errore, note, ID_AMBS) SELECT 'CAC', 'Record ripetuto nella tabella Work',ID_AMBS FROM WORK A WHERE A.ROWID > ANY (SELECT B.ROWID FROM WORK B WHERE A.CD_PRESIDIO =B.CD_PRESIDIO AND A.GGMM_CONTATTO =B.GGMM_CONTATTO AND NVL(A.NR_RICETTA,0) =NVL(B.NR_RICETTA,0) AND A.CD_CONT_PRESCR =B.CD_CONT_PRESCR AND A.NR_PROG_INT =B.NR_PROG_INT AND A.DESTINAZIONE =B.DESTINAZIONE);
Hope that solves your problem.
See you soon!
-
Oracle 11g {ORA-06550, PLS-00905}
Hi all
I am new to Oracle and I am trying to execute the procedure, but I get the error ORA-06550, PLS-00905
Here is the procedure:
create or replace PROCEDURE add_job
(p_jobid IN jobs.empno%TYPE,
p_jobtitle IN jobs.job%TYPE)
IS
BEGIN
INSERT INTO scott.jobs (empno, job) VALUES (p_jobid, p_jobtitle);
END add_job;
/
I type the following command to run the proc:
Start
add_job (6000, "ANALYST");
end;
Can anyone suggest something to remedy?
Thanks in advance.
Edited by: 994323 16/03/2013 15:37So mark your ANSWER question and provide your Oracle version 4-digit and use.
tags next time you post.
-
PLS-00597: expression "v_record" in the list is wrong type
Hi experts,
I'm working on
Oracle Database 10 g Enterprise Edition Release 10.2.0.3.0 - 64 bit
I have 2 Sp allows to call SP1 and Sp2.
SP1 now have an output of the Ref cursor. and I get this output to my SP2. Output slider Ref of SP1 have column 4.
and I got the error PLS-00597: expression "v_record" in the list is wrong typecreate or replace procedure sp2 (out_cur out sys_refcursor) is type record_typ is record(value_date date, name varchar2(20), category varchar2(20), amount number); type tbl_typ is a table of record_typ; v_record tbl_typ; out_cur1 sys_refcursor; begin Sp1(:out_cur1); loop fetch out_cur1 into v_record; exit when out_cur1%notfound; insert into tmp_tbl values(v_record.value_date, v_record.name, v_record.category, v_record.amount); end loop; open out_cur for select * from tmp_tbl; end;
Please suggest me where I am doing wrong.
Thank you much in advance.
RiteshHello
Well you just put your type declaration in each stored procedure to refer to him...
create table tmp_tbl ( value_date date, name varchar2(20), category varchar2(20), amount number ) / CREATE OR REPLACE PROCEDURE sp1 (out_cur out sys_refcursor ) IS begin OPEN out_cur FOR SELECT sysdate value_date, 'Bravid' name, 'Ape' category, 1 amount FROM dual; END; / CREATE OR REPLACE PROCEDURE sp2 (out_cur out sys_refcursor ) IS TYPE record_typ is record(value_date date, name varchar2(20), category varchar2(20), amount number); v_record record_typ; out_cur1 sys_refcursor; begin Sp1(out_cur1); loop fetch out_cur1 into v_record; exit when out_cur1%notfound; insert into tmp_tbl values(v_record.value_date, v_record.name, v_record.category, v_record.amount); end loop; open out_cur for select * from tmp_tbl; END; /
HTH
David
-
Message error "the preconfiguration file has the wrong type of preset."
I try to import the Preset brushes for newborn photography. They are. Irtemplate files. I'm going in in my cc in Lightroom Develop Module, then opening presets Panel and hover the cursor over the user Presets. I right click and choose "import". So I find the real. The Irtemplate file and then click Import. What I get is the above error message «the presets file has the wrong type of preset.» What I am doing wrong?
Predefined live (Windows): C:\Users\User Name\AppData\Roaming\Adobe\Lightroom\Local of adjustment presets.
Presets to develop 'Global' live in: C:\Users\User Name\AppData\Roaming\Adobe\Lightroom\Develop Presets.
Find your presets in the "Lightroom" file folders (similar to above) tab Preferences dialog - Presets > [show Lightroom Presets folder]
Manually copy & paste your .lrtemplate files to the appropriate folder and restart Lightroom.
Note: The folder [develop Presets] can tolerate and allows subfolders, the folder [Local adjustment presets] cannot.
If only in the folder [Local adjustment presets] .lrtemplate files.
-
ORA-06550 pls-00103 encountered the end symbol of file
HII
the procedure below compiles well.
CREATE OR REPLACE PROCEDURE BG. FIND_DUP (EMP_CODE NUMBER, MAIN_EMP_CODE NUMBER) IS
CURSOR C1 IS
SELECT THE TABLE TABLE_NAME FROM USER_TAB_COLUMNS
WHERE COLUMN_NAME = 'EMP_CODE. '
AND UPPER (TABLE_NAME) <>UPPER ('PA_EMP_MERGE');
V_T_NAME VARCHAR2 (2000);
RESULT VARCHAR2 (1000);
BEGIN
OPEN C1;
LOOP
FETCH C1 IN V_T_NAME;
WHEN EXIT C1% NOTFOUND;
RESULT: = 'UPDATE'. V_T_NAME | ' SET EMP_CODE =' | EMP_CODE | "WHERE EMP_CODE =' | MAIN_EMP_CODE | « ; » ;
RUN THE IMMEDIATE RESULT.
END LOOP;
CLOSE C1;
END;
-----------------------------------------------------------------------------------------------------------------------
but when I try to run it gives me
ORA-06550: line 1, column 26:
PLS-00103: encountered the symbol "end-of-file" during the expected in the following way:
; < an ID > < a between double quote delimited identifiers of >
The symbol ";" was replaced by "end-of-file" continue.
-Im using oracle 10g
Hello
Do not put a semicolon at the end of the dynamic SQL statements.
Instead of:
RESULT: =... | MAIN_EMP_CODE | ';';
Try:
RESULT: =... | MAIN_EMP_CODE;
You need a semicolon (outside the single quotes) to put an end to the assignment statement, but you don't need a semicolon (inside the single quotes) to put an end to the dynamic UPDATE statement.
Whenever you make dynamic SQL code, ask someone (often yourself) "Is this really necessary?"
Dynamic SQL is usually an accessory to the wrong table design. Do you really need to have several tables that each must be updated in the same way, at the same time? Are you create new tables so frequently that cannot keep track of their static code?
-
ORA-06550, PLS-00306: wrong number or types of arguments in the call to ' |'
Hi all
Please help me about this error, if I comment the threshold (in the color of the thickness)
ERROR on line 19:
ORA-06550: line 19, column 25:
PLS-00306: wrong number or types of arguments in the call to ' |'
ORA-06550: line 19, column 3:
PL/SQL: Statement ignored
DECLARE
TYPE nametable IS TABLE OF CHAR(10) INDEX BY BINARY_INTEGER;
vname NAMETABLE
CURSOR cf
IS
SELECT ename
FROM emp;
i NUMBER;
START
OPEN cf;
i := 1;
LOOP
FETCH cf INTO Vname (i);
EXIT WHEN cf%NOTFOUND;
i := i + 1;
END LOOP;
CLOSE cf;
dbms_output. Put_line ('Name is ' || VNAME );
FOR n IN 1.. VNAME . County LOOP
dbms_output. Put_line ('Name is ' || VNAME (n));
END LOOP;
END ;
Thank you
VNAME is an associative array. You can not use in DBMS_OUTPUT. Put_line as such. You need to loop through what you did in the code after the DBMS_OUTPUT and print each element of the array individually.
-
As I corrected the error? ORA-06550-PLS-00357
* {color: #0000ff} good morning *.
* I'm trying to generate a file extension. txt,
extracting information from a table named test, and I generated the
Suite error ORA-06550: - and - PLS-00357: {color} *.
CREATE TABLE ENSAYO
(
NUMBER OF CODE,
DATE DATE default sysdate,
NUMBER VARCHAR2 (40)
)
;
Insert of ensayo values(1,'12-12-2009','rey');
Insert of ensayo values(2,'10-02-2009','luna');
Insert of ensayo values(3,'16-03-2009','paola');
Insert of ensayo values(4,'16-03-2009','Natalia');
Set serverout
DECLARE
utl_file.file_type v1.
v2 varchar2 (100);
Start
v1: = utl_file.fopen ('PUBLIC_ACCESS', 'prueb': to_char (sysdate, 'yyyymmdd') |'. txt', 'w');
loop
UTL_FILE.put_line (v1, Ensayo.Codigo);
end loop;
UTL_FILE.fclose (v1);
exception
while others then
dbms_output.put_line (SQLERRM);
end;
/
* {color: #ff0000} *.
UTL_FILE.put_line (v1, Ensayo.Codigo);
***
* {color} {color: #ff0000} ERROR en l & Yacute; NEA 7: *.
ORA-06550: l & Yacute; NEA 7, column 32: *.
PLS-00357: the referencia has the tabla, vista o sequence "ENSAYO. CÓDIGO ' no EST & szlig;. *
permitida en este contexto
ORA-06550: l & Yacute; NEA 7, column 4:
* PL/SQL: statement ignored {color} *.
* {color: #0000ff} that I correct the error? *
* Thank you for your cooperation... *.
* good day... *.
* {color} *.
* {color: #0000ff} *.
* {color} *.
* {color: #0000ff} Reynel Martinez Salazar. {color} *.
You must use FOR cursor LOOP:
DECLARE v1 utl_file.file_type; v2 varchar2 (100); begin v1:= utl_file.fopen('PUBLIC_ACCESS','prueb'||to_char(sysdate,'yyyymmdd')||'.txt','w'); for rec in (select codigo from ensayo) loop utl_file.put_line(v1,rec.codigo); end loop; utl_file.fclose(v1); exception when others then dbms_output.put_line(sqlerrm); end; / PL/SQL procedure successfully completed. SQL>
SY.
-
Try the Advanced installation of new ADR in a clean PDB 12 c (12.1.0.1) installation.
If someone had the same problem and a work around?
Error at startup to the line: 48 in command.
Start
run immediately "create user ORDS_PUBLIC_USER identified by ' ^ PUB_PWD ' account unlock default tablespace ^ temporary tablespace PUB_DATATBS ^ PUB_TEMPTBS';"
end;
Error report-
ORA-06550: Line 2, column 23:
PLS-00103: Fand das symbol "create user ORDS_PUBLIC_USER identified by 'mySecretPwd' als eines der following works wurde:
(- + new case mod not null < an ID >)
< between double quote delimited identifiers of > < a variable binding >
continue the current avg County are min max sql stddev prior
variance of the sum run forall fusion timestamp interval
Date < a literal string with the specified set of characters >
< a > < a SQL string between single quotes > hose
< ein alternativ in Anfuhrungszeichen geset
force_print
It seems to be related to the change here:
https://community.Oracle.com/thread/3731913
Finally the installation of ADR is running. However still not showing apex, but which appear to be a different problem.
Here is my solution to overcome the problem of creation of ORDS_PUBLIC_USER.
The problem was that they changed it to use execute_immediate. However, lexical surrogates have ' included.
Gives problems when adding to the string of immediate execution. And also problems for the password in quotation marks.
In the ords.war file to find the ords_create_rest_users.sql and replace the relevant parts marked with blue lines.
...
set PUB_PWD = ^ 1
set PUB_DATATBS = ' ^ 2'
set PUB_TEMPTBS = ' ^ 3'
ALTER session set current_schema = SYS;
-Remove user REST if exists
...
-Create user ORDS_PUBLIC_USER and unlock the account
create user ORDS_PUBLIC_USER identified by ' ^ PUB_PWD ' account unlock default tablespace ^ temporary tablespace PUB_DATATBS ^ PUB_TEMPTBS;
...
Maybe you are looking for
-
Can not go beyond "Windows Boot Manager".
The following message appeared after restarting my computer (Toshiba Satellite A200 1V0) from a window vista update Windows could not start. A recent hardwre or software change might be the cause.To solve the problem.1. Insert your windows installati
-
color of the digital meter ramp or slide is missing the performance
Hello I, m using CVI 2010 (10.0.1. (419) on windows 7-64 bit. In a simple program, I use a digital meter. I also use the color of the digital counter and on the IUR ramp, I see the ramp as expected with the defined colors. But when I run the Panel (i
-
APK to bar blackBerry Smartphones
Hello. I have a 9320 curve. I have converted an android APK at the bar, I just want to know if I can load studio 5 on my phone and use it without cause as far as I know, playbook, playbook only for BB 10.
-
What is the problem?
-
(Redirected) Start button / stop Alienware x 51 R2
Hi, recently bought an Alienware x 51 R2, but whenever I start my PC you have to press the button several times to start. -Does anyone know what is the problem of my PC?