Function within the package error

Hi friends,

I have a package called xxhw_ams_utils with a function inside get_salary

When I tried to run this function in the package as below average way, im getting error as
ORA-00904: "XXHW_AMS_UTILS." "" GET_SALARY ": invalid identifier
select apps.xxhw_ams_utils.get_salary(1072) from dual
where there are 1072 is the assignment IM id to the objective test.

This is the actually the get_salary function located in the package xxhw_ams_utils of coding
FUNCTION get_salary
(p_asg_id IN NUMBER)
    RETURN VARCHAR2 IS
    
l_gross VARCHAR2(20);
l_basic VARCHAR2(20);

BEGIN

select eev.screen_entry_value
into l_basic
       from   pay_element_entry_values_f eev,
              per_pay_bases              ppb,
              pay_element_entries_f       pe
       where  ppb.pay_basis_id  +0 = 61
       and    pe.assignment_id     = 1072
       and    eev.input_value_id   = ppb.input_value_id
       and    eev.element_entry_id = pe.element_entry_id
       and    sysdate between
                        eev.effective_start_date and eev.effective_end_date
       and    sysdate between
                        pe.effective_start_date and pe.effective_end_date;
EXCEPTION
WHEN OTHERS THEN RAISE;
END; 
Suppose that if I performed as the way to way below, I get the correct result
select eev.screen_entry_value
--into l_basic
       from   pay_element_entry_values_f eev,
              per_pay_bases              ppb,
              pay_element_entries_f       pe
       where  ppb.pay_basis_id  +0 = 61
       and    pe.assignment_id     = 1072------------------------------------>assignment id (that im passing)
       and    eev.input_value_id   = ppb.input_value_id
       and    eev.element_entry_id = pe.element_entry_id
       and    sysdate between
                        eev.effective_start_date and eev.effective_end_date
       and    sysdate between
                        pe.effective_start_date and pe.effective_end_date;
Suppose if I run as the means below it is back as invalid character error.
select apps.xxhw_ams_utils.get_salary(1072) from dual
Why might the problem friends.

Brgds,
Mini

Your function must RETURN a VARCHAR2

Tags: Database

Similar Questions

  • Error 1 occurred Armijo rule stepsize reduction failed to reduce the value of function within the maxiters

    Hello

    I try to use the VI of unconstrained optimization to fit a measured spectrum. However, each call VI, I get the error:

    Error 1 occurred Armijo rule stepsize reduction failed to reduce the value of function within the maxiters

    Possible reasons:

    LabVIEW: An input parameter is not valid. For example if the input is a path, the path can contain a character not allowed by the operating system such as? or @.
    =========================
    NOR-488: Command requires controller GPIB be in Charge.

    Does anyone know what I'm doing wrong and how I can fix this problem?

    The VI for the stepsize Armijo rule reduction can be found here:

    \vi.lib\gmath\NumericalOptimization\qn_armijo rule stepsize reduction.vi

    In the current implementation, the spectrum is able to a rectangular spectrum. This may be the cause of the error?

    I have attached the screw that I use. They are written in LabVIEW 2010.

    Thanks Marc67 for your quick reply, but I found the error.

    It was pretty stupid, that I used a bad vector of departure for the unconstrained optimization VI, which was too low values.

  • Integrate the Table function in the package

    Hey everybody,

    I had a problem with my table function. I don't have it created in a package as a function table on the database. Now I have to integrate it in my package,

    but it does not work. What I have to put the type and Assembly in the package_spec? I always get the error: "each cursor or subprogramm in the package_spec statement must have a corresponding definition in the package body.

    But I already joined the funtion in the body. Maybe someone can help me? I would be very grateful!

    It's my spec package: (sorry, I don't know how to insert the code in this forum, maybe you can tell me)

    The search_type is declared, but so far not in the package:

    ----------------------------------------

    create or replace package test is

    TYPE search_set IS TABLE OF THE schema.search_type;

    function search (.)

    Return search_set;

    end test;

    ----------------------------------------

    create or replace package test body is

    function search (.)

    return search_set

    pipelined is

    ..

    search for late;

    ----------------------------------------

    create or repplace type search_type as object

    (..);

    ---------------------------------------

    If I lump the search_type package specifications, it will not accecpt the 'object '.

    It would be great if you can help me! I would also like to update my post I have someone tell me how to integrate the code correctly in this post.

    Many thanks!

    In your message the definition of function in the SPECIFICATION does not PIPELINED keyword, but your BODY plan has it.

  • run the package error

    Hi when I try the following in a process before header
    Start
    liste_pkg_lista.liste_lista_func(:P2_X);
    end;
    I get:

    1 error has occurred

    * ORA-06550: line 3, column 1: PLS-00221: 'LISTE_LISTA_FUNC' is not a procedure or is undefined ORA-06550: line 3, column 1: PL/SQL: statement ignored

    Can you help me with this?

    Coco wrote:

    Start
    liste_pkg_lista.liste_lista_func(:P2_X);
    end;

    Post all the code wrapped in ------...------wrapped in \

    ...\
    

    Tags to preserve formatting and stop interpreting HTML/CSS/JavaScript forum software.

    According to the specification of the package so that we can see the declaration of liste_pkg_lista.liste_lista_func.

    I get:

    1 error has occurred

    * ORA-06550: line 3, column 1: PLS-00221: 'LISTE_LISTA_FUNC' is not a procedure or is undefined ORA-06550: line 3, column 1: PL/SQL: statement ignored

    If liste_pkg_lista.liste_lista_func is actually - as the name suggests, a +function+ then it should be used in the right-hand side of an assignment, or as an expression, not compellingly as above.

    declare
      v varchar2(4000);
    begin
      v := liste_pkg_lista.liste_lista_func(:P2_X);
    end;
    

    or

    begin
      htp.p(liste_pkg_lista.liste_lista_func(:P2_X));
    end;
    

    It also seems that you need to rethink your naming scheme: liste_pkg_lista.liste_lista_func is heavy on the s and s list lists, which looks like a little redundant.

  • Debug/run procedures within the package

    Debugging with SQL Developer was generally very nice and I have come to rely on these tools. Today, I've written a procedure in a package and I want to debug this process, but I don't see it in the list of targets. It seems that I see only functions in the target list. I understand that the procedures need not have the same kind of output in function, but sometimes I like to create procedures that have multiple SETTINGS, especially when it comes to an exit very closely related.

    The interesting thing is that I can create this same procedure as a stand-alone procedure and the run/debug works great. Apparently I'm missing something obvious in SQL Developer somewhere I thought it was there all the time (I guess for a while since I've written a procedure with OUT parameters) but maybe I'm wrong. Any ideas or help someone?

    Earl

    It should work.

    Is that you can create a package of simple heel with just a function procedure that is a NULL; and use it as a test?

    If this does not work there either, please send a screenshot so we can see what you see in the debugging with the missing procedure dialog box.

  • Cannot function ship the following error of expression

    While creating analysis off essbase cube, I get the below error:

    "Function cannot ship the following expression.

    I am referring (defined intersections inside to retrieve data) to an existing report, created in hyperion planning, in the essbase cube.

    I have converted the measures dimension to flat measures in RPD online - > physical layer. Thus, all measures entered into "Plan 1 #1".
    The same steps I followed previously, while generating reports from a differnet essbase cube, but I did not deal with this problem.

    Please let me know if I'm missing something in this process.

    OBIEE version: 11.1.1.5.0
    Essbase version: 11.1.2

    FYI: I'm dragging a measure column and 13 dimension columns. In my previous mission had 10 dimensions.

    OK... can you increase the setting of 'MAX_COLUMNS_IN_GROUP_BY' and check with > 10 dims?

    RPD open-> Dpube click physical Essbase of database-> DBFeatures-> Set the "MAX_COLUMNS_IN_GROUP_BY" setting to 256.

    Save the changes to the repository and restart.

    Kind regards
    DpKa

  • AAMEE 3.0 and install the Package error

    Hello.

    I hopoing can someone help me with a problem I have with JOHN 3.0 and try to install packages for CS6 for Windows.

    I use Illustrator as the package of initial test but when tyring to run the .msi (on a 32-bit Windows 7 system) file, I get an error that says...  This Setup program cannot be run directly in UI mode.  Please, deploy the MSI in silent mode.

    I'm sure I followed the instructions correctly but do not understand why I see this message.  I read on a lot of people having problems with JOHN, but I don't have to do anything fancy with the package.  Just a straight line basically install Illustrator in this case.  I finally need so that packages for several products, but this is my first shot at this.

    Any help on why I see this message would be greatly appreciated.

    Thank you!

    Mark,

    Sorry, you feel like being to avoid the question, this isn't the case and Liba answered the question earlier in his answer. JOHN is a tool Enterprise Volume designed to facilitate the deployment of CS through hundreds or thousands of machines and for that reason the tool was designed to présérialiser, give some advanced configuration options and create a package optimized for silent deployment slots client without user intervention. The standard installation program continues to provide a bar of GUI and progress for users.

    JOHN is also designed to be used with a 3rd party deployment tool, and we have seen in the past, individuals use so that a notification of progress or installation is displayed to the user if you wish them.

    We will take your comments on board and look to see if a progress bar is something that we can achieve in the future for windows, as it is present on Mac.

    See you soon

    Karl

    CS Enterprise Systems Engineer

  • Suggestion: functions to the package level assert at least grabbing FlexUnit 4

    AS3 is not as nice as Java 5 imports static method, but we can do the same thing with functions at the level of the package. We could use these to reduce the amount of typing required FlexUnit 4.

    I added this to my fork of AsUnit:

    http://github.com/robertpenner/AsUnit/commit/bdb293436491792625ddc1f637c81c723986b87d

    Example:

    package AsUnit . says {
    Import AsUnit . framework . Assert ;
    public const assertEquals : function = Assert . assertEquals ;
    }

    In the test case, this would be used as follows:

    Asunit.asserts import. *;
    ...
    in the test method
    assertEquals (...

    I totally agree with you. I wish we had static imports as well.

    We will talk more about your suggestion, I am certainly open to it.

  • Call a function within the same CFC component

    Hello
    / * Niewbie Question * /.
    I have a strange problem. When I try to call one function on the other in the same CFC component, I get an error named: "Entity has incorrect type to be called as a function."
    I looked on many forums and searched in Google groups. I have yet found a work around for this problem.
    I thought I did caution o not use twice the same name...
    Can someone tell me what I did wrong?

    My sample code to reproduce this error is included

    The full error message is:
    Entity is of the wrong type to be called as a function.
    The symbol you provided superfunction is not the name of a function.

    The error occurred in C:\ColdFusion8\wwwroot\admin\_components\test.cfc: line 6

    4: < cfinvoke
    5: method = "superfunction".
    6: returnVariable = "myReturn" >
    7: < / cfinvoke >
    8: < cfset some_text = myReturn >

    OK, solved with all your advice!

    A big thank you to everyone

    Here is the final code for others...

  • How to use a function inside the package?

    Hello

    You will need to convert weight unit of kilogram kips when filling out the weight values into a temporary table. In our database, schema there is a function called convert_units is available.
    How could I use this feature in my package? My package is also resides in the same database schema.

    Here, I pasted the function.
         convert_units
       (
         in_base_unit_id       NUMBER,
         in_conversion_unit_id NUMBER,
         in_value              NUMBER
       ) RETURN NUMBER AS
    CURSOR unit_cur IS
      SELECT *
      FROM units_conversion
      WHERE base_unit_id = in_base_unit_id
        AND conversion_unit_id = in_conversion_unit_id;
    unit_rec unit_cur%ROWTYPE;
    BEGIN
      OPEN unit_cur;
      FETCH unit_cur INTO unit_rec;
      IF unit_cur%NOTFOUND THEN
        unit_rec := NULL;
      END IF;
      CLOSE unit_cur;
      RETURN (in_value+unit_rec.pre_adjust_add)*(unit_rec.rate);
    END convert_units;

    Hello

    It seems that the first two arguments of this function are ID in the units_conversion table. If you know this id = 1234 means kilograms, 9876 means kips, then you can do things like:

    wt_kips := convert_units (1234, 9876, wt_kilograms);
    

    or

    INSERT INTO tmp_table ( ..., weight_val,                               ...)
           VALUES           ( ..., convert_units (1234, 9876, wt_kilograms), ...);
    

    I can't just look at the code which could be any valid ID. I'm not even sure of the order of the arguments. I hope you have instructions on how to use the function.

    If the function is in a package named pk_xyz (a different package to the one in which you call it), add the name of the package, like this

    wt_kips := pk_xyz.convert_units (1234, 9876, wt_kilograms);
    
  • Custom function giving the compile error

    Hi all

    I created a custom function to get the current timestamp. The following java code:

    package com.oracle.determinations.examples;

    import com.oracle.determinations.engine.CustomFunction;

    import com.oracle.determinations.engine.EntityInstance;

    Import Java.util;

    java.text import. *;

    SerializableAttribute public class extends CustomFunction {CurrentTimeStamp

    public Object evaluate (EntityInstance entityInstance, Object [] items) {}

    Date dNow = new Date ();

    SimpleDateFormat ft =

    new SimpleDateFormat ("YYYY/MM/DD HH: mm:");

    / * System.out.println (ft.format (dNow)); * /

    Return ft.format (dNow);

    }

    }

    My Extension.xml is as below:

    <? XML version = "1.0" encoding = "utf-8"? >

    < extension >

    < functions >

    < name of the function = back "CurrentTimeStamp" type = "text" >

    < name arg = "input name" type = "text" / >

    < Manager platform = 'java' class="com.oracle.determinations.examples.CurrentTimeStamp"/ >

    < / feature >

    < / functions >

    < / extension >

    The extension.xml is placed under the following path:

    Development/Extension/CurrentTimeStamp/extension.xml

    The JAR file is located under the following path:

    Development/Extension/CurrentTimeStamp/lib/CurrentTimeStamp.jar (the jar file includes the com.oracle.determination.example folder structure)

    When I am using CurrentTimeStamp() in the basis of rules, is throw say compilation error:

    "Error after the CurrentTimeStamp text (' fount text: ' ')'. Expected variable value or constant OPA - E00111

    Can you please help me where I am doing wrong and therefore not identify the function?

    Thank you

    KK

    Version of the class 51 is Java 7, this suggests that you have compiled your classes in the Java JDK 7, but try to load them into an earlier version of Java (I guess Java 6 since this is the first version of Java that runs under Apache Tomcat 7).

    You can specify the JDK compiler to create classes that target Java 6, which should then work - see "javac - Java programming language compiler.

  • Error on the packaging: error 103: application.qnx is an unexpected element/attribute

    Hi all

    A week ago, I sent my application the second time signed, now I do this third time because accidentally I sent the request with the word "debug" on the icon.

    I'm trying to do anything with the process of signing using the excellent How - to's here here , but unfortunately I'm stuck on the first step, when I try to package I have strange error "error 103: application.qnx is an unexpected element/attribute" on the file my - app.xml.

    What is c? What should do?

    Thank you very much

    Because you have qnx tag in the file. Remove and everything in it - this tag and content belongs to blackberry - tablet.xml. Validator of Adobe (which gives you an error) air does not recognize as a first class citizen, then put all of the additional tags in the additional xml file.

  • Function within the statement call box SQL

    I have a procedure with many cases not to validate inside statements that compare the data in a table and fill in a description of the error of the dates. (snip of the size of the code below)

    create or replace procedure "PROC_TEMP_UPDATE"
    is
    begin
    update temp_update
    set error_desc = 
        CASE
        WHEN (error_desc != 'MATCH')
            THEN 'PCFN/TCN combo not found in destination table.'
        WHEN (error_desc = 'SKIP')
            THEN NULL
        WHEN (ge_ata is null and az_ata is not null)
            THEN 'Enter GE ATA Date before entering AZ ATA Date.'
        WHEN ((ge_ata is not null and az_ata is not null) and ge_ata > az_ata)
            THEN 'GE ATA Date cannot be greater than AZ ATA Date.'
           end proc_temp_update;
    
    
    

    Instead of having to enter the bottom 2 when reporting for each date, I created these functions:
    (Function 1: check if Date1 is null and Date2 is not.)
    Function 2 these two dates are not null, check if Date1 is greater than Date2.)

    function Is_D1_NULL
                (Date1  DATE, Date2 DATE)
                return BOOLEAN is
    
          result     BOOLEAN := FALSE; 
       begin 
          if (Date1 is null and Date2 is not null) then  
             result := TRUE; 
          end if; 
          return (result); 
       end Is_D1_NULL;
    

    You cannot use Boolean in SQL queries.  You must modify your function to return something like Y/N or 1/0 and assess against that.

    That said, move the engine of SQL and PL/SQL is, relatively speaking, cheap, so I let just the comparisons as they are in instruction box instead of calling a function.

    John

  • using the date of today as default for this function in the package

    Hello all;

    Please find attached the sample data and syntax
    create table tbl_one
    (
      id varchar2(200),
      place varchar2(300),
      create_date date
    );
    
    insert into tbl_one
      (id, place, create_date)
    values
      ('D', 'MN', to_date('3/3/2011', 'MM/DD/YYYY'));
    
    
    insert into tbl_one
      (id, place, create_date)
    values
      ('X', 'DC', to_date('3/4/2011', 'MM/DD/YYYY'));
      
    
    insert into tbl_one
      (id, place, create_date)
    values
      ('A', 'NY', to_date('3/31/2011', 'MM/DD/YYYY'));
    PL/SQL Developer package
     body ----------
    
    create or replace package P_test is
     
      -- Public type declarations
    type cur is ref cursor;
    function test_fn
    (
     from_period in varchar2,
     to_period in varchar2
    ) return cur;
    
    end P_test;
    
    spec ----------------------
    
    create or replace package body P_test is
    
    function test_fn
    (
     from_period in varchar2,
     to_period in varchar2
    ) return cur as
    
    my_cur cur;
    Begin
      open my_cur for 
      
      select p.id,
             p.place 
      from tbl_one p
      where trunc(p.create_date) >= to_date(from_period, 'MM-DD-YYYY')
      and trunc(p.create_date) <= to_date(to_period, 'MM-DD-YYYY');
    return my_cur;
    end test_fn;
    
    end P_test;
    now, I'm just wondering how to make the to_period to have a default value of today's date

    user13328581 wrote:
    I've tried, but it does not work it shows unfortunately no display... the only other way I can think is to use multiple if statement to check and then make a select in... but I just feel it is a better way to do.

    Published by: user13328581 on March 31, 2011 13:09

    It does not define it.

    SQL> CREATE PROCEDURE dt_test (p_start_dt IN VARCHAR2,
      2                            p_end_dt   IN VARCHAR2 DEFAULT TO_CHAR(sysdate, 'MM-DD-YYYY')) AS
      3  BEGIN
      4     DBMS_OUTPUT.Put_Line ('Start is: '||p_start_dt);
      5     DBMS_OUTPUT.Put_Line ('End is: '||p_end_dt);
      6  END;
      7  /
    
    Procedure created.
    
    SQL> exec dt_test('01-01-2011', '02-28-2011');
    Start is: 01-01-2011
    End is: 02-28-2011
    
    PL/SQL procedure successfully completed.
    
    SQL> exec dt_test('01-01-2011');
    Start is: 01-01-2011
    End is: 03-31-2011
    

    Or are you still passing two parameters with the possibly due date null like this:

    SQL> exec dt_test('01-01-2011', null);
    Start is: 01-01-2011
    End is:
    
    PL/SQL procedure successfully completed.
    

    If you is the case then you can do something like:

    SQL> CREATE OR REPLACE PROCEDURE dt_test (p_start_dt IN VARCHAR2,
      2                                       p_end_dt   IN VARCHAR2) AS
      3  BEGIN
      4     DBMS_OUTPUT.Put_Line ('Start is: '||p_start_dt);
      5     DBMS_OUTPUT.Put_Line ('End is: '||COALESCE(p_end_dt, sysdate));
      6  END;
      7  /
    
    Procedure created.
    
    SQL> exec dt_test('01-01-2011', null)
    Start is: 01-01-2011
    End is: 31-MAR-2011
    
    PL/SQL procedure successfully completed.
    

    If your predicate would become more like:

    trunc(p.create_date) <= COALESCE(to_date(to_period, 'MM-DD-YYYY'), TRUNC(sysdate);
    

    John

  • Dynamic insertion within the procedure error


    Hi all

    I use under oracle database on HP - UX.

    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE Production 10.2.0.5.0
    AMT for HP - UX: 10.2.0.5.0 - Production Version
    NLSRTL Version 10.2.0.5.0 - Production

    I'm not able to run the procedure below and it returns the error. The insert in the procedure returns error. If I execute manually only the insert statement, it works well.
    Can someone help me with this issue?

    Procedure
    ===========
    create or replace procedure test_proc
    as
    v_sql varchar2 (2000);
    Start
    v_sql: =' insert into TABLE1 (select owner, object_type, object_name, "S", "Y" of dba_objects@LINK1 )
    where owner = "ABC" and object_type = "TABLE" less
    Select the owner, object_type, object_name, "S", "Y" from dba_objects where owner = "ABC" and object_type = "TABLE") ';

    immediately run v_sql;
    commit;
    end;
    /

    exec test_proc;

    Error:
    ===========

    ERROR on line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "SYSTEM. TEST_PROC", line 8
    ORA-06512: at line 1

    user running this procedure doesn't have permission to read data from DBA_OBJECTS. Grant select permission on that to the user running this procedure and it should work.

    Onkar

Maybe you are looking for