<; cfquery >; return type
Hello
< cfproperty >
< name cffunction = "saveInfo" access = "public" returntype = "query" >
< name cfargument = "Employe_id" type = "string" required = "no" >
< name cfargument = "Address" type = "any" required = "no" >
< cfquery name = "EmployeeInfo" datasource = "Employees_data" >
Update Employees_Data_Info
SET Address = ' #arguments. Address #'
where Employee_ID = ' #arguments. Employe_id #'
< / cfquery >
< cfreturn EmployeeInfo >
< / cffunction >
< / cfproperty >
It is throwing the following error.
faultCode:Server.Processing faultString: 'Unable to invoke CFC - EmployeeInfo Variable is not defined.' faultDetail: "
Can anyone suggest why it's happening...
Thank you...
Update queries from does not return a Recordset...
--
Adam
Tags: ColdFusion
Similar Questions
-
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
-
Property Finder have table as return type
Hi all
Is it possible to return the finders of vco table types?
If I give the property name in the property-bean attribute then it gives [Ljava.lang.String;@4981086 as value (as expected).
< bean-PROPERTY = display name "testProp" = "Property of Test" hidden = "false" name = "testProp" show in the column = see "real" description = "true" / >
But is it possible to specify bean-property attribute of tag finder so that we can wrap up the property value according to a static utility method. Maybe something like below (I know that the threshold is not correct, but it's just a wild guess)
< bean-property = "StringUtils.joinArray (testProp) property' display name ="Test well"hidden ="false"name ="testProp"show in the column = see"real"description ="true"/ >"
Or any other means by which I can manage property array return types.
Thank you for your help.
Best regards
Sumit Tyagi.
Hi Sergio,
Get it now, we can specify any OGNL expression in property accessor of property tag attribute. Read a little on the OGNL expressions and had it work.
The below xml tag property works for me now.
Best regards
Sumit Tyagi
-
CallFunction return type of the object instead of boolean
Hello
I used getScript("Somescriptname").callFunction to call a function in another script which has a boolean as a return type.
The call above always returns type object, I tried an explicit cast to a boolean, but his throw syntax error.
Please suggest
Thanks and greetings
Madoux
Hello Suresh,
getScript (.callFunction) always returns an object. Initially, it should be stored in an object and then analyze Boolean value as shown below:
Object Val = getScript("ScriptName").callFunction ("FunctionName", past of the arguments for the function, if any);
Analyze as below
Giveme Boolean = Boolean.parseBoolean (val.toString ());
System.out.println ("return val:" + giveme);
This should solve your problem. Please let me know if this isn't...
A happy test...
Kind regards
Plot of Sri
-
Hello
I read conflicting information about the return type that has a table function must or may use.
First, I am a student of a book that says:
Function in pipeline returns the data types:
The main constraint for the pipeline functions, it is the return type must be a collection type autonomous which can be used in SQL - i.e. a VARRAY or table nested.
and then in the next sentence...
More precisely a pipeline function can return the following:
A stand-alone nested table or VARRAY, defined at the schema level.
A nested table or VARRAY that has been declared in a package type.
This seems to go against the first quoted sentence.
Now, before reading the above text I had done just my own test to see if a packed type would work because I thought I had read somewhere that it would not, and he does not (the test code and this output is at the end of this question). When I arrived in the text above, after my test, so I was naturally confused.
So, I'm going to PL/SQL reference that says:
RETURN data type
The data type of the value returned by a function table in pipeline must be a type collection defined either at the level of schema or within a package (therefore, it cannot be a type of associative array).
I tried to call a function that returns a collection of VARRAY type packaged in both SQL and PL/SQL (of course below is SQL all in any case) and no work.
Now I'm wondering what is a TABLE function must use a schema type and a function table in pipeline can use a packaged type? I see that I created and called a function table but examples of Oracle see the creation and use of a function table in pipeline.
Edit: I should add that I read the following sentence in the SF book on p609 in * table functions: "this type of nested table must be defined as an element of level diagram, because the SQL engine must be able to resolve a reference to a collection of this kind."
So that it begins to resemble table functions should return a schema type and pipelined table functions, perhaps because that they don't in fact return a collection, rather they return (RowSource) content, can use the schema types or types of packages. Is this correct?
Can someone clarify this for me please?
Thank you in advance,
J
CREATE OR REPLACE PACKAGE PKGP28M
VAT-type is varray (5) number;
END;
/
DISPLAY ERRORS
create or replace type VAT is varray (5) number;
/
display errors
create or replace function tabfunc1 return pkgp28m.vat as
numtab pkgp28m.vat:=pkgp28m.vat();
Start
numtab.extend (5);
because loop me in 1.5
numtab (i): = trunc (dbms_random. Value (1.5));
end loop;
Return numtab;
end;
/
display errors
create or replace function tabfunc2 as return VAT
numtab vat:=vat().
Start
numtab.extend (5);
because loop me in 1.5
numtab (i): = trunc (dbms_random. Value (1.5));
end loop;
Return numtab;
end;
/
display errors
exec dbms_output.put_line (' call tabfunc1 (returns the packaged type) :');)
Select * from table (tabfunc1)
/
exec dbms_output.put_line (' call tabfunc2 (returns the type of schema) :');)
Select * from table (tabfunc2)
/
declare
RC sys_refcursor;
number of v;
Start
dbms_output.put_line (' in anonymous block1 - open rc to select in the table (tabfunc1) (returns the packaged type) :');)
Open rc to select table column_value (tabfunc1);
loop
extract the rc in v;
When the output rc % notfound;
dbms_output.put_line (' > ' | to_char (v));
end loop;
close the rc;
end;
/
declare
RC sys_refcursor;
number of v;
Start
dbms_output.put_line (' in anonymous block2 - open rc to select in the table (tabfunc2) (returns the type of schema) :');)
Open rc to select table column_value (tabfunc2);
loop
extract the rc in v;
When the output rc % notfound;
dbms_output.put_line (' > ' | to_char (v));
end loop;
close the rc;
end;
/
Scott@ORCL > @C:\Users\J\Documents\SQL\test29.sql
Package created.
No errors.
Type of creation.
No errors.
The function is created.
No errors.
The function is created.
No errors.
the call of tabfunc1 (returns the packaged type):
PL/SQL procedure successfully completed.
Select * from table (tabfunc1)
*
ERROR on line 1:
ORA-00902: invalid data type
the call of tabfunc2 (returns the type of schema):
PL/SQL procedure successfully completed.
COLUMN_VALUE
------------
1
4
1
1
3
In anonymous block1 - open rc to select in the table (tabfunc1) (returns the packaged type):
declare
*
ERROR on line 1:
ORA-00902: invalid data type
ORA-06512: at line 6
In anonymous block2 - open rc to select in the table (tabfunc2) (returns the type of schema):
> 1
> 2
> 4
> 2
> 3
PL/SQL procedure successfully completed.
Post edited by: Jason_942375
But the compilation of the PIPELINED WILL CREATE the schematic function types automatically. And the TABLE function, applied to the PIPELINED function, use these types of hidden patterns.
-
Return type of dataframe string identifier
Hello
If I have to return a dataframe of rqScript which contains the string, how am I suppose to mention it in the return type of rqTableEval.
For example, if the return value of rqScript isdata.frame (c (1), c("Name"))
, which is a number and the other string
Then in the rqTableEval, identify the return values
'select ID, 1 '1' chain of double'
1 works as an identifier for the numbers but '1' doesn't work, '1' as an invalid identifier for the return string
I tried with the host of permutations "-* ','. '. "\ *", "a" etc., none seems not to work
Can I please get help on which must be specified as an identifier for the string type?
Published by: Kedar Gupte on May 21, 2013 01:52Kedar,
The string must be long enough to accommodate the output. For example, for a maximum length of 10 characters, you can do "Lucy" or cast ('a' as varchar2 (10)). You must also use single quotes instead of double quotes. In SQL double quotes are used to specify the identifiers (such as table names, column names, etc.). In your example, '1' is an unknown identifier. What you need is a string literal.
Denis
-
DatabaseProcedure with the return type preceded of the schema name
Salvation (Paco)
I have a question on the DatabaseProcedure class. We use proxy Oracle users to our database connections.
Everything is accessible via a role of database that are granted to the user. All of our database objects, tables, etc. are protected by this database role.
When I want to call a function/procedure of database, I need to add the name of the schema as a prefix to the custom database object that uses us for parameters and return types.
So far so good. I can also define a parameter prefixed by the name of schema via the DatabaseProcedure.registerArrayType...
But when I try to set a function call that uses this parameter I get an error saying "the statement is not valid.
The problem is the regular pattern of PROCEDURE_DEFINITION:
The return type cannot be prefixed by the name of schema.private static final Pattern PROCEDURE_DEFINITION = Pattern.compile("\\s* (FUNCTION|PROCEDURE) \\s+ ([\\w.$]+) \\s* (?:\\((.*?)\\))? \\s* (?:RETURN\\s+(\\w+))? \\s* ;? \\s*", CASE_INSENSITIVE | COMMENTS | DOTALL);
Any good suggestions or workarounds?
I have actually change the duration of reflection model to make it work-, but I really don't like this solution over the long term.
/ Torben
Published by: Zonic 2013-05-07 10:52Hi Torben,
I think that I have a work around for the problem which might work for you. If you look at the source of DatabaseProcedure.registerArrayType you will find that it is actually called DatabaseProcedure.registerCustomParamType.
public static void registerArrayType(String name) { registerCustomParamType(name, Types.ARRAY, Array.getORADataFactory(), name); }
A solution you can replace calls to DatabaseProcedure.registerArrayType with calls to DatabaseProcedure.registerCustomParamType as follows.
// Instead of DatabaseProcedure.registerArrayType("NAME.WITH.DOTS") call: DatabaseProcedure.registerCustomParamType("anyNameWithoutDots", Types.ARRAY, Array.getORADataFactory(), "NAME.WITH.DOTS"); // Don't forget to use uppercase here. DatabaseProcedure dp = DatabaseProcedure.define("procedure my.procedure(param1 in out anyNameWithoutDots)"); DatabaseProcedure.ParamType type = dp.getParamDef(0).getType(); System.out.println(type.getName() + " is " + type.getTypeName()); // ANYNAMEWITHOUTDOTS is NAME.WITH.DOTS
In this way, that you don't have to use the 'illegal' name in the definition of DatabaseProcedure.
Kind regards
Paco van der Linden -
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.
-
Before then, the shift functions return type?
I can not stress which is the return type of these functions? numeric value or Member?
And if they come back that a member would be this fomula be valid (I have to take the average of March and June):
avgppl = @avgrange ("HRsummary"-> "territory", @list (@currmbr ("YearTotal"), @shift (@currmbr ("YearTotal"),-3)))
Thanks in advance!Hello
All the mentioned functions (Prior, Next, and shift) returns the values and non-members.
Concerning
-SM -
In interfaces covariant return types
Hello
I tried this little to understand code snippet covariant returns but when I tried to compile I get errors saying that I need to implement interfaces. I'm in a bit of a puzzle because I think I have them implemented correctly. Can someone help me please this problem...
interface I1 {number f() ;}
interface I2 {f(Number i) ;} number
the interface I3 {int f() ;}
class C {}
public number f() {return 1 ;}}
}
class C2 implements I1, I2 {}
public Integer f() {return 1 ;}}
public Integer f (Float i) {return 1 ;}}
}
Class C3 extends C implements I2 {}
Public Float f (Integer i) {return (float) 1 ;}}
}
class C4 extends C implements I3 {}
public int f() {return 1 ;}}
}
Any help is greatly appreciated.Here are the error messages:
The problem here is that you do more to vary the return types. You are also vary the types of parameters . You can't do during the substitution.
-
Why host interface create() method return type is only return RMI types?
Why host interface create() method return type is only return RMI types? Why not other primitive data types?Because the bean home interface an EJB specifies methods that allow the client to create, delete, and find items of the same type as self. The EJB itself must be an RMI type, and it could certainly not be a primitive type.
-
Updating of the Data Services loses configured enter/return types
v 4.0.1
I have several configured data services (all PHP services). I have about 20-25 functions defined in all 6 services, but 4 functions will surely lose the enter/return types configured each time a manual refresh or auto data occurs. For example, I have a function:
saveOrder(OrderHeader:Object,_LineItems:Object):Object
When I right click and 'configure the Types of entry... '. ", and then"configure return Type... ". "I can set the appropriate without any error types. I get so I expect the function definition:
saveOrder(OrderHeader:OrderHeaderFlex,_LineItems:LineItemFlex[]):Boolean
My ACE and PHP code seem to have errors, I've tested successfully this function repeatedly. However, if I right-click and choose "Refresh" on my name of service or the service itself, the function returns the definition of the unknown. He will go even after the automatic update, which produces from time to time. I can configure the types of data and then immediately, click Refresh and this function will return to the unknown, even if there has been absolutely no code changes. I have other services and functions in the same project (some that use the same types of data involved above) who do not have this behavior.
Even when these functions "lose" data type configuration, my project will still compile and affected functions will work as expected.
This occurs because of a bug in Zend. See the bug related to FB and the bug of zend.
-blandine
-
Doubt about the return type of function
Hello
Can a function returns a Boolean value in a select query.
Suppose m creating a function... so can we have a return type of Boolean as...?
If so... THN please give an exampleCan a function returns a Boolean value in a select query
The answer is no. a Boolean is not a SQL data type and may not be used in the SELECT query.
For the user-defined function to be called in a SQL statement, see http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10471/adfns_packages.htm#ADFNS00908
Note especially these lines"Its formal parameters and its return value (if any) must have built-in data types (for example, CHAR, DATE or NUMBER) Oracle, not types (such as BOOLEAN, RECORD or TABLE) PL/SQL data.
"There is an exception to this rule: a formal parameter can have a PL/SQL data type, if the corresponding actual parameter is implicitly converted to the data type of the formal parameter" >
Published by: Johan August 3, 2010 03:48
-
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?
It's about Oracle 10 g r2PLS-00630: pipelined functions must have a supported collection return type
and here are the APICREATE 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's tradtional types of tables that are used in the code above.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;
Thank you for your time in reading this postTYPE 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;
RJohan 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) :-)
-
Binding type variable of function return type?
Hi, is it possible to bind a type variable to a function return type, so that changes in type of variable according to the function return type definition?
Something like what is happening with TYPE and % ROWTYPE.
Thank youVeverke wrote:
Hi, is it possible to bind a type variable to a function return type, so that changes in type of variable according to the function return type definition?Well, not directly. However, if the function returns SQL declared of type you could:
1. create a dummy cursor that selects the function of double
2. create a dummy record variable dummy cursor %
3. create your variable or dummy record attribute type:SQL> desc f1 FUNCTION f1 RETURNS VARCHAR2 Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- P_NUM NUMBER IN SQL> declare 2 desired_variable f1%type; 3 begin 4 desired_variable := 1; 5 end; 6 / desired_variable f1%type; * ERROR at line 2: ORA-06550: line 2, column 22: PLS-00206: %TYPE must be applied to a variable, column, field or attribute, not to "F1" ORA-06550: line 2, column 22: PL/SQL: Item ignored ORA-06550: line 4, column 5: PLS-00320: the declaration of the type of this expression is incomplete or malformed ORA-06550: line 4, column 5: PL/SQL: Statement ignored SQL> declare 2 cursor dummy_cursor is select f1(1) f1 from dual; 3 dummy_record dummy_cursor%rowtype; 4 desired_variable dummy_record.f1%type; 5 begin 6 desired_variable := 1; 7 end; 8 / PL/SQL procedure successfully completed. SQL>
SY.
Maybe you are looking for
-
CP3505n: Old printer driver need new Mac
My old iMac crashed and I am having to start over with a new onw now running El Capitan. I need the driver for my printer CP3505. I can find the link to download an upgrade of the driver, but my problem is that the original driver is no longer on my
-
my microsoft Streets & Trips is been installed sucessuful but is not open
Is not open my strrets & cards 2008 no mistakes don't just do not respond
-
Update security for Windows XP (KB24811090)
Error: high priority update. For Windows XP. Error message: update for windows XP (KB2481109) security failed? Tried to install several times. I coukd not find all the information about it or get installed it. Help
-
Hello.. When I tried to uninstall visual studio 2005 microsoft error message displayed following. Give me a solution for this.
-
Error in workflow POAPPRV after downloading wft
Hello experts,I have a requirement to change the workflow POAPPRV, started by I downloaded the workflow of the simultaneous "Definitions of Workflow Loader" program and open the wft file from the manufacturer of workflow and not changed anything and