Function-accept any datatype as an input param,return the result in cursor

I am trying to create a function which will accept any datatype as an input parameter and return the result in cursor.
Any thoughts?
I searched the web and came to know that there is a type called "ANYDATA" in Oracle 10g which will allow to accept any datatype variable.
But we are using oracle 8i.

I believe you are looking for an implementation of "generic functions" (Java) or "templates" (C++) in PL/SQL. I believe there is no such language feature.
Perhaps the best solution would be to convert the incoming data into a common type, and then call a common function from each of the overloaded functions.
realWork (int n) { [work]; return result; }
myFunction (varchar2 v) { n = to_number(v); return realWork(n); }
myFunction (char c) { n = to_number(c); return realWork(n); }
myFunction (date d) { n = to_char(to_number(d)); return realWork(n); }
etc. ?

Similar Messages

  • There si any trouble when I input Chinese to the JTextField in Applet.

    There si any trouble when I input Chinese to the JTextField in Applet.

    thanks for your help,
    my tool is form builder,
    my form version is 10.1.2.0.2
    and the field is set to CHAR ,
    when i run an easy form
    and switch the input method to chinese,
    there is no input window,the focus directly be in field, even doesn't complete input a Chinese character,
    in usually ,when switch the input to chinese,the focus will be in field when complete input a Chinese character
    i Try to do it in version is 9.0, there isn't wrong As above
    any one can tell me how to resolve it ,thanks

  • Input values in the result area

    Hi Bw gurus,
    Could you plz tell me to eliminate the Input values displayed between the Navigation block and the Result area.
    I mean if we give some input range in the variable screen the range(Input)values are displayed in the Result area.Also if we give some 1000 multiple single values in the variable selection screen after executing it displyed
    1000 input values in the result.
    I need to elimeinate this.so how can i do this.
    the requirement is very urgent.
    Regards,
    Rambo.

    Hi Rambo,
    Open query in BEx Analyzer, it'll be embedded into a workbook.
    Use Layout/Dasplay text elements icon or menu path.
    There you'll see the option to show variables. Don't use it and variable's values shouldn't show up!
    And don't use show all.
    Best regards,
    Eugene
    Message was edited by: Eugene Khusainov

  • Question about cursors in a function and how to return the results

    Hi all,
    Some tech info:
    I'm using Oracle 11G database and APEX 4.0.2.00.06
    I use three cursors in a function. My function is called in an APEX standard report, like this by example:
    SELECT fnc_exp(tab.arg1, tab,arg2) FROM table_exp tab;
    My question is: how can I return the values calculated from my function to a standard APEX report? Before, this function was used like this by Oracle Forms to fetch the cursors in the right table columns:
    open c_a;
    fetch c_a into :loc.arg1;
    close c_a;
    open c_b;
    fetch c_b into :loc.arg2, :loc.arg3, :loc.arg4, :loc.arg5;
    close c_b;
    Thanks for your advices!
    Maybe my solution is not right, if you have better ideas, please suggest :)
    PS: If you need more details, please ask which you need.

    Hi,
    I don't think you can do exactly like that in APEX.
    Go for a pipelined function if you want the value be returned from the function.

  • How to execute a function and return the result into a bind variable

    Hi,
    I am trying to calculate the sum of salaries of all persons with a particular JOB_ID using a function TOTAL_INCOME(v_job_id).
    create or replace function total_income
    +(v_job_id IN varchar2)+
    RETURN number IS
    v_total number(6);
    cursor get_sal is
    select salary from employees
    where job_id = v_job_id;
    BEGIN
    v_total := 0;
    for emp in get_sal
    loop
    v_total := v_total emp.salary;+
    end loop;
    dbms_output.put_line('Total salary of '||v_job_id||' is: '|| v_total);
    return v_total;
    END;
    Now I woud like to execute this function and assign the returned value into a bind variable test_sal
    variable test_sal number(6)
    SELECT total_income('AD_VP') into :test_sal FROM DUAL;
    dbms_output.put_line('Total Sal:'||:test_sal);
    This is returning the below errors:
    SELECT total_income('AD_VP') into :test_sal FROM DUAL
    *+
    Error at line 0
    ORA-01036: illegal variable name/number
    dbms_output.put_line('Total Sal:'||:test_sal);
    Error at line 3
    ORA-00900: invalid SQL statement
    Could someone help me what could be the problem?? Thanks for your time...

    Dear,
    If everything you will do will be done inside PL/SQL (stored procedure or stored function) then you don't have to care about bind variable.
    When using PL/SQL (static SQL) you will never encounter issues related to bind variables. PL/SQL itself takes care of your code and uses bind variables behind the scene.
    The only situation where you have to look carefully to the use of bind variables within PL/SQL is when you use Dynamic sql into stored procedures or functions.
    So, see in the light of the above comment, if you have to care about returning your function into a bind variable?
    Best regards
    Mohamed Houri

  • Is there any way to set input levels on the built in iPad mic?

    I have several recording apps the the level is too hot.  I have looked in the system settings and there is nothing there that I could see.  On my Mac I can adust imput levles from the audio part of System Preferences.  Is there anything like that on the iPad?

    No, but there's and App for That.  Try Garage Bank for iPad in the App Store.

  • Function that return the results of a select

    Hi,
    I would like to create a function on the famous HR oracle Departments table to select * from it. I don't know how to do it.
    Does anybody can help me?.
    Thank you

    Oracle stored functions cannot directly return result sets but can return REF CURSOR. Please read [Optimize Result Set Retrieval Using ODP.NET and Ref Cursors |http://www.oracle.com/technology/pub/articles/mastering_dotnet_oracle/williams_refcursors.html] which gives full examples in PL/SQL for server side and in VB. Net for client side.

  • How to input data from labview to executable application and export the results back to labview

    I have a simple function written in m file under Matlab enviornment,
    function [c]=myadd2(a,b)
    c=a+b;
    I built it into a executable file (.exe), then I want to call it in labview and get the results.
    I followed this tutorial and some other information on line:
    http://digital.ni.com/public.nsf/allkb/5CF9526FF069EA8E862564C400579DBA
    But I didn't see any telling me how to get the Labview array data input to the EXE file and return the results data back to another indicator in labview.
    Any one have some idea?
    I appreciate the help very much.
    Arnold

    You probably need to include some command line arguments on your executable that would be the name of a file to get the data from. You could also include a command line argument telling that exe where to store the results.
    I am not familiar with Matllab to give you advice on how specifically to do that with your exe though.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • FDF Returns the entire form not just user input

    Using the properties dialog box on a submit button I set my form actions to return 'FDF Include' which according to the help menu will only return the results of the user input and not the entire filled out form. I only want user input because I plan to embed each results file in a website.Unless I am misunderstanding what should happen, it is not working. It is returning the entire form.  I would appreciate any help or tips anyone has to offer. If I'm doing it wrong and there is another way, please let me know. I just want to see the answers in the form fields, not the entire form.  Thanks!
    http://help.adobe.com/en_US/acrobat/X/pro/using/WSBB6EF75F-BC3D-4094-B787-FB76DAE1EBDC.w.h tml

    Thanks so much for your assistance. I made a form, and then set the distrubuted settings to email me the form when submitted. I posted it to our intranet and then tested it. The form I posted is the 'distributed' form that Acrobat made from my original form. I posted it on a public site so you can have a look. Here is a link.  This should allow you to download it instantly. If not, remove everything from the question mark to the end and then paste that link into a browser. I checked and double checked everything, but maybe I am missing something.
    https://sites.google.com/site/ccpsgadgets/xml-documents/pbl%20form_distributed.pdf?attredi rects=0&d=1

  • How to dispatch the result from test cases to the function that loads

    Hi ,
         I am currently working on writing a test case and i ant to execute the test case and the result of the test cases needs to be returned to function that loads the swf file using loader.
    Below is the structure
    1) Project A
             Has a action script file that has a loader which inturn loads the swf file.
    public function testRunner():void {
                loader = new Loader();
                loaderDispatcher = loader.contentLoaderInfo;         
                sharedEvents = loaderDispatcher.sharedEvents;
                parentURL = loaderDispatcher.loaderURL;
                parentDomain = URLUtil.getServerNameWithPort(parentURL);
                parentScheme = URLUtil.getProtocol(parentURL);
                load("http://localhost:8000/abc.swf");
        var callback:Function = addAsync(onMessage, 30000, {}, handleTimeout);
        sharedEvents.addEventListener("message", callback);
        /*Listener added to receive message event*/
        sharedEvents.addEventListener(MessageEvent.MESSAGE, onMessageEvent);
            private function load(location:String):void {
                // create SWF loader
                loaderDispatcher.addEventListener(Event.OPEN, onOpenEvent);
                loaderDispatcher.addEventListener(Event.INIT, onINIT);
                loaderDispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, onStatus);
                loaderDispatcher.addEventListener(Event.COMPLETE, onComplete);
                loaderDispatcher.addEventListener(IOErrorEvent.IO_ERROR, onError);
                loaderDispatcher.addEventListener(Event.UNLOAD, onUnload);
                loaderDispatcher.addEventListener(Event.CLOSE, onClose);
                var request:URLRequest = new URLRequest(location);
        //request.idleTimeout = 8000;
        try{
    loader.load(request);
    _subMovie.addChild(loader);
           catch (error:Error)
                     trace("Unable to load URL: " + error);
                // listen for DISPATCH events
                sharedEvents = loader.contentLoaderInfo.sharedEvents;
        sharedEvents.addEventListener(DISPATCH_EVENT_TYPE, handleDispatch);
    2) Project B
          Project B has the test cases written and teh swf file for this project is abc.swf.
    test.mxml
    public function go():void {
    var core:FlexUnitCore = new FlexUnitCore();
    core.addListener(new TestCaseListener());
    core.run(ABCTest);
    var messageEvent:MessageEvent = new MessageEvent("message","action test","action testing");
    //loaderInfo.sharedEvents.dispatchEvent(messageEvent);
    When I load abc.swf file this inturn call the mxml file which runs the testcases by using the FlexUnitCore .
    What I am looking for is dispatching the result that is available in TestcaseListener to the call of loader ie; in Project A
    public class TestCaseListener extends RunListener  {
    public override function testRunFinished(result:Result):void {
    trace("testRunFinished invoked 1 ::");
    trace("failureCount::"+result.failureCount);
    trace("failures::"+result.failures);
    trace("successful::"+result.successful);
    Is there any way in which i can dispatch the result from testcaselistener to the call where this swf file is loaded .

    Hello Sue,
    I just tried to export to excel with the esdev extension and got java.lang.NumberFormatException. I found the workaround at Re: Windows Multi-language env, - how do I set English for application lang?
    open the file sqldeveloper\jdev\bin\sqldeveloper.conf and add the following two lines:
    AddVMOption -Duser.language=en
    AddVMOption -Duser.country=USyet now my date formats in excel are 'american-style' instead of german. For example 01-DEC-01 so excel does not recognize it as date and therefore I can not simply change the format.
    When export to excel will be native to 1.1 perhaps someone can have a look at this 'feature'
    Regards
    Marcus

  • I want to put a number in a cell and tell it to times by 2 and get the result as a total further along. Sorry couldn't find the answer in any tutorial.

    I want to put a number in a cell and tell it to times by 2 to give the result i another cell?  Sorry couldn't find the answer in any tutorial.

    Hi Caakie,
    Sounds like tou need some basic information.
    The best advice I can give someone new to Numbers (and to spreadsheets in general) is to download and read at least the first four chapters of the Numbers '09 User Guide. You'll find a download link in the Help menu in Numbers '09.
    When you want to start using more complicated formulas, you'll also need the iWork Formulas and Functions User Guide, available from the same menu.
    Regarding your question: "Can you just give me the string for B which is just add and C which is *2."
    What is to be added in "B"? What is to be multiplied by 2 in "C"?
    =2+3 will return the result 5.
    =A+B will return the sum of the numbers in column A and column B in the same row as the cell containing the formula. If either A or B contains a non-numerical value, the formula will return an error message.
    =3*2 will return the result 6.
    =A*B will return the product of the numbers in column A and column B in the same row as the cell containing the formula. If either A or B contains a non-numerical value, the formula will return an error message.
    Regards,
    Barry

  • In iCal - I keep getting the error message " This calendar was created by Mail" and it will not accept any input; why..??

    In iCal - I keep getting the error message “ This calendar was created by Mail” and it will not accept any input; why..??

    use Disk Utility and Verify Permisions then fix and Verify Disk and fix, this should fix it.

  • Itunes will no longer accept any of my credit cards.  Says security code doesn't match with any card I use.  I have inputted new card info in the apple store area and it still says the same thing in itunes.  Customer service is no help at all.

    Itunes will no longer accept any of my credit cards.  It says vcode doesn't match when it does.  Customer service is no help.  I have re-inputted the info in the account section of the apple store and in itunes--still says vcode doesn't match.

    Itunes will no longer accept any of my credit cards.  It says vcode doesn't match when it does.  Customer service is no help.  I have re-inputted the info in the account section of the apple store and in itunes--still says vcode doesn't match.

  • Still: Login screen not accepting any input

    My login screen not accepting any input.
    It appears the screen is not the front most one.
    I have to move the main screen to see it and it
    never becomes selected to allow input.
    I trashed two plist files:
    com.apple.storeagent.plist
    com.apple.appstore.plist
    Ran the combo updater.
    The login screen still will not accept any input.
    Thanks ... Ken

    Hi Stephen et.al.
    If you have an account with Twitter, Follow, then post a tweet to @haxiesbeta (Unsanity's Twitter page) or email them at [email protected] The more user input they get about this issue, the faster we see a fix. As with others, adding FM to exclude list in Application Enhancer does not remedy the problem.
    One problem I encountered: when I attempted to disable FM via System Preferences>Application Enhancer, a prompt informed me I did not have sufficient access privileges" to enable or disable FM - same for Labels and Window Shade. Hence, I had to manually move FM to the disabled folder via the Finder, then, log-out/in to get the App Store log-in to cooperate. Anyone else encounter this problem?

  • What can I do about a 2008 iMac that does not accept any input, thus blocking entry of password at startup?

    My 2008 iMac (20 inch) often freezes. Now it will not accept any input on startup.  I type in my password, but it will not accept any characters I enter.  The blinking line just continues to blink.  It will not acknowledge my keyboard, mouse or trackpad.  I have done a forced reboot and a force reboot combined with subsequently disconnecting the power cord and then restarting.  No response from either step.  What can I do?
    Thanks.

    Glad it is working for you.
    Have a look at these two articles they may help if it occurs again.
    http://support.apple.com/kb/ht3964
    http://support.apple.com/kb/HT1379

Maybe you are looking for

  • Pages crashes on start-up every time - please help!

    About an hour ago Pages crashed (spinning beach ball) while I was working on a document. I had to force-quit. When I tried to re-open, the splash screen didn't appear and it became unresponsive. I had to force-quit again. These are the troubleshootin

  • Using multiple LISTBOX in single Policy of Microsoft Group Policy .adm file?

    OK, I am writing a .adm file and here is code for a policy within a category CATEGORY !!A_CATEGORY POLICY !!A_POLICY KEYNAME "Software\Policies\ABC\ListBoxes" PART !!PART_1_Text LISTBOX ALUEPREFIX "FirstListBox" END PART PART !!DestPort_Label LISTBOX

  • Preformance in mapping

    can you give me the order for graphical,java,abap and xslt mappings in preformance point of view?

  • Displaying Value from Business Rule in the UI

    My requirement is as follows: I profile a customer based on some business rules and the business rules asserts a business object based on the rule evaluation. I checked the output of the Business Rule and I can see that the values have been set corre

  • Trying to upgade to 10.9.2 i get the error this upgrade requires OS X 10.9

    Hi I have a 11 inch Macbook Air that we bought in 2011. It runs OS 10.7.5. I am trying to upgrade to Mavericks for which i understand 10.9.2 is the latest available version on the App store. I downloaded the .pkg however when i try to install it i ge