PLS-00630: pipeline functions must have a collection of supported return type
Hello, I created a TYPE of OBJECT and function PLSQL as shown below, but the function compile errors with that follows. Don't know where is the problem?PLS-00630: pipelined functions must have a supported collection return type
It's about Oracle 10 g r2CREATE OR REPLACE TYPE cxs_plsql_profiler_object_type AS OBJECT (
cxs_object_name VARCHAR2 (128),
cxs_object_type VARCHAR2 (19),
cxs_object_status VARCHAR2 (7),
cxs_read_execution NUMBER,
cxs_buffer_gets NUMBER,
cxs_disk_reads NUMBER,
cxs_executions NUMBER,
cxs_sorts NUMBER,
cxs_sharable_mem NUMBER,
cxs_address NUMBER,
cxs_hashvalue NUMBER,
cxs_osuser VARCHAR2 (30),
cxs_username VARCHAR2 (30),
cxs_module VARCHAR2 (48),
cxs_machine VARCHAR2 (64),
cxs_status VARCHAR2 (8),
cxs_terminal VARCHAR2 (16),
cxs_percentconsume NUMBER,
cxs_percentrepeat NUMBER,
cxs_plan VARCHAR2 (120),
target_name VARCHAR2 (200),
referenced_name VARCHAR2 (200),
referenced_type VARCHAR2 (200),
targetowner VARCHAR2 (200),
refowner VARCHAR2 (200)
)
and here are the API FUNCTION CXS_GENERATE_PLSQL_PROFILER
RETURN cxs_plsql_profiler_object_type
PIPELINED IS
out_rec cxs_plsql_profiler_object_type ;
plsbatch plsql_batch;
skount integer;
dpendrec depend_tab;
dkount integer;
CURSOR objects
IS
SELECT object_name, object_type
FROM dba_objects
WHERE status = 'VALID'
AND owner NOT IN ('SYS', 'SYSTEM')
AND object_type IN ('PACKAGE', 'PROCEDURE', 'FUNCTION');
CURSOR apis (p_object dba_objects.object_name%TYPE)
IS
SELECT DISTINCT *
FROM (SELECT SUBSTR (a.sql_text, 1, 50) sql_text,
TRUNC
( a.disk_reads
/ DECODE (a.executions,
0, 1,
a.executions
)
) reads_per_execution,
a.buffer_gets, a.disk_reads, a.executions,
a.sorts, a.sharable_mem, a.address,
a.hash_value, b.osuser, b.username,
b.module, b.machine, b.status, b.terminal,
ROUND
(cxs_db_info.kompute_percentofsql
(a.sharable_mem),
5
) percentkonsume,
cxs_db_info.kount_repeat
(b.osuser,
b.terminal
) percentr,
c.operation explainplan
FROM v$sqlarea a, v$session b, v$sql_plan c
WHERE b.sql_hash_value = a.hash_value
AND b.sql_address = a.address
AND a.hash_value = c.hash_value
AND a.address = c.address
AND b.status = 'ACTIVE'
AND UPPER (a.sql_text) LIKE
'%' || p_object || '%'
AND c.ID = 0
ORDER BY 2 DESC)
WHERE ROWNUM <= 50; --profile option
BEGIN
skount := 0;
dkount := 0;
FOR i IN objects
LOOP
FOR j IN apis (i.object_name)
LOOP
skount := skount + 1;
plsbatch(skount).cxs_object_name := i.object_name;
plsbatch(skount).cxs_object_type := i.object_type;
plsbatch(skount).cxs_object_status := i.object_status;
plsbatch(skount).cxs_read_execution := j.reads_per_execution;
plsbatch(skount).cxs_buffer_gets := j.buffer_gets;
plsbatch(skount).cxs_disk_reads := j.disk_reads;
plsbatch(skount).cxs_executions := j.executions;
plsbatch(skount).cxs_sorts := j.sorts;
plsbatch(skount).cxs_sharable_mem := j.sharable_mem;
plsbatch(skount).cxs_address := j.address;
plsbatch(skount).cxs_hashvalue := j.hashvalue;
plsbatch(skount).cxs_osuser := j.osuser;
plsbatch(skount).cxs_username := j.username;
plsbatch(skount).cxs_module := j.module;
plsbatch(skount).cxs_machine := j.machine;
plsbatch(skount).cxs_status := j.status;
plsbatch(skount).cxs_terminal := j.terminal;
plsbatch(skount).cxs_percentconsume := j.percentconsume;
plsbatch(skount).cxs_percentrepeat := j.percentrepeat;
plsbatch(skount).cxs_plan := j.explainplan;
END LOOP;
FOR dd IN dpend (i.object_name)
LOOP
dkount := dkount + 1;
dependrec (dkount).target_name := dd.NAME;
dependrec (dkount).refname := dd.referenced_name;
dependrec (dkount).reftype := dd.referenced_type;
dependrec (dkount).target_owner := dd.owner;
dependrec (dkount).refowner := dd.referenced_owner;
END LOOP;
END LOOP;
for a in 1..skount loop
out_rec.cxs_object_type := plsbatch(a).object_type;
out_rec.cxs_object_status := plsbatch(a).object_status;
out_rec.cxs_read_execution := plsbatch(a).reads_per_execution;
out_rec.cxs_buffer_gets := plsbatch(a).buffer_gets;
out_rec.cxs_disk_reads := plsbatch(a).disk_reads;
out_rec.cxs_executions := plsbatch(a).executions;
out_rec.cxs_sorts := plsbatch(a).sorts;
out_rec.cxs_sharable_mem := plsbatch(a).sharable_mem;
out_rec.cxs_address := plsbatch(a).address;
out_rec.cxs_hashvalue := plsbatch(a).hashvalue;
out_rec.cxs_osuser := plsbatch(a).osuser;
out_rec.cxs_username := plsbatch(a).username;
out_rec.cxs_module := plsbatch(a).module;
out_rec.cxs_machine := plsbatch(a).machine;
out_rec.cxs_status := plsbatch(a).status;
out_rec.cxs_terminal := plsbatch(a).terminal;
out_rec.cxs_percentconsume := plsbatch(a).percentconsume;
out_rec.cxs_percentrepeat := plsbatch(a).percentrepeat;
out_rec.cxs_plan := plsbatch(a).explainplan;
PIPE ROW(out_rec);
end loop;
for b in 1..dkount loop
out_rec.target_name := dd.NAME;
out_rec.refname := dependrec (b).referenced_name;
out_rec.reftype := dependrec (b).referenced_type;
out_rec.target_owner := dependrec (b).owner;
out_rec.refowner := dependrec (b).referenced_owner;
PIPE ROW(out_rec);
end loop;
RETURN;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE(DBMS_UTILITY.format_error_backtrace);
DBMS_OUTPUT.PUT_LINE(SQLCODE);
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;
and here's tradtional types of tables that are used in the code above. TYPE type_plsql_rec IS RECORD (
cxs_object_name VARCHAR2 (128),
cxs_object_type VARCHAR2 (19),
cxs_object_status VARCHAR2 (7),
cxs_read_execution NUMBER,
cxs_buffer_gets NUMBER,
cxs_disk_reads NUMBER,
cxs_executions NUMBER,
cxs_sorts NUMBER,
cxs_sharable_mem NUMBER,
cxs_address NUMBER,
cxs_hashvalue NUMBER,
cxs_osuser VARCHAR2 (30),
cxs_username VARCHAR2 (30),
cxs_module VARCHAR2 (48),
cxs_machine VARCHAR2 (64),
cxs_status VARCHAR2 (8),
cxs_terminal VARCHAR2 (16),
cxs_percentconsume NUMBER,
cxs_percentrepeat NUMBER,
cxs_plan VARCHAR2 (120)
);
TYPE plsql_batch IS TABLE OF type_plsql_rec
INDEX BY BINARY_INTEGER;
TYPE type_depend_tab IS RECORD (
target_name dba_dependencies.NAME%TYPE,
refname dba_dependencies.referenced_name%TYPE,
reftype dba_dependencies.referenced_type%TYPE,
target_owner dba_dependencies.owner%TYPE,
refowner dba_dependencies.referenced_owner%TYPE
);
TYPE depend_tab IS TABLE OF type_depend_tab
INDEX BY BINARY_INTEGER;
Thank you for your time in reading this postR
Johan says:
Sorry!.
Actually, I meant
I thought as well.
Typos can be expensive however. As a probe of NASA Mars in 99, which was lost due to a simple mathematical error - a confusion between English and metric units. ;-)
Or screw up a server in reason to use a Unix fork() where the client process think that it is the parent and the beginning more children who believe they are also parents of spawning... (one of my mistakes of kewlest never) :-)
Tags: Database
Similar Questions
-
Reg: Error using Parallel_Enable in pipeline, function.
Hi Experts,
This might be a simple question, surely, I forgot something.
CREATE or REPLACE PACKAGE parallel_pipelined_update AS
TYPE rec_x IS RENDERING)
rep_per NUMBER,
unikid NUMBER
);
TYPE histdetl_tab IS TABLE OF THE rec_xINDEX BY PLS_INTEGER;
-TYPE histdetl_tab IS TABLE OF THE histdetl;
TYPE histdetl_refcur IS REF CURSOR RETURN histdetl;FUNCTION fn_parallel_update (input_cur_query IN histdetl_refcur)
Histdetl_tab RETURN PIPELINED
PARALLEL_ENABLE (PARTITION input_cur_query IN ALL);END parallel_pipelined_update;
/During execution of this error are-
Line of text Pos
1 pack of Create, executed in 0.24 sec.
14 12 PLS-00630: pipeline functions must have a collection of supported return type
The total run of dry weather 1.16.
What may be a possible reason? Please notify.
-Nordine
(on Oracle 11.2.0.3.0)
To be more precise, who made the statement of histdetl_tab a table nested (as opposed to a PL/SQL table) would be supported.
TYPE histdetl_tab IS TABLE OF rec_x INDEX OF PLS_INTEGER;
-
PLS-00201: identifier 'TABLETYPE_VARCHAR2' must be declared.
Hi all, when I copy a procedure from oracle, and then the paste into the TimesTen to re-create the procedure, I get the following exception:
PLS-00201: identifier 'TABLETYPE_VARCHAR2' must be declared.
If the 'TABLETYPE_VARCHAR2' type is available in oracle not in TimesTen.
Y at - it approach to solving this problem or links to the list of incompatibilities between oracle and TimesTen on PL/SQL?
Thank youGena, it seems that the package in timesten is a substitute for custom in oracle, right types?
TimesTen does not support object types, but we can use types in packages, it's sort of a "Workaround", I think.
Basically, the packets do not replace custom types (there are two different objects PLSQL with different purpose), but in this case we can do.Best regards
Gena -
iHi.
Declare cursor c_1 is select col1,col2,col3,col4 from table1 type t_type is table of c_1%rowtype index by binary_integer; v_data t_type; BEGIN OPEN c_1; LOOP FETCH c_1 BULK COLLECT INTO v_data LIMIT 200; EXIT WHEN v_data.COUNT = 0; FORALL i IN v_data.FIRST .. v_data.LAST INSERT INTO xxc_table (col1, col3, col4 ) SELECT v_data (i).col1, v_data (i).col3, v_data (i).col4 FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM xxc_table a WHERE col1=col1 ..... ); --commit; INSERT INTO xxc_table1 (col1, col2, col3, col4 ) SELECT v_data (i).col1, v_data (i).col2, v_data (i).col3, 'Y' FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM xxc_table1 a WHERE col1=col1 ..... ); --exit when c_1%notfound; END LOOP; CLOSE c_1; commit; END;
I get 40/28-PLS-00201: identifier 'I' must be declared what the problem in the above code please help me and I have lakhs of data
Thank you
Post edited by: Rajesh123 I changed IDX
Post edited by: Rajesh123 changed t_type c_1 in Fetch
But by using a SET of INSERT to insert into two tables at once in the same query would do the job without any collection of bulk of PL and avoid to query two times too.
for example, as a single INSERT...
SQL > create table table1 as
2. Select 1 as col1, col2 of 1, 1 as col3, 1 as col4 Union double all the
3 select 2,2,2,2 of all the double union
4 Select 3,3,3,3 Union double all the
5 Select 4,4,4,4 of all the double union
6 select 5,5,5,5 of all the double union
7 select 6,6,6,6 of all the double union
8 select 7,7,7,7 of all the double union
9 select 8,8,8,8 of all the double union
10. Select 9,9,9,9 to the Union double all the
11. Select double 10,10,10,10
12.Table created.
SQL > create table xxc_table like
2. Select 1 as col1, col3 2, 3 as col4 Union double all the
3. Select the 3, 4, 5 Union double all the
4. Select the 5, 6, 7 double
5.Table created.
SQL > create table xxc_table1 like
2. Select 3 as col1, col2, col3, 5 4 "n" as col4 Union double all the
3. Select the 6, 7, 8, double "n"
4.Table created.
SQL > insert all
2 when the xt_insert is null then
3 in xxc_table (col1, col3, col4)
4 values (col1, col3, col4)
5 when the xt1_insert is null then
6 in xxc_table1 (col1, col2, col3, col4)
7 values (col1, col2, col3, 'Y')
8. Select t1.col1 t1.col2, t1.col3, t1.col4
9, xt.col1 as xt_insert
10, xt1.col1 as xt1_insert
11 from table1 t1
12 left join external xxc_table xt (t1.col1 = xt.col1)
13 left xt1 xxc_table1 outer join (t1.col1 = xt1.col1)
14.15 rows created.
SQL > select * from xxc_table by 1.
COL1 COL3 COL4
---------- ---------- ----------
1 2 3
2 2 2
3 4 5
4 4 4
5 6 7
6 6 6
7 7 7
8 8 8
9 9 9
10-10-1010 selected lines.
SQL > select * from xxc_table1 by 1.
COL1 COL2 COL3 C
---------- ---------- ---------- -
1 1 1 Y
2 2 2 Y
3 4 5 N
4 4 4 Y
5 5 5 Y
6 7 8 N
7 7 7 Y
8 8 8 Y
9 9 9 Y
10-10-1010 selected lines.
SQL >
-
Pipeline table function compile (PLS-00222: no function name)
Hello
Trying to stuff a call to v$ sql in a function and are unable to compile:
results increate or replace package p is type s_row is record(sql_id v$sql.sql_id%type ,child_number v$sql.child_number%type ,hash_value v$sql.hash_value%type ,address v$sql.address%type ,executions v$sql.executions%type ,sql_text v$sql.sql_text%type); type rows_tt is table of s_row; function vsql (sqltext IN varchar2 DEFAULT '%zz%') return rows_tt pipelined; end; / show errors create or replace package body p is function vsql (sqltext IN varchar2 DEFAULT '%zz%') return rows_tt pipelined is begin for rec in (select /* recentsql*/ sql_id , child_number , hash_value , address , executions , sql_text from v$sql where sql_text like sqltext and upper(sql_text) not like upper('%recentsql%')) loop pipe row(s_row ( rec.sql_id , rec.child_number , rec.hash_value , rec.address , rec.executions , rec.sql_text)); end loop; return; end; end; / show errors
What I am doing wrong?HR@XE> @vsql Package created. No errors. Warning: Package Body created with compilation errors. Errors for PACKAGE BODY P: LINE/COL ERROR -------- ----------------------------------------------------------------- 18/17 PL/SQL: Statement ignored 18/26 PLS-00222: no function with name 'S_ROW' exists in this scope HR@XE>
Thank you
JasonDocuments have no constructors. Change:
pipe row(s_row ( rec.sql_id , rec.child_number , rec.hash_value , rec.address , rec.executions , rec.sql_text));
TO:
pipe row(rec);
SY.
-
PLS-00362: Invalid cursor return type; 'NUMBER' must be a record type
Hello
Having a little trouble with the following code example provided to http://www.dba-oracle.com/plsql/t_plsql_cursor_variables.htm:
In the code above, SELECT COUNT (*)... returns a NUMBER. I know it's an aggregation function, but it returns a single value.1 DECLARE 2 TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER; 3 c_cursor t_ref_cursor; 4 l_row NUMBER; 5 BEGIN 6 DBMS_OUTPUT.put_line('Strongly typed REF CURSOR using SCALAR type. Expect an error!'); 7 OPEN c_cursor FOR 8 SELECT COUNT(*) cnt 9 FROM cursor_variable_test; 10 LOOP 11 FETCH c_cursor 12 INTO l_row; 13 EXIT WHEN c_cursor%NOTFOUND; 14 DBMS_OUTPUT.put_line(l_row); 15 END LOOP; 16 CLOSE c_cursor; 17* END; 18 / TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER; * ERROR at line 2: ORA-06550: line 2, column 24: PLS-00362: invalid cursor return type; 'NUMBER' must be a record type ORA-06550: line 2, column 3: PL/SQL: Item ignored
Why can't return a value in a column of a row in a NUMBER?
How can I change the SQL code so that I can do this?
Furthermore, I wonder about the use of FETCH with a count (*)... FETCH is supposed to fetch the next row... How it works when you select an aggregate as County?
Thank you very much
Jason>
TYPE t_ref_cursor IS REF CURSOR RETURN NUMBER;
*
ERROR on line 2:
ORA-06550: line 2, column 24:
PLS-00362: Invalid cursor return type; 'NUMBER' must be a record type
ORA-06550: line 2, column 3:
PL/SQL: Ignored ElementIn the code above, SELECT COUNT (*)... returns a NUMBER. I know it's an aggregation function, but it returns a single value.
Why can't return a value in a column of a row in a NUMBER?
How can I change the SQL code so that I can do this?
>
The exception is in line 2: your cursor statement. And the answer is in the text that you access
>
The return value of a strongly typed REF CURSOR must be a folder that can be defined using % TYPE % ROWTYPE attributes or record structure.
>
You said the CURSOR to return a NUMBER. And as the text says, he must be a 'record '.
>
Furthermore, I wonder about the use of FETCH with a count (*)... FETCH is supposed to fetch the next row... How it works when you select an aggregate as County?
>
As you said already FETCH retrieves the next line, if any. A query is a request is a request. It returns a result set. A query that uses aggregates returns a result set. A query that does not aggregate returns a result set.Your simple COUNT (*) SELECT query returns a result set that consists of a LINE and a line a ONE COLUMN of type NUMBER. Although there is only one column in the result set, what is returned is a RECORD or a LINE. That's why you have to report your data cursor return type a document using the % ROWTYPE or % TYPE attributes or a record structure.
-
pipeline function and type inside the package
Hi all
I'm sorry for the inconvenience, I tried to google my question before asking here...
The question is:
I can't compile type in the same package as my function in the pipeline?
I have an example of a function in the package, everything works fine.
SELECT using function statement:CREATE OR REPLACE PACKAGE ZOO.pkg_cl_risk_eval AS FUNCTION sample (p_date date, p_indicatorid number, p_ismodel number) return cl_risk_act pipelined; END; / CREATE OR REPLACE PACKAGE BODY pkg_cl_risk_eval is FUNCTION sample (p_date date, p_indicatorid number, p_ismodel number) return cl_risk_act pipelined IS v_obj cl_risk_type := cl_risk_type(NULL,NULL,NULL,NULL); BEGIN FOR e IN ( select trunc(sysdate) as adate, 0 as cid, 0 as indicatorid, case when p_ismodel = 0 then 0 else 1 end as value from dual ) LOOP v_obj.adate := e.adate; v_obj.cid := e.cid; v_obj.indicatorid := e.indicatorid; v_obj.value := e.value; PIPE ROW (v_obj); END LOOP; RETURN; end; end; /
I can't compile type in the same package as my function in the pipeline?select * from table(zoo.pkg_cl_risk_eval.sample(date '2011-09-30',4, 0))
Currently, it is outside the package:
As far as I can read from this source, it is impossible, but this information can be updated.DROP TYPE cl_risk_type FORCE; CREATE OR REPLACE TYPE cl_risk_type AS OBJECT ( adate date, cid number(10), indicatorid number(5), value number(5) ) / CREATE OR REPLACE TYPE cl_risk_act AS TABLE OF cl_risk_type /
http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:4447489221109
Oracle version: 11g
UPD:
I'm sorry, I'm not paying attention... It is possible as noted in the response to my similar question:
function in pipeline work in the package? (Oracle 11g)
Published by: marco on December 15, 2011 07:40As the following State messages, my post was wrong. I withdraw without reservation.
Published by: APC on December 15, 2011 15:30
-
How I can fix this bug with my class, I get this message:
"A file in a source path must have the same package structure", as the definition, "photoviewer" package. "
It's my source WindowedApplication:
<? XML version = "1.0" encoding = "utf-8"? >
"" < mx:WindowedApplication xmlns:mx = ' http://www.adobe.com/2006/mxml '
"" xmlns = "*".
paddingBottom = paddingTop = "0" "0".
paddingLeft paddingRight '0' = '0 = '.
Layout = "vertical".
pageTitle = "Photo Viewer"
creationComplete = "init ()" viewSourceURL = "srcview/index.html" > "
< mx:Script >
<! [CDATA]
Import mx.collections.ArrayCollection;
Mx.rpc.events import. *;
PhotoViewer Import. Gallery;
PhotoViewer Import. PhotoService;
[Bindable]
private var: Gallery;
[Bindable]
private var service: PhotoService.
private function init (): void
{
service = new PhotoService("data/galleries.xml");
}
[]] >
< / mx:Script >
This is my Gallery class source:
the photoviewer package
{
Import mx.collections.ICollectionView;
Import mx.collections.ArrayCollection;
Import mx.collections.IViewCursor;
[Bindable]
public class Gallery
{
public var name: String;
public var description: String;
public var photos: ArrayCollection collection;
public var selected: int;
private var photo: Photo;
public void Gallery (gallery:Object = null)
{
photos = new ArrayCollection();
If (Gallery! = null)
{
Fill (Gallery);
}
}
public void fill(gallery:Object):void
{
myIdName = gallery.id;
This.Description = gallery.description;
This.Selected = 0;
for (var i: int = 0; i < gallery.photo.length; i ++)
{
Photo = new Photo (gallery.photo );
photos.addItem (photo);
}
}
}
}
Someone knows how to fix this error?
"A file in a source path must have the same package structure", as the definition, 'photoviewer' package. '?
Kind regards
EvsPeart
Yes. If you want to file package photoviewer Gallery you create directory photoviewer in src and move the file there.
-
PLS-00201: identifier 'SP_INSERT_FS_DUMP' must be declared.
Gurus,
I'm having a problem in a package that I have. I created this package, but when I run it I get this error
java.sql.BatchUpdateException: ORA-06550: line 1, column 7:
PLS-00201: identifier 'SP_INSERT_FS_DUMP' must be declared.
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I use oracle 10.2.0.3. I gave subsidies to run and debug functional ID.
The body code is too big to be pasted here. I guess this isn't the error code the compilation went well.
Any help will be appreciated.
CREATE OR REPLACE PACKAGE SDP
AS
PROCEDURE SP_INSERT_FS_DUMP (FS_DELTA in NUMBER, INTERMEDIATE_ID number, SDA in VARCHAR2, LOG_ID in NUMBER);
END SDP;
/
PROCEDURE SP_INSERT_FS_DUMP
(
FS_DELTA number,
INTERMEDIATE_ID number,
SDA in VARCHAR2,
LOG_ID NUMBER
)
AS
SDAMINUS40 EXPOSURE_GMR_FS. Type of SDG_MINUS_40%;
SDAMINUS20 EXPOSURE_GMR_FS. Type of SDG_MINUS_20%;
SDAMINUS10 EXPOSURE_GMR_FS. Type of SDG_MINUS_10%;
SDAMINUS5 EXPOSURE_GMR_FS. Type of SDG_MINUS_5%;
SDA0 EXPOSURE_GMR_FS. Type of SDG_0%;
SDAPLUS1 EXPOSURE_GMR_FS. Type of SDG_PLUS_1%;
SDAPLUS5 EXPOSURE_GMR_FS. Type of SDG_PLUS_5%;
SDAPLUS10 EXPOSURE_GMR_FS. Type of SDG_PLUS_10%;
SDAPLUS20 EXPOSURE_GMR_FS. Type of SDG_PLUS_20%;
SDAPLUS40 EXPOSURE_GMR_FS. Type of SDG_PLUS_40%;
I have NUMBER: = 0;
|
|
|
|
|
COMMIT;
END SP_INSERT_FS_DUMP;Hello
After the statement of appeal, i.e. the statement that generated the error.
Assuming that the package is in user_x scheme, is the right way to call this procedure:
user_x.sdp.sp_insert_fs_dump (n1, n2, n3, n4);
Is that what you call it?
You can ignore the name of the owner (user_x) if user_x is your current schema. Normally, this is the case only when you open a session as user_x.
The name of the package (sdp) can be ignored if you call the procedure from the same package.
-
After you download the security update 2015-008 I lost the function of the function keys and some other functions. Have already played with the keyboard f nothing helps. Are also past system on and outside... need help pls
PS noticed the update downloaded twice
disregard my previous question... I found the answer: F1, F2 has been ticked on.
-
Records of 'must have' of roaming profiles
Hello
We are currently setting up profiles for our mobile sales. The main problem is that the roaming profiles Dungeon above the profile storage space. I was wondering if anyone could tell me which are the files 'must have' that should be included in a roaming profile? For example do we really need to include all the files in the Application data and local settings? (The "My Documents" FYI have already been excluded because they are redirected to another server). Any help or links that will direct me in the right direction will be greatly appreciated.
Paula
Local settings is not normally included in the roaming profiles. It contains the folders temp and Outlook mailstore, which tends to make it big.
Application data tend to contain settings for specific programs, so you should evaluate on the basis of what is used on your site. However, it excludes in its entirety could lead to problems in some cases.
Another one, I'd say WinDirStat as a useful tool to find the space where goes.
http://WinDirStat.info/
What is the roaming profile, I find that many customers seem to think they should automatically "have their own files" no matter where they log - on, but at the same time don't need exercise no clean what they store and where. I say while it's functionally a case to expect to have your bread buttered on both sides and get to eat! In practice some policy decisions to do in regard to if the roaming profile path is applicable to your site and if so how much users is likely to comply with its constraints. If they can not do it then I suggest that this is not a good path to follow, especially since the oversized profiles will lead to very slow logons.
Also, keep in mind that you're in headaches for real, if you want to introduce Windows 7 computers - profiles are not compatible, and what is happening here is that the roaming user develops a split personality.
-
REP-0737: must be a function of return type 'ref cursor.
Hi all
I have create a ref cursor query in reports 10 g. But it is giving error REP-0737: must be a function of return type 'ref cursor.
Here is my code
function QR_1RefCurDS return sys_refcursor is My_Cur Sys_Refcursor; begin Open My_Cur for select * from scott.emp order by deptno; return My_Cur end;
fate of the screen.
Oracle Forms/Reports has a complete PL/SQL engine and (only) the SQL parser.
However, the engine of forms/States PL / SQL and SQL Analyzer are at a level that was in the Oracle 8.0 database.
So, in the forms/States functions/procedures and forms/States triggers, you can not use SQL commands that did not exist in the 8.0 database.
The predefined SYS_REFCURSOR type is introduced in Oracle 9i.
Use this:
PACKAGE test_rc IS
TYPE of rc_type IS REF CURSOR RETURN emp % ROWTYPE;
END;
FUNCTION RETURN QR_1RefCurDS Test_rc.rc_type IS
test_rc.rc_type RC;
BEGIN
OPEN the RC to SELECT * FROM emp;
RETURN rc;
END;
Kind regards
Zlatko
-
PLS-00201: identifier 'NVL2' must be declared.
I came across a scenario where I saw that NVL2 is a PL/SQL function, but when I tried to use this function directly with plsql variable it gives me error. Although it is find a job within SQL.
Here is the example I'm writing his strange behavior I see.
I'm under banner PL/SQL Release 11.2.0.4.0 - Production
SQL> --See when we use NVL2 within SQL it works fine SQL> select nvl2('IamNotNull', 'IamForNotNull', 'IamForNull') for_not_null 2 ,nvl2(null, 'IamForNotNull', 'IamForNull') for_null 3 from dual; FOR_NOT_NULL FOR_NULL ------------- ---------- IamForNotNull IamForNull SQL> --Problem occurs when we assign the resultant directly into variable in anonymous block SQL> declare 2 for_not_null varchar2(200); 3 begin 4 for_not_null :=NVL2('IamNotNull', 'IamForNotNull', 'IamForNull'); 5 end; 6 / for_not_null :=NVL2('IamNotNull', 'IamForNotNull', 'IamForNull'); * ERROR at line 4: ORA-06550: line 4, column 20: PLS-00201: identifier 'NVL2' must be declared ORA-06550: line 4, column 5: PL/SQL: Statement ignored SQL>
Spear says:
But I had look at Oracle self-documenting and it was not clear that NVL2 is SQL fucntion.
Weird, because I just searched documentation, and the first that says NVL2 in the context of the PL/SQL language was all NVL2 hits were either programming language SQL or OLAP expression reference: http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/fundamentals.htm#LNPLS00212
which clearly states that the NVL2 is not available in PL/SQL.
-
Bogged down with PLS-00201: identifier 'P_ERR_MESSAGE1' must be declared
I'm trying to capture an error message in the exception block, and then move it to the calling procedure. I'm getting bogged down with an error "PLS-00201: identifier 'P_ERR_MESSAGE1' must be declared '. How can I fix this or how I can pass the error message in the main proceedings.
The situation is the following:
-Local variable
CRLF VARCHAR2 (2) CONSTANT: = CHR (13) | CHR (10);
-- --------------------------------------------------------------------------------
-FORWARD DECLARATIONS
-- -----------------------------------------------------------------------------
PROCEDURE p_sendmail (p_sender_email IN VARCHAR2,
P_FROM IN VARCHAR2,
p_to IN VARCHAR2,
msg_subject IN VARCHAR2 DEFAULT NULL,
p_msg_body IN LONG DEFAULT NULL,
p_err_message1 OUT VARCHAR2);
PROCEDURE p_sendmail (p_sender_email IN VARCHAR2,
P_FROM IN VARCHAR2,
p_to IN VARCHAR2,
msg_subject IN VARCHAR2 DEFAULT NULL,
p_msg_body IN LONG DEFAULT NULL,
p_err_message1 OUT VARCHAR2) is
LONG v_to_list;
LONG v_cc_list;
LONG v_bcc_list;
T_DATE VARCHAR2 (255) DEFAULT TO_CHAR(SYSDATE, 'DD MON YYYY HH24:MI:SS PM');
g_mail_conn UTL_SMTP. CONNECTION;
SMTP_HOST CONSTANT VARCHAR2 (256): = ' smtp - abc.defg.ca';
SMTP_PORT CONSTANT PLS_INTEGER: = 25;
BEGIN
g_mail_conn: = UTL_SMTP. OPEN_CONNECTION (SMTP_HOST, SMTP_PORT);
UTL_SMTP. HELO (g_mail_conn, SMTP_HOST);
UTL_SMTP.mail (g_mail_conn, p_sender_email);
UTL_SMTP. RCPT (g_mail_conn, p_to);
UTL_SMTP.open_data (g_mail_conn);
UTL_SMTP.write_data (g_mail_conn, "|) CRLF);
UTL_SMTP.write_data (g_mail_conn, p_msg_body);
UTL_SMTP.close_data (g_mail_conn);
UTL_SMTP. Quit (g_mail_conn);
EXCEPTION
WHEN utl_smtp.transient_error THEN
RAISE_APPLICATION_ERROR (SQLCODE, SQLERRM);
-DBMS_OUTPUT.put_line ('TransientError: Invalid Operation have service may not be available.');
WHEN utl_smtp.permanent_error THEN
RAISE_APPLICATION_ERROR (SQLCODE, SQLERRM);
-DBMS_OUTPUT.put_line ('Permanent Error: The email id entered is either invalid or recepients mail box is full.');
-p_errmessage: = SQLERRM;
WHILE others THEN
RAISE_APPLICATION_ERROR (SQLCODE, SQLERRM);
-DBMS_OUTPUT.put_line ('Unable to send year email.');
-p_errmessage: = SQLERRM;
IF SQLERRM IS NOT NULL THEN
p_err_message1: = SQLERRM;
ON THE OTHER
p_err_message1: = NULL;
END IF;
END p_sendmail;
-Call the procedure below:
p_sendmail (p_sender_email = > ' [email protected]'-, send an E-mail to the donor )
p_from = > ' ADS < [email protected] > ',
p_to = > v_store_email_address,
p_msg_subject = > 'anonymous user ',.
p_msg_body = > 'thank you ' |
CRLF.
"Email confirms that we have received your promise |
CRLF.
CRLF.
' Name: ' || v_full_name |
CRLF.
' Temporary ID: ' | v_azbwccp_id |
CRLF.
"Reference number: ' |" MTID |
CRLF.
"Amount: ' | '. TO_NUMBER (campaign_desg_amt1) |
CRLF.
"Campaign: ' | '. campaign |
CRLF.
' Description: ' | '. adbdesg_rec.adbdesg_name |
CRLF.
' Type: ' | atvpldg_rec.atvpldg_desc |
CRLF.
' Duration: ' | '. atvpdur_rec.atvpdur_desc |
CRLF.
"Frequency: ' | '. atvfreq_rec.atvfreq_desc |
CRLF.
"Start date: ' | '. bill_date2 |
CRLF.
CRLF.
'Your commitment is processed.' |
CRLF.
"At the same time, if you want to change this transaction, please contact us.
CRLF.
CRLF.
"Thank you for your support." |
CRLF.
CRLF.
CRLF.
CRLF.
' * This is an automated message system. Please, do not respond to this email. *** ',
p_err_message1);
Now when I compile it, I am getting bogged down with an error message called: PLS-00201: identifier 'P_ERR_MESSAGE1' must be declared
Where do I feel bad? When I google, talk, or the variable is not set (which is not the case) or on the privileges (which is not the case that I compiled the same procedure with fewer parameters the week last in my schema). Any idea?
I have attached a screenshot as well. Thanks in advance.
Yes, I was not able to copy and paste the package specifications and the whole body, because its too too big. Hope you understand.
The problem is that you had declared him an OUT parameter p_err_message1. This setting is valid only inside the procedure. However, you tried to use it outdoors (during the call to the procedure). Declare and use a different variable to solve the problem.
...
p_sendmail (p_sender_email => ' [email protected]'-, send an E-mail to the donor)
...
CRLF.
' * This is an automated message system. Please, do not respond to this email. *** ',
( p_err_message1) ;
To identify the problem in a quick way and constitent, generally it allows to watch the line numbers. Or use sql developer. There, you can jump directly to the error line.
-
How to use a PIPELINED function shaped 10g?
Hi guys,.
When I tried to use a PIPELINED function in the forms, I got the message:
-Function called from SQL PL/SQL must return the legal value of Type SQL
FOR rec_dev IN (SELECT *)
TABLE (p1196.f_executa (August 1, 2010 ", - pdDataInicial"))
August 30, 2010 ", - pdDataFinal"
5,-pnCodAdm
NULL,--pnCdsCod
NULL,--pnAdmsSrvCod
NULL,--pnAcao
NULL)))
LOOP
vnQtdeEstornos: = vnQtdeEstornos + rec_dev.qtde_estornos;
vnVlrTotalCredito: = vnVlrTotalCredito + rec_dev.valor_credito;
END LOOP;
Can someone help me?
CreeYou can not. One possibility would be to wrap your function in the pipeline in a view, or you can write a stored procedure that returns a strong Ref cursor instead.
see you soon
Maybe you are looking for
-
Problems with mail flagged is not cleaning
Hello I have been using Mail Version 9.3 (3124) to receive and respond to emails from email accounts different (gmail, yahoo, hotmail + private mail server) and identification of the important emails with my workflow. Thursday, I had 80 marked emails
-
Portege R700 - BIOS-update 2.20 - WIN does not work
I have a Portege R700-172-PT311E-03201KGRIt's a WIN 7 64 bit Machine. Current BIOS 1.70EC-current Version: 1.40 For this machine, an update of the BIOS and IT's there.So I downloaded the "BIOS220_EC160.exe" update and tried to treat. The first messag
-
How to read data from 16-bit unsigned IMAQdx?
I was using my firewire camera to take pictures in unsigned 16-bit grayscale and processing of these data in matlab. However, the data becomes incorrect when the integration time of the camera is great. I discovered that the reasons are: 1, IMAQdx de
-
CQ62-410US stuck with "Several monitor - Clone View" and VGA port does not
Hello! I have a Compaq CQ62-410US computer laptop with an Intel GMA 4500 M (onboard) video card and a port output VGA, Windows 7 x 64 operating system. A few weeks back the screen was broken (kick straight punch of a child) and nothing could be trans
-
Original title: KB936330 custody relocation After starting without error black screen display problems indicating "start with vista or run diagnostics" etc. I did a full restore. A few problems with windows update which has finally been overcome them