@RETURN function with variables
Hello all:
I've been doing some testing with the @ERROR function and have had no luck getting it to error out when using it within an IF statement that uses a variable (of any kind). All of the following examples validate and run, but none stop the script.
Assume VAR QUIT = 1, SubVar QUIT2 is set to 1 and there is an environment variable named QUIT3 is set to 1;
These all don't stop the script (or put the expected ERROR in the app log):
"Actual"(
IF(QUIT==1)
@RETURN("Error!), ERROR
ENDIF)
"Actual"(
IF(&QUIT2==1)
@RETURN("Error!), ERROR
ENDIF)
"Actual"(
IF($QUIT3==1)
@RETURN("Error!), ERROR
ENDIF)
It seems like IF can't evaluate a numeric value in a variable.
Your thoughts?
Use technical account (or slice ) for storing variables values.
For native using variables u need to do technical settings
1) turn off CPU Hyper Threading
2) turn calculation to serial mode
And all of this don't guarantee what calc will be correct.
p..s
("Error!), or ('Error!')
Similar Messages
-
Calc manager: @RETURN function with WARNING as message type issue
Hi Gurus,
I m working in version 11.1.2.2 in IE 9. I have created a simple calculation script as below to test the @Return essbase function.
function
FIX ( .....)
"502100"(
IF( ("YearTotal" > 50000))
@RETURN("True:test message" , WARNING);
ELSE
@RETURN("False:test message" , WARNING);
ENDIF
This script validates fine , however when executed on Save of Data Form gives a Job console error with no error code but message as below
Invalid network data. Type is matched but length is zero. An application protocol error might exist between server and client processes..
The same script executed using error message type as *"ERROR"* executes successfuly on save of data form and gives exepected custom error message.
I read a thread in forum saying the @Return function works only with ERROR as message type for vesrion 11.1.2.1
How to use Essbase @RETURN function to displayed messages in 11.1.2.1
I have tried using WARNING and INFO , both doesnt seem to work even in 11.1.2.2, Only ERROR as message type works.
Has anyone experienced the same with version 11.1.2.2 as well? Is this still a bug?
Please let me know your inputs.
Thanks
SNHi,
I am sorry for the late response!
Thank you for all your suggestions!
I had used in the followng way and it resolved my issue.
SELECT GUID_PRGEN "Primary Key as GUID in "RAW" Format
GUID_PR "Primary Key as GUID in "RAW" Format
ATTR20A "SUBSTANCE ID
ATTR05A "Materail Type
ATTR10A "Materail Group
ATTR05B "Sub-Family
FROM /SAPSLL/PRGEN
INTO TABLE T_PRGEN
WHERE ATTR20A IN S_AT20A.
IF T_PRGEN IS INITIAL.
MESSAGE : I007(ZMSSG) WITH 'Data not available for this entry'.
STOP.
ENDIF.
Regards,
Kittu -
Call a function with variable function name
Hey guys,
I have a func_table which maintains function names (each one makes reference to a dynamically generated stored function)
I need to make a procedure that calls the functions in that table one by one using its name retrieved from SELECT func_name FROM func_table;
Thanks929955 wrote:
I have a func_table which maintains function names (each one makes reference to a dynamically generated stored function)
I need to make a procedure that calls the functions in that table one by one using its name retrieved from SELECT func_name FROM func_table;Okay, first the bit where I, foaming at mouth and vigorously waving a well used lead pipe around, tell you that this is HIGHLY SUSPECT and likely a FLAWED DESIGN. That dynamic code is 99% of the time wrong. That dynamic code opens securities hole for code injection. That dynamic code often results in severe performance penalties as the coder is clueless about what the Oracle Shared Pool is about. And so on...
As for a basic procedure template to do this - assuming all functions get the same parameter as input and that all functions returns the same data type:
create or replace procedure FooBarFunctions( paramVal number ) is
.. variables and types and cursor definitions..
begin
for c in (
select function_name from my_fubar_functions order by function_order
) loop
plsqlBlock := 'begin :result := '||c.function_name||'( param => :p ); end;';
execute immediate plsqlBlock using out funcResult, in paramVal;
.. do something with funcResult ..
end loop;
.. more code..
end;
{code}
Looks not like a sensible approach though - and begs for justification as to why this approach is needed. What justification do you have? -
Extended Rebate Functionality with Variable Keys
Hello All,
I am trying to find information on extended rebate functionality in 4.7. I have looked though white pages G72, G63, and G64 but have yet to find what I am looking for.
Basically I want to be able to spread a rebate settlement (credit memos) to multiple partners in a customer hierarchy evenly based on their individual sales volume (instead of one Rebate recipient per agreement I want many based on customer hierarchy node).
I also would like to spread the settlement against multiple materials.
I have heard this is may be possible using the variable keys and structure S469 but for the life of me I cannot figure out if it is possible to do what I am asking.
I really appreciate any help that can be extended to me.
Thanks,
LanceHi Lance,
thr price-conditions ( values or rabates ) are stored in Tables like S+++ ( S469).
You want to have an access to a pricing table with other keys as you found in the standard system.
Therefor : make you own S9++.
there are the following steps:
Check, if your key is in the selected keys for pricing - if not, add it there.
The field must be in an apend of structure KOMG ( generally ) and KOMP ( for position fields ) or KOMK ( for header fields ).
Create your own S9++ -- ( in Pricing, i have about 150 own pricing tables ).
Next : go to the Customizing of the ?? German = Zugriffsfolge ?? for the condition.
Here you can add up to 99 Zugriffe to get the condition. Here you need your new S9++ and you have to connect it with the fields.
( i have had problems with the 'little' number of 99. for one Condition i need up to 160 Zugriffe - i have split it up into 2 Conditions ).
In one S9++ you can connect several fields to one Condition table.
The customer - numer and the hierarchi - number and the recipienst-number - all fields are of the sae kind.
In the Zugriffsfolgen, you can do several Zugriffe for the same Table S9++ - but in the connection of the fields, you can variate the souce fields -- first Zugriff : Customer - number / secons Zugriff : Hierarchy 1 / ....
With this method, you can also add customer fields of VBAP or VBAK into your pricing module.
I hope, youve got an idea, where t go. see also in the SAP documentation - in german, i have picked many things out of the documentation.
Hans -
Can we write function with variable number of argument
Hi
Can anybody tell that can we pass variable number of arguments to a function in oracle 10gR2.
As in function decode we can pass variable no. of arguments upto 255 arguments, similarly can we creat a function which accept any no. of variables.I'm not sure that this is what you were asking about, but depending on the logic you want to implement, you can declare the maximum possible number of parameters to your function, give them default values, and then pass to your func as many parameters as you want:
SQL> create or replace function test(p_a number:=null, p_b number:=null) return varchar2 is
2 Result varchar2(100);
3 begin
4 result:='a='||p_a||', b='||p_b;
5 return(Result);
6 end test;
7 /
Function created
SQL> select test() from dual;
TEST()
a=, b=
SQL> select test(1) from dual;
TEST(1)
a=1, b=
SQL> select test(1,2) from dual;
TEST(1,2)
a=1, b=2
SQL> drop function test;
Function dropped
SQL> -
Function with more than one return value
Hi
Please let me know how to write a function with more than one return value and in what scenario should we go for this option.
Thank youuser12540019 wrote:
Please let me know how to write a function with more than one return value and in what scenario should we go for this option.Yes. And the following is the correct approach (using OUT variables is not!) - you deal with the multiple values as a data structure. This example uses an custom (user-defined) SQL data type as the structure.
SQL> create or replace type TXYcoord is object(
2 x number,
3 y number
4 );
5 /
Type created.
SQL>
SQL>
SQL> create or replace function fooCoordinate( someParam number ) return TXYCoord is
2 begin
3 -- doing some kind of calculation using input parameters
4 -- etc..
5
6 -- returning the multiple return values as a proper data structure
7 return(
8 TXYcoord( 0, 0 )
9 );
10 end;
11 /
Function created.
SQL>
SQL> -- selecting the data structure
SQL> select
2 sysdate,
3 fooCoordinate(123) as XY
4 from dual;
SYSDATE XY(X, Y)
2010-02-01 08:49:23 TXYCOORD(0, 0)
SQL>
SQL> -- selecting the properties/fields of the data structure
SQL> select
2 sysdate,
3 treat( fooCoordinate(123) as TXYcoord).x as X,
4 treat( fooCoordinate(123) as TXYcoord).y as Y
5 from dual;
SYSDATE X Y
2010-02-01 08:49:23 0 0
SQL> -
How to create a procedure function with a return value of ref cursor?
Can anybody provide a sample about how to create a procedure function with a return value of REF CURSOR?
I heard if I can create a function to return a ref cursor, I can use VB to read its recordset.
Thanks a lot.http://osi.oracle.com/~tkyte/ResultSets/index.html
-
Function with return type boolean
I have created a function with return type boolean as:
CREATE OR REPLACE FUNCTION fn RETURN BOOLEAN
AS
exp EXCEPTION;
BEGIN
return TRUE;
EXCEPTION
when OTHERS then RAISE exp;
END;
FUNCTION fn compiledThen I was trying to call this function into dbms_output.put_line procedure, I got this error:
EXECUTE DBMS_OUTPUT.PUT_LINE(fn);
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'Can someone please help me understand, why this happened?
Is this because of boolean return type?952040 wrote:
I have created a function with return type boolean as:
Then I was trying to call this function into dbms_output.put_line procedure, I got this error:
EXECUTE DBMS_OUTPUT.PUT_LINE(fn);
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
What is the parameter signature for DBMS_OUTPUT.put_line() ?
Is is string - as detailed in Oracle® Database PL/SQL Packages and Types Reference guide.
So how can you pass a boolean data type as parameter value, when the parameter's data type is string?
PL/SQL supports implicit data conversion. So you can for example pass a number or date value to DBMS_OUTPUT.put_line() - and the PL/SQL engine automatically (and implicitly) converts that (using the TO_CHAR() functions) to a string.
However, the TO_CHAR() parameter signature supports number and date - not boolean. It cannot convert a boolean value into a string.
So passing a boolean value means the implicit conversion fails - and results in the above error.
To make it work, you need to perform an explicit conversion. As as a data type conversion function from boolean to string is not available, you need to write a user defined function. E.g.
SQL> create or replace function BoolToChar( b boolean ) return varchar2 is
2 begin
3 case
4 when b then return( 'TRUE' );
5 when not b then return( 'FALSE' );
6 else
7 return( null );
8 end case;
9 end;
10 /
Function created.
SQL>
SQL> exec DBMS_OUTPUT.put_line( 'Flag is '||BoolToChar(true) );
Flag is TRUE
PL/SQL procedure successfully completed -
Return multiple columns from an analytic function with a window
Hello,
Is it possible to obtain multiple columns from an analytic function with a window?
I have a table with 4 columns, an id, a test id, a date, and the result of a test. I'm using an analytic function to obtain, for each row, the current test value, and the maximum test value in the next 2 days like so:
select
id,
test_id,
date,
result,
MAX ( result ) over ( partition BY id, test_id order by date RANGE BETWEEN CURRENT ROW AND INTERVAL '2' DAY FOLLOWING ) AS max_result_next_two_day
from table
This is working fine, but I would like to also obtain the date when the max result occurs. I can see that this would be possible using a self join, but I'd like to know if there is a better way? I cannot use the FIRST_VALUE aggregate function and order by result, because the window function needs to be ordered by the date.
It would be a great help if you could provide any pointers/suggestions.
Thanks,
Dan
http://danieljamesscott.orgAssuming RESULT is a positive integer that has a maximum width of, say 10,
and assuming date has no time-component:
select
id
,test_id
,date
,result
,to_number(substr(max_result_with_date,1,10)) as max_result_next_two_day
,to_date(substr(max_result_with_date,11),'YYYYMMDD') as date_where_max_result_occurs
from (select
id
,test_id
,date
,result
,MAX(lpad(to_char(result),10,'0')||to_char(date,'YYYYMMDD'))
over (partition BY id, test_id
order by date
RANGE BETWEEN CURRENT ROW AND INTERVAL '2' DAY FOLLOWING )
AS max_result_with_date
from table) -
Currency Translation in Planning sequence with variable for target currency
Hello ,
i have a requirement, the cube contains multiple data in the Group Currency for multiple company codes. & I want to convert these amounts to another KF as local currency using planning sequence only (not using transformation, as the users want to do this when they require.)
For this, i defined a Aggr level , filter & Planning function with Currency translation selecting the source field as AMOUNT_GC & target field as AMOUNT_LC using the Currency Translation type ZCTGCLC.
The target currency is not know beforehand, as it depends on the company code of each records that comes in.
Hence, Currency translation type uses a Customer exit variable 'Z_R_0026' for target currency.
This is customer exit variable which searches the Master data table of the Company code & replies back with the local currency of that particular company code (derived value from the company code variable also in teh filter).
However, when i execute this planning sequence, it gives me an error saying, "no value found for variable 'Z_R_0026'
1. when edit the CMOD code, to return only say "EUR" the planning sequence runs fine.However when i use this select statement to fetch the corresponding value of the currency using the company code reference from the company code master data table, it gives the above error. it seems to be a problem with the select statement.
below is the code for that exit
when 'Z_R_0026'.
data: l_curr type /BI0/OICURRENCY.
IF i_step = 2.
LOOP AT i_t_var_range INTO loc_var_range
WHERE vnam = 'Z_S_0003'. " Company Code Single
CLEAR l_s_range.
Filling Currency Key from Company Code
select single currency
from /bi0/pcomp_code
into l_curr
where comp_code = loc_var_range-low
and objvers = 'A'.
if sy-subrc = 0.
l_s_range-low = l_curr.
else.
l_s_range-low = 'ABC'.
endif.
l_s_range-opt = 'EQ'.
l_s_range-sign = 'I'.
APPEND l_s_range TO e_t_range.
clear l_s_range.
EXIT.
ENDLOOP.
ENDIF.
2. there is a option of using infoobject for target currency in the RSCUR itself, however, when i try to input the 0COMP_CODE for finding the attribute currency from this infoobject, it doesnt accept.
has anyone tried this earlier ?
Any help/suggestions , guys, pls?
Thanks
JohnHi Praveen ,
Thanks for that.
I have a Question.
If RSCUR were to only accept a Date InfoObject , it would be placed under a differnt heading.
The Tab is "Currrency" & the sub-Tab is "Target Currency"
so i guess, it should accept other infoObjects as well.
Moreover, the help on that InfoObject buttons says
"Specification of an InfoObject (Characteristic) in which a currency
attribute is stored in InfoObject maintenance. At runtime, the
associated currency attribute is determined using the characteristic
value and this is interpreted as source or target currency."
& i have already defined 0currency as a attribute of 0comp_code. so this should work ideally.
almost similiar CMOD code i have used for other too, but i dont know why only this one is getting struck.
any help, pls.
Thanks
John
Edited by: John Lewis on Apr 17, 2009 3:24 PM
Edited by: John Lewis on Apr 17, 2009 3:25 PM -
Calling functions / setting variables in loaded SWF
You know how you can create a Movieclip object, add a
function or variable to it, then call that function or change that
variable from within the SWF that includes it? I wanna be able to
do that, only with SWFs that are loaded at run time.
My "main" SWF is simply a menu-type thing. The user clicks a
button in my MAIN.SWF, and the MAIN.SWF then loads the SWF that's
associated with that button, using the AS 3.0 prescribed
Loader()-URLRequest()-addChild() method that everyone always asks
about.
This works great. But now I've got some custom objects and
such (ie., not just strings) within my MAIN.SWF that I'd like to be
able to share with the loaded SWFs. Preferably, I'd like to use an
accessor-type function (ie.,
LoadedSWF.GiveMeTheCoolObject(MyCoolObject);), though at this point
I'm willing to hack into the object itself (ie.,
LoadedSWF.CoolObject.CoolField = MyCoolObject.CoolField;) if that's
what it takes.
I've tried just calling the functions and setting the fields,
but the AS 3.0 compiler doesn't care for that sort of nonsense on
it's generically-defined objects. Notice also that, at run time, a
call to LoadedSWF.hasOwnObject("GiveMeTheCoolObject") returns true.
So my big-brained colleagues, what's the magic?
In advance, thanks for the help!
ScottKglad,
quote:
Originally posted by:
kglad
from that error message it appears your function is expecting
a member of the MyCoolObject class, correct?
and MyCoolObject is not an instance of that class. so, you
need to fix that. ie, create a member of that class and use that
class member as the function parameter.
Heh, that's what the error message says all right. But the
object actually IS a MyCoolObject class object. I stared at this
thing for hours, and MyCoolObject IS an instance of that class. I
tried various casting combinations (including casting it to an
Object and passing that) but had no luck whatsoever.
So I googled this particular runtime error message ("Error
#1034: Type Coercion failed: cannot convert ") and found a ton of
links to other people having a similar issue. Typically, the
problem was just as you said, someone passing a button as a string,
that kinda thing. But one guy had a problem with an object he
derived from the Event class. After hours spent trying to get it to
work, he tried overriding the base class' clone() method and got it
to work:
http://www.asserttrue.com/articles/2006/10/14/custom-events-in-actionscript-3-0
As for my project, I took a long hard look at the overall
architecture of my project and decided that it was best if all the
"real work" took place in the MAIN.SWF file. This approach would
solve a couple of other problems, and it just makes sense in a
"separate the display from the data" mentality.
So (and this is the interesting part) I changed the API for
the LOADED.SWF to accept String pairs (ie.,
LoadedSWF.AddToDisplay(Name:String, Data:String) ) instead of
accepting MyCoolObj. Ran it, and Viola, now we're working without
any run time exceptions. After that glorious moment, I created a
couple of other APIs that just accepted base classes (one an int
type, the other a function type) and was happily on my way.
From this, I gather that passing non-base class (ie, derived
class) objects to loaded MovieClips via custom function APIs is...
maybe not as straightforward as we'd expect. In the grand scheme of
things though, not a big deal: As far as I'm concerned AS3 rocks.
Again Kglad, thanks for all the help: Your input on how to do
this was the big push that I needed to get over the last technical
hurdle of this project.
To those who are reading this topic for the "how do I call
functions and/or set variables in a loaded SWF?"
The short answer is to cast the loaded SWF's content object
as a MovieClip and then call the function or alter the variable:
//Load the SWF (you've seen this code a million times)
var LoadedSWFObj:Loader = new Loader();
var MyURL:URLRequest = new URLRequest("LoadThisSWF.SWF");
LoadedSWFObj.load(MyURL);
//This is within your Event.COMPLETE handler:
//Cast it as a MovieClip object and work with that.
var LoadedSWF:MovieClip = LoadedSWFObj.content as MovieClip;
// or another way to cast it is:
var LoadedSWF:MovieClip = MovieClip(LoadedSWFObj.content);
//Call yer function:
LoadedSWF.CallMe(); -
Question about function with in parameters
Hello,
I have a question about functions with in-parameters. In the HR schema, I need to get the minimum salary of the job_id that is mentioned as an in-parameter.
this is what I am thinking but I dont know if it's correct or not or what should I do next!
create or replace function get_minimum_salary (i_job_id in varchar2)
return number
as
begin
SELECT min_salary INTO min_sal
FROM jobs
where job_id = get_minimum_salary(xy);
RETURN i_job_id;
end get_minimum_salary;
thanks in advance
EDIT
Thanks for your help all.
Is it possible to add that if the i_job_id which is the in type parameter does not have a minimum salary then use the following function to register an error:
create or replace procedure insert_error (i_error_code in number,
i_error_message in varchar2)
as
begin
insert into error_table (error_user, error_date, error_code, error_message)
values (user,sysdate,i_error_code,i_error_message);
end insert_error;
This function is basically to say that an error has occured and to register that error, at the same time I need to print out the error using the dbms_out.put_line.
Any ideas of how to do that?
Thanks again
Edited by: Latvian83 on Jun 1, 2011 5:14 AMHI
I have made little bit changes in ur code. try this
create or replace function get_minimum_salary (i_job_id in varchar2)
return number
as
v_Min_sal jobs.salary%type=0;---- Variable declaration
begin
SELECT min_salary INTO v_ min_sal
FROM jobs
where job_id = i_job_id;
RETURN v_Min_sal;
end get_minimum_salary;
Regards
Srikkanth.M -
Extending a function with logic stored in a table?
Let's say I have a function with local variables and I have a select statement in it. This statement populates (using into) these variables, one of which contains a condition which has the name of some local variables in it. I would like for this to be evaluated. Is this possible?
for example, if I have variables named local_value1, local_value2 and local_condition and local_condition is loaded from a table column in which the expression is: local_value1 < local_value2
I'd then need to do a: if local_condition then blah....
I've been looking at ways to use execute immediate to do this, but it doesn't look like I can do that, as it wont do substitution of local variables, only bound variables.
I've done this with various scripting languages in the past, but I've not seen anything on the forums on how to do this with pl/sql.
Any suggestions?wether this is really meaningful or not ... here is a way:
michaels> CREATE TABLE demo_logic
( demo_logic_id NUMBER,
demo_logic_statement VARCHAR2(4000),
CONSTRAINT demo_logic_pk PRIMARY KEY (demo_logic_id) ENABLE
Table created.
michaels> -- The data:
michaels> INSERT INTO demo_logic
VALUES (1, 'local_value1 < local_value2')
1 row created.
michaels> INSERT INTO demo_logic
VALUES (2, '(local_value1 = local_value2) or (local_value1 < 7)')
1 row created.
michaels> -- Then the function:
michaels> CREATE OR REPLACE FUNCTION func_demo (condition_id IN NUMBER)
RETURN NUMBER
IS
local_value1 NUMBER := 5;
local_value2 NUMBER := 2;
local_value_to_return NUMBER := 0;
local_condition demo_logic.demo_logic_statement%TYPE;
BEGIN
SELECT demo_logic_statement
INTO local_condition
FROM demo_logic
WHERE demo_logic_id = condition_id;
--next we would evaluate 'local_condition' and if true we would then continue and do more work
--and assign something to local_value_to_return.
EXECUTE IMMEDIATE 'DECLARE
local_value1 number := :1;
local_value2 number := :2;
BEGIN
IF '
|| local_condition
|| ' THEN
:out := 1;
ELSE
:out := 0;
END IF;
END;
USING local_value1, local_value2, OUT local_value_to_return;
RETURN local_value_to_return;
END func_demo;
Function created.
michaels> SELECT func_demo ('1') res
FROM DUAL
RES
0
1 row selected.
michaels> SELECT func_demo ('2') res
FROM DUAL
RES
1 -
Pivot table with variables columns
I need a helo to pivot table with variable columns,
I have a pivot table :
SELECT a.*
FROM (SELECT codigo_aluno,nome_aluno , id_curso,dia FROM c_frequencia where dia like '201308%') PIVOT (sum(null) FOR dia IN ('20130805' ,'20130812','20130819','20130826')) a
but I need to run the select with values for dia , getting from a other table :
SELECT a.*
FROM (SELECT codigo_aluno,nome_aluno , id_curso,dia FROM c_frequencia where dia like '201308%') PIVOT (sum(null) FOR dia IN (
select dia from v_dia_mes )) a
thank youThe correct answer should be "Use the Pivoted Report Region Plugin".
But, as far as I know, nobody has created/posted that type of APEX plugin.
You may have to use a Basic Report (not an IR) so that you can use "Function returning SELECT" for your Source.
You would need two functions:
One that dynamically generates the Column Names
One that dynamically generates the SELECT statement
These should be in a PL/SQL Package so that the later can call the former to ensure that the column data matches the column names.
i.e. -- no 'SELECT *'
MK -
Bind Operator to Function with optional parameter
Hi,
as mentioned in the subject, I would like to create an operator which is bind to an function with an optional parameter:
CREATE OR REPLACE FUNCTION
TS_Base_Func(iobject IN CIBase, format IN VARCHAR2 DEFAULT NULL) RETURN VARCHAR2 IS
BEGIN
RETURN interval_object.IntervalToString(format);
END TS_Base_Func;
I can bind the operator with a VARCHAR2 as second parameter, but how can I bind an operator without the second parameter to this function?
Thanks!What about using a "wrapper" function to implement what you would like to do? Here is a small sample:
SQL> CREATE OR REPLACE FUNCTION TEST
2 (
3 A IN VARCHAR2
4 , B IN VARCHAR2 DEFAULT NULL
5 )
6 RETURN NUMBER
7 AS
8 BEGIN
9 IF A = B THEN
10 RETURN 1;
11 ELSE
12 RETURN 0;
13 END IF;
14 END;
15 /
Function created.
SQL> CREATE OR REPLACE FUNCTION TEST_WRAPPER
2 (
3 A IN VARCHAR2
4 )
5 RETURN NUMBER
6 AS
7 BEGIN
8 RETURN TEST(A);
9 END;
10 /
Function created.
SQL> CREATE OR REPLACE OPERATOR TestOperator
2 BINDING (VARCHAR2) RETURN NUMBER USING TEST_WRAPPER
3 , (VARCHAR2, VARCHAR2) RETURN NUMBER USING TEST;
Operator created.
SQL> SELECT TestOperator(1) FROM DUAL;
TESTOPERATOR(1)
0
SQL> SELECT TestOperator(1,2) FROM DUAL;
TESTOPERATOR(1,2)
0
SQL> SELECT TestOperator(1,1) FROM DUAL;
TESTOPERATOR(1,1)
1
SQL>The TEST_WRAPPER function has the signature you need for a one variable parameter. However, under the hood it calls the TEST function.
Maybe you are looking for
-
Payment history made against PO(Purchase Order)
Does anyone know of a BAPI or standard SAP FM that will provide me with a list of payments made against an Purchase Order . Deepak
-
Hi, I have a scenario where I am sending an XML file and I have to map it to standard matmas IDoc and post it to ECC. In the target IDoc structure, we have one segment E1MLGNM for warehouse number and it has one child E1MLGTM for storage type for tha
-
Hi All, I am having funny problem in sql statement. I am trying to retrieve positive numbers using sql statement. I have used ABS clause but i am getting minus numbers also as positive numbers. please help me Here is my query, SELECT a FROM b; O/P -1
-
Web Applications and MIME Types
Hi, I am using WL Server 5.1, Service Pack 4 with the Sun JDK 1.3 on RedHat Linux 6.2. I woiuld like to deploy my application as a web application. I have created the web.xml file, etc. as per teh specification, and things work as expected for the mo
-
Reload Software 552 - Can't Restore!!
Hi all, I have a 8520 and just after installing a new app its crashes with this msg : "Reload Software 552" I have been reading many articles, one of them from official site (http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalI