function with a variable number of cubic curves

Hello

I have a set of data : a set representing the independent variable and a set representing the dependent variable. I need to find the minimum number of cubic curves (find their coefficients) that reduce the average quadratic error less than a given tolerance. If the tolerance is higher than 17 particular segments, so I need to raise an error.

You have an idea what function blocks, I need to?

I could use general polynomial Fit VI with order 3 and its default method to check the residue. If the residue is greater than the given tolerance, so I could try to use two cubic curves and test them on different starting and ending points until the residue is less than the given tolerance. If tolerance is not guaranteed, I add another curve and I test again the Assembly as shown above. By iteration until the residue is less than the given tolerance, or until I would need to add 18th cubic curve.

If there was something ready, I would be grateful.

Thank you.

Fabiobonelli wrote:

Please, you can test your VI adding another point to four present?

X =-6453

Y =-266

Check the residue.

Thank you.

Did you even read my response? You have a serious air conditioning problem because the data is on a narrow Beach far from zero. By example-6500 ^ 3 is smaller that - 2E11, i.e. a value that many (many!) is orders of magnitude different from that of the constant term (1). The linear algebra problem that results is very ill, conditioned and just blindly Ford over the accelerator pedal are bad advice here.

This isn't a problem with the implementation of LabVIEW, but a fundamental vice that you encouter also (or worse) If you would do your own math. No way around it. (See also)

My recommendation is to delete the X offset and add it later again. Now things work correctly. (Note that a second order polynomial fitting still works without twist it).

Try the and see for yourself.

Tags: NI Software

Similar Questions

  • With a variable number of input ports on a Subvi

    How can I have a Subvi with a variable number of input ports that can be changed in the other VI that uses the Subvi?

    You can't actually do what you trying to do, how LabVIEW is implemented does not screw created by the user with arbitrary entries.  And to be honest, there is probably a better way to do whatever it is you want to do.

    If you really really want to do that, but... you can come kind of close.

    1. create a new VI

    2. change its connector to the one with the inputs and outputs pane more possible (terminals 8-6-6-8, 28)

    3 create controls/indicators for any desired input/output of not scaling can connect the (i.e. the error in / error, son of reference, etc.)

    4. hang them until the connector pane

    5 count how many entries are left and create a control for each entry and their son all

    6 drop your VI on the block diagram of the VI one another as a Subvi

    7. Note that when you mouseover, it looks like a Pincushion

    8. right click the VI and uncheck the "display as icon".

    9. you can now "slide down" at the bottom of the VI

    The terminals in the section "slide down" are as a package by name or node property that you can click on them to reallocate them to what it is not already selected.  The default is to make all the entries in alphabetical order, then all the outputs in alphabetical order.  If you rename the terminals that allows you to make appear in the order that you prefer is up to you.

    As all terminals, for the best that you can do to detect if they are wired is to define a default value that should never be used.  If she is floating points, you can use 'NaN' or 'Inf '.  If this is a cluster that you did, add an item more boolean which is true in the default values for this entry VI.

    Then just wire up all the identical terminals together in a table, filter the items which appear to be unwired and make all your treatment on the rest.

  • AM Customer Interface + method with a variable number of parameters

    Hello

    I use JDev11 & ADF. I have an App Module exteding, an application custom module (ApplicationModuleImpl) class. I created a few methods and expose them in the Client Interface. I read that I can only use the return types and methods of simple or serialized attributes in the Client Interface of AM. I need to create a method with the variable number and type of parameters, something like "Createwithparams", something like:
        public void Method(String[] FieldNames, Object[] FieldValues)
    Is there a way to do it?

    TKS.

    You just did it. It should work as far as I know.
    If you can not make available the method try list instead of normal array.

    Timo

  • Problems of execution of a SQL function with a variable in the WHERE clause

    Hello world!

    I have programmed a function that returns a boolean value based on the result of the SQL. It's the function:

    FUNCTION existe_secuencial (seq_name VARCHAR2) RETURN AS BOOLEAN

    cursor c2 is SELECT FROM all_sequences WHERE upper (sequence_name) = sequence_name' | seq_name | ' ;

    BEGIN

    OPEN c2;

    DBMS_OUTPUT. Put_line (nombre_seq);

    Get c2 INTO kk;

    If c2% NOTFOUND = True THEN

    RETURNS false;

    on the other

    RETURNS true;

    end if;

    END existe_secuencial;

    And I give the floor to the function of a procedure in this way:

    IF existe_secuencial ("SEQ_ARQUETA") = True THEN

    DBMS_OUTPUT. Put_line ('exists');

    ON THE OTHER

    DBMS_OUTPUT. Put_line ("' NOT exists");

    END IF;

    The probrem that this SQL is forced to return results because this sequence exists in the comic book, but is not, return me the FALSE value. What makes me mad is that if I change the second line of the function in this way:

    > > cursor c2 is SELECT FROM all_sequences WHERE upper (sequence_name) sequence_name ="SEQ_ARQUETA";

    It works find and return of sequence existing (real)

    Can someone help me please, I'm quite desperate to find what is the problem with that because I do not understand why if I built the slider with a variable returns no results so that if I do write it works...

    Thanks in advance!

    Itziar

    Frame you your variable in quotes, which makes the string literal ' |. ' seq_name | "rather than the content of the variable.

    I think that something like this would be an improvement.

    function existe_secuencial (seq_name VARCHAR2) return a Boolean value as

    number of exist_check: = 0;

    Start

    Start

    Select 1

    in exist_check

    of all_sequences

    where upper (sequence_name) = upper (seq_name);

    exception

    When no_data_found then

    null;

    end;

    return (exist_check = 1);

    end existe_secuencial;

  • Reading the file in spreadsheet with a variable number of delimiters

    Dear Forum,

    I would like to read a file in spreadsheet (text) generated by a 3rd party program. It turns out that, while the program generates columns separated by spaces, the number of spaces between the columns varies in a way that I still have to sort out. This isn't a problem if I want to

    to read in the file in excel (or equivalent) - but the functions of 'chain of worksheet to the table' LabView does not seem to be able to deal with him - if I get home 'space' as a separator it only accepts one * only * space... is possible to indicate "zero or more" spaces to this function? [I know I can do a lot of loops and read the elements of a number at a time, but it is very slow, so I'd rather avoid it]

    Thank you

    Niels

    Hello Marshall,.

    The string of worksheet to the table can actually accept an array of delimiters, so you can wire a table 1 d that contains the delimiters you want to watch for--one, two, or three spaces, etc.

    To do this, simply create an array of strings 1 d containing delimiters and son in the entry delimiter in the upper part of the primitive.  Like most primitives, function is polymorphic.

    If the program that generates this file does not limit the spaces he inserts somehow or uses spaces elsewhere in the data, you might encounter problems, but for most cases, I think that should suffice.

    Best regards

  • Function with several variables

    I tried to write a function to know the date difference.

    CREATE OR REPLACE FUNCTION DATEDIFFER
    (P_WHAT VARCHAR2,
    P_D1 DAY,
    P_D2 DAY,
    )
    RETURN AS NUMBER
    NUMBER OF I_RESULT;
    BEGIN
    SELECT (P_D2 - P_D1) *.
    DECODE
    (
    UPPER (P_WHAT),
    "SS", 24 * 60 60,
    'MI', 24 * 60.
    "HH", 24.
    NULL VALUE
    )
    IN
    I_RESULT;
    END;

    But this function fails with the compile error. Not sure if something wrong.

    >
    Don't know if something wrong
    >
    Are you serious? Why it would fail if there wasn't something wrong?

    CREATE OR REPLACE FUNCTION DATEDIFFER
    ( P_WHAT VARCHAR2,
    P_D1 DATE ,
    P_D2 DATE  -- #1 - you had a comma here after the last parameter
    )
    RETURN NUMBER AS
    I_RESULT NUMBER;
    BEGIN
    SELECT (P_D2 - P_D1) *
    DECODE
    (
    UPPER(P_WHAT), 'SS',24*60*60, 'MI',24*60, 'HH',24, NULL )
    INTO
    -- I_RESULT; -- #2 - you have to select from a table -ERROR line 19, col 9, ending_line 19, ending_col 9, Found ';', Expecting: FROM   -or-   ,   -or-   .   -or-   (   -or-   @
    I_RESULT
     FROM DUAL;
    END;
    
  • Procedure with a variable number of columns

    Hi, I have a procedure that looks like this:

    PROCEDURE PROC (p_cursor sys_refcursor OUTPUT)

    In the procedure, I build query dynamically and the number of columns varies during execution.

    In the end I do

    OPEN for REQUEST P_cursor


    Then I do call it,.

    call PROC (?)

    My question is, how could I go on the running query of this procedure, and then adding lines or by modifying the existing results, then return the changed data?

    I want to do is add a new rank based on a condition, so I still need to return any number of columns, but I need to modify the results before I return them.

    Is it possible to do? I need to do some calculations on columns (variable columns), create a new line, insert in the result set and return this new set of results.

    A sys_refcursor is ideal to return to a front end gui such as .NET or Java, which can then use this cursor to retrieve data.

    In PL/SQL, there is no point in using a sys_refcursor unless you know, at the time of the design/build the columns returned are going to be.

    If the columns resulting are dynamic, so you have no choice but to use the package DBMS_SQL, where you can analyze and run any SQL statement you like and then use the package DBMS_SQL to describe what are the columns that result and how they are. From this, you can reference the columns by position, rather than by name.

    for example

    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2) IS
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_rowcount  NUMBER := 0;
    BEGIN
      -- create a cursor
      c := DBMS_SQL.OPEN_CURSOR;
      -- parse the SQL statement into the cursor
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      -- execute the cursor
      d := DBMS_SQL.EXECUTE(c);
      --
      -- Describe the columns returned by the SQL statement
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      --
      -- Bind local return variables to the various columns based on their types
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); -- Varchar2
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);      -- Number
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);     -- Date
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);  -- Any other type return as varchar2
        END CASE;
      END LOOP;
      --
      -- Display what columns are being returned...
      DBMS_OUTPUT.PUT_LINE('-- Columns --');
      FOR j in 1..col_cnt
      LOOP
        DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' - '||case rec_tab(j).col_type when 1 then 'VARCHAR2'
                                                                                  when 2 then 'NUMBER'
                                                                                  when 12 then 'DATE'
                                                         else 'Other' end);
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('-------------');
      --
      -- This part outputs the DATA
      LOOP
        -- Fetch a row of data through the cursor
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        -- Exit when no more rows
        EXIT WHEN v_ret = 0;
        v_rowcount := v_rowcount + 1;
        DBMS_OUTPUT.PUT_LINE('Row: '||v_rowcount);
        DBMS_OUTPUT.PUT_LINE('--------------');
        -- Fetch the value of each column from the row
        FOR j in 1..col_cnt
        LOOP
          -- Fetch each column into the correct data type based on the description of the column
          CASE rec_tab(j).col_type
            WHEN 1  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
            WHEN 2  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_n_val);
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'));
          ELSE
            DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
            DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
          END CASE;
        END LOOP;
        DBMS_OUTPUT.PUT_LINE('--------------');
      END LOOP;
      --
      -- Close the cursor now we have finished with it
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    /
    
    SQL> exec run_query('select empno, ename, deptno, sal from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    DEPTNO - NUMBER
    SAL - NUMBER
    -------------
    Row: 1
    --------------
    EMPNO : 7782
    ENAME : CLARK
    DEPTNO : 10
    SAL : 2450
    --------------
    Row: 2
    --------------
    EMPNO : 7839
    ENAME : KING
    DEPTNO : 10
    SAL : 5000
    --------------
    Row: 3
    --------------
    EMPNO : 7934
    ENAME : MILLER
    DEPTNO : 10
    SAL : 1300
    --------------
    
    PL/SQL procedure successfully completed.
    
    SQL> exec run_query('select * from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    JOB - VARCHAR2
    MGR - NUMBER
    HIREDATE - DATE
    SAL - NUMBER
    COMM - NUMBER
    DEPTNO - NUMBER
    -------------
    Row: 1
    --------------
    EMPNO : 7782
    ENAME : CLARK
    JOB : MANAGER
    MGR : 7839
    HIREDATE : 09/06/1981 00:00:00
    SAL : 2450
    COMM :
    DEPTNO : 10
    --------------
    Row: 2
    --------------
    EMPNO : 7839
    ENAME : KING
    JOB : PRESIDENT
    MGR :
    HIREDATE : 17/11/1981 00:00:00
    SAL : 5000
    COMM :
    DEPTNO : 10
    --------------
    Row: 3
    --------------
    EMPNO : 7934
    ENAME : MILLER
    JOB : CLERK
    MGR : 7782
    HIREDATE : 23/01/1982 00:00:00
    SAL : 1300
    COMM :
    DEPTNO : 10
    --------------
    
    PL/SQL procedure successfully completed.
    
    SQL> exec run_query('select * from dept where deptno = 10');
    -- Columns --
    DEPTNO - NUMBER
    DNAME - VARCHAR2
    LOC - VARCHAR2
    -------------
    Row: 1
    --------------
    DEPTNO : 10
    DNAME : ACCOUNTING
    LOC : NEW YORK
    --------------
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    11 g, you can create a sys_refcursor and the DBMS_SQL package then allows you to convert this refcursor in a DBMS_SQL cursor so that you can get the description of results and do the same thing. It is not available before 11 g well.

    However_ before any of this, you should really ask yourself if there is a real need to create queries dynamically. There is rarely a need to do and if you find that it is common in your application, then it is often a sign of poor design or bad defined the needs of the business (leaving the technical side to try to be 'flexible' and hence leading to unmaintainable code etc..).

  • Is it possible to create a PDF with a variable number of lines?

    I am a very new adobe user, but before my company invests in software need to know if this is possible.  The general idea is that we need to be able to create a form in adobe/livecycle, that people who use the drive can be filled.  The problem is that whenever this form is completed, it will have a different number of lines.  Is it possible to create a form that whenever a row is filled (with a description and a price) which will be generated a new line with the same fields to serve?  Create lines on the form is not an option, because the range can be up to several hundred or beyond in some cases and it is not realistic for us to have several pages of lines to be used when the majority of the time, that only the first page will be used, then when the form is printed additional empty pages is printed.  Currently, we use an excel form to accommodate our needs with the only downfall being that all users of the form have to buy microsoft office.  Any help?

    Hello

    Yes it is possible, but you should ensure that you follow a few best practices to ensure that the form with several rows of hundred become slow or unstable.

    There are a few examples of dynamic tables here, which at least should give you an idea of what is possible. Open in Acrobat/Reader to see user experience, you can also open in the designer to see how the form is built.

    Index: http://assure.ly/lwQHm7.

    Sections and tables: http://assure.ly/fItII5.

    It's more detailed / teaching and shows how to place the form of dynamic behavior: http://assure.ly/gk8Q7a.

    Hope that helps,

    Niall

  • Megasign for the Document with a variable number of signatories

    I can't seem to find any documentation on this and would appreciate any support that the community could provide.

    Here is the example:

    I have a CSV document that contains information specific to each child enrolled in a program, including parents or guardians names and e-mail addresses.

    I would like to send a waiver for every registered child who meets the relevant information about the child (allergies, registration dates, age, etc.) - and requires that all the signatures of parents and guardians on the same document before the respective instructor opposites.

    * Waiver of the child a required 5 signatures (mother, father, mother-in-law, Nanny, brother), while another waiver of the child could require only 1 signature (parent).

    Because I have 350 of them to issue, it is possible to use Megasign to send these waivers signed by the guardians respective all at once? If so, any guidance would be greatly appreciated.

    Hello

    Please refer to the links below: -.

    Public Knowledge Base

    Public Knowledge Base

    https://Adobe.echosign.com/doc/MegaSignTutorial.PDF

    Let me know if it helps.

    Kind regards

    Mohamed

  • How to display a folder db with a variable number of attached documents

    I am building a website for a show air http://www.hollisterairshow.com and the organizer would like to put a list of things he needs for the show and have people to respond via the website. For example, it will take 20 tents, and potentially up to 20 people could answer, each offering a tent, or fewer people may each offer several tents. I would like to create a view showing the necessary point and below a line for every offer he receives. I already have a couple of tables defined, one called "needs" and the other called 'offer', the 'offers' table contains a column called 'needId' that is the index of the table needs.

    So far, I created a recordset to join the tables but each line contains the need and supply, so I see the need repeated on each line and I want only to see once. Here's the SQL code generated by DW CS4

    SELECT needs.needId, needs.title, needs. "description', needs.quantity, needs.needMet, offers.needId, offers.offerId, offers.name, offers.email, offers.phone, offers.quantity, offers"comment. "
    Needs, offers
    WHERE needs.needId = offers.needId
    ORDER BY needs.title

    I'm sure there must be a simple solution for this, but I am unable to understand. I am new to SQL and this as a volunteer for the aerospace industry.

    Thank you

    Tony

    > Is it possible to do this? I would like to

    > need a different set of records or am, I still

    > looking at a layout problem?

    You don't need a different set of records. It is only a slight modification. For each record, test if the ID has changed. If so, print the header, a line break, and then the details of the line. If this isn't the case, print only the details of the line.

  • PL/SQL-function with variable number of parameters

    Hello

    I want to write an INLIKE function that combines the functions of the po and AS operator.
    I want to call it that:

    SELECT 1 in the table where INLIKE (column, Motif1, pattern2,...) with a variable count of bosses.

    Is there a possibility the java selection button (String... stringArray) to declare or to make, I have to define a function with multiple parameters and default values?

    With greetings

    Florian

    You don't need to write a function no., you can use regular expressions REGEXP_LIKE...

    for example to find all the rows that have % ED % or % LY in them...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select 'FRED IS SCARED' as txt from dual union all
      2             select 'EDWARD IS HAPPY' from dual union all
      3             select 'BOB AND TIM ARE ASLEEP' from dual union all
      4             select 'JIM AND SALLY DO NOT CARE' from dual)
      5  --
      6  -- END OF TEST DATA
      7  --
      8  select *
      9  from t
     10* where regexp_like(txt, '(ED|LY)')
    SQL> /
    
    TXT
    -------------------------
    FRED IS SCARED
    EDWARD IS HAPPY
    JIM AND SALLY DO NOT CARE
    
  • Problems of syntax with a Variable/function/procedure

    Hello
    Some time ago I had advice how to define a simple (not stored) procedure within a PL/SQL Script, see procedure but not stored now, I tried to expand the sample by the use of some additional variables and a function instead of a procedure. The result expected from the following (pseudo) - code is very clear, but I get tons of errors due to problems of syntax. Of course I don't have need of all these variables in the example below, but it's the syntax I will need later. Maybe you can point me to an example which has a similar structure.

    DECLARE  
    
        -- Output Comment and 2*Input
        PROCEDURE OutputDouble(SingleValue IN Number, MyComment IN VARCHAR) IS
            variable MyTextResult VARCHAR(100); 
        BEGIN
            SELECT MyComment || ' ' || to_char(2 * SingleValue)) into MyTextResult from dual;
            dbms_output.put_line(MyResult);
        END;
        
        -- Return Product of Val1 and Val2
        FUNCTION MyProduct(Val1 IN NUMBER, Val2 IN NUMBER) IS
            variable MyNumResult Number := 0;
            returns Number
        BEGIN
            MyNumResult := Val1 *Val2;
            return MyNumResult;
        END;
    
       -- Definitions
       variable MyRes  Number;
       variable MyVal3 Number := 3;
       variable MyTxt3 VARCHAR(30) := 'Text mit 3';
     
    BEGIN
        
        -- Main process block
        OutputDouble(MyVal3, MyTxt3);
        MyRes = MyProduct(MyVal3, 5);
        dbms_output.put_line('Produkt: ' || to_char(MyRes)); 
        
    END;
    /
    Published by: netaktiv on 21.02.2012 13:24

    Published by: netaktiv on 21.02.2012 13:25

    (1) If you declare procedures in an anonymous PL/SQL block (which itself is not a particularly good way to organize the code), the procedure for declarations must come after all the variables are declared.
    (2) you do not use the keyword VARIABLE when you declare variables in PL/SQL
    (3) you have a fence extra paren in the SELECT statement in the OutputDouble that needs to be removed
    (4) the appeal dbms_output.put_line in OutputDouble should, without doubt, refer to the variable local MyTextResult, not same that does not exist.
    (5) the RETURN clause in the declaration of a function must be unique and must come before the IS
    (6) add a little more indented is useful for the following code.

    Put it all together, something like this works

    SQL> ed
    Wrote file afiedt.buf
    
      1  DECLARE
      2     -- Definitions
      3     MyRes  Number;
      4     MyVal3 Number := 3;
      5     MyTxt3 VARCHAR(30) := 'Text mit 3';
      6      -- Output Comment and 2*Input
      7      PROCEDURE OutputDouble(SingleValue IN Number, MyComment IN VARCHAR)
      8      IS
      9          MyTextResult VARCHAR(100);
     10      BEGIN
     11          SELECT MyComment || ' ' || to_char(2 * SingleValue)
     12            into MyTextResult
     13            from dual;
     14          dbms_output.put_line(MyTextResult);
     15      END;
     16      -- Return Product of Val1 and Val2
     17      FUNCTION MyProduct(Val1 IN NUMBER, Val2 IN NUMBER)
     18          return Number
     19      IS
     20          MyNumResult Number := 0;
     21      BEGIN
     22          MyNumResult := Val1 *Val2;
     23          return MyNumResult;
     24      END;
     25  BEGIN
     26      -- Main process block
     27      OutputDouble(MyVal3, MyTxt3);
     28      MyRes := MyProduct(MyVal3, 5);
     29      dbms_output.put_line('Produkt: ' || to_char(MyRes));
     30* END;
    SQL> /
    Text mit 3 6
    Produkt: 15
    

    As I said above, however, this isn't a particularly good way to code generation. You are much better (a lot!) create a procedure as OutputDouble first just debugging that, then create a function like MyProduct, debugging that and then just try to put it all together. Creating a single block that declares its own procedures and functions only makes it harder to debug and harder to generate the code of the work by the Assembly and testing of small building blocks.

    Justin

  • perform an immediate function with parameter out

    How to perform a function with parameter in the statement immediately execute?
    declare
       vRunFunctie   varchar2(100) := 'startfunction';
       vParmIn1      varchar2(100) := 'AAA';
       vParmIn2      varchar2(100) := 'HHH';
       vParmOut1     number;
       vParmOut2     varchar2(100);
    begin
       --
       execute immediate 'select '||vRunFunctie||'('''||vParmIn1||''','''||vParmIn2||''',:vParmOut2) from dual' into vParmOut1 using vParmOut2;
       --
       dbms_output.put_line('vParmOut1['||vParmOut1||']');
       dbms_output.put_line('vParmOut2['||vParmOut2||']');
    end;
    /
    error: ORA-06572 startfunction function has arguments

    the statement looks like this in pl/sql:
    vParmOut1 := startfunction(vParmIn1, vParmIn2, vParmOut2);
    --vParmOut1 := startfunction('AAA', 'HHH', vParmOut2);
    Thank you.
    L.

    Update:
    You are not using bind variables with your dynamic code. That is a major mistake and the #1 reason for poor database performance.
    It is a fundamental flaw in programming to design a function that includes output parameters. This is simply and plainly wrong.
    Output parameters are also not supported by the SQL language - it does not support "procedure" like code units and call methods. 
    I know that the function should not have out parameters. But its programmed that way already...

    You try something like

    declare
       vRunFunctie   varchar2(100) := 'startfunction';
       vParmIn1      varchar2(100) := 'AAA';
       vParmIn2      varchar2(100) := 'HHH';
       vParmOut1     number;
       vParmOut2     varchar2(100);
    begin
       --
       execute immediate 'begin :x := ' || vRunFunctie || '( :p1,  :p2, :vParmOut2 ); end;' using out vParmOut1, vParmIn1, vParmIn2, out vParmOut2;
       --
       dbms_output.put_line('vParmOut1['||vParmOut1||']');
       dbms_output.put_line('vParmOut2['||vParmOut2||']');
    end;
    / 
    
  • No function with name 'L_FLEX_VALUE_TAB' does exist in this scope

    Hi, need someone to advise,
    when I am compiling this package and I am facing this error message 'No function with name 'L_FLEX_VALUE_TAB' exists in this scope'.
    As I need this l_flex_value_list variable to pass as an out parameter for the procedure.
    
    
    'CREATE OR REPLACE PACKAGE TEST_ITEM_MODEL_INFO_PKG
    AS
    
    TYPE l_flex_value_rec IS RECORD
     ( value_set_name   fnd_flex_value_sets.flex_value_set_name%type,
       internal_name    fnd_flex_values.flex_value%type,
       display_name     fnd_flex_values_tl.description%type);
    TYPE l_flex_value_tab IS TABLE OF l_flex_value_rec INDEX BY BINARY_INTEGER;
    l_flex_value_list l_flex_value_tab;
    
    PROCEDURE get_flexvalue_list_proc
      (
        p_stmodel     IN VARCHAR2 DEFAULT NULL,
        p_item_number IN VARCHAR2 DEFAULT NULL,
        p_item_id     IN NUMBER   DEFAULT NULL,
        l_flex_value_list OUT l_flex_value_tab);
        
    END TEST_ITEM_MODEL_INFO_PKG;
    /
    
    CREATE OR REPLACE PACKAGE BODY TEST_ITEM_MODEL_INFO_PKG
    AS
    
     PROCEDURE get_flexvalue_list_proc
      (
        p_stmodel     IN VARCHAR2 DEFAULT NULL,
        p_item_number IN VARCHAR2 DEFAULT NULL,
        p_item_id     IN NUMBER   DEFAULT NULL,
        l_flex_value_list OUT l_flex_value_tab)
     IS
     l_column_name    VARCHAR2(100);
     l_column_value   VARCHAR2(200);
    
    
    BEGIN
      l_column_name  :=NULL;
      l_column_value :=NULL;
      l_flex_value_list :=l_flex_value_tab();
       ....
       ....
       ....
       FOR i in 1..l_flex_column_list.count LOOP
              FOR l_flex_rec in (SELECT evsvv.value_set_name, evsvv.internal_name, evsvv.display_name
                              FROM ego_value_set_values_v evsvv
                              WHERE evsvv.value_set_name='SEAEGO_CC_FAMILYMODEL_INFO_'||l_flex_column_list(i).column_name
                              AND evsvv.internal_name=l_flex_column_list(i).column_value)
              LOOP
                 l_count:= l_count+1;
                 l_flex_value_list(l_count).value_set_name:=substr(l_flex_rec.value_set_name,28);
                 l_flex_value_list(l_count).internal_name:=l_flex_rec.internal_name;
                 l_flex_value_list(l_count).display_name:=l_flex_rec.display_name;   
              END LOOP;
          END LOOP;
    
     end get_flexvalue_list_proc;
    END TEST_ITEM_MODEL_INFO_PKG;
    /
    show errors

    It is, you cannot initialize an associative array with a constructor. If you convert your array type such as pl/sql (without index) table in package specifications and run your package body, it will run successfully.

    And also I found, that you have declared a variable of type table, which is not necessary. You can have parameter in your procedure of type table, so it was a declaration of useless, I commented.

    Check the code below.

     CREATE OR REPLACE PACKAGE TEST_ITEM_MODEL_INFO_PKG
     AS
     TYPE l_flex_value_rec IS RECORD
      ( value_set_name   number,
        internal_name    number,
        display_name     number);
     TYPE l_flex_value_tab IS TABLE OF l_flex_value_rec;  --------no Index by required
     --l_flex_value_list l_flex_value_tab;
     PROCEDURE get_flexvalue_list_proc
       (
         p_stmodel     IN VARCHAR2 DEFAULT NULL,
         p_item_number IN VARCHAR2 DEFAULT NULL,
         p_item_id     IN NUMBER   DEFAULT NULL,
         l_flex_value_list OUT l_flex_value_tab);
     END TEST_ITEM_MODEL_INFO_PKG;
    /
    
  • Using ChnCalculate with a variable

    The channel of LIN/LIN_Error has 3000 values inside. I want to add a correction value to each of the 3000 values inside.

    If I use a constant, it works well. For example:

    Call ChnCalculate ("Ch(""LIN/LIN_Error"") = (2 + Ch (" "LIN/LIN_Error" "" "))") adds 2 to each value.

    However if I try with a variable it does not work.

    Dim Corr

    GlobalDim "Corr".

    Corr = 2
    Call ChnCalculate ("Ch(""LIN/LIN_Error"") = (Corr + Ch (" "LIN/LIN_Error" "" "))")

    Hi Frank,.

    The problem is your first line.  By running 'Dim Corr' in the VBScript code, you force this variable name to refer to the variable in VBScript and not the variable global tiara - light color in the SCRIPT Panel does not reflect what is confusing.  If you remove the statement Dim Corr, and then the VBScript code will correctly reference the global variable.  Another way to put it is that your VBScript never affects the global variable to Corr 2.  The command correctly done ChnCalculate() refers to the global variable of Corr, but it is always set to 0.

    However, for this task, I'd recommend the ChnLinScale() function, which is simpler, will run faster, accepts regular VBScript variables and ignore so all this imbroglio.

    Dim Corr
    Corr = 20
    Call ChnLinScale ("LIN/LIN_Error", "LIN/LIN_Error", 1, Corr)

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

Maybe you are looking for

  • Disable Rich URL previews in messages

    Hello with macOS Sierra and and iOS 10, messages introduced Rich URL previews. Is it possible to disable it? Sometimes, I want to send just the text of the link, I don't want images, just the link... Any idea? Thank you

  • Firefox android opens about.config homepage. Failed to set the new homepage

    Firefox android open always new tab or browser session about: config page.I restarted browser and Tablet (Samsung Galaxy Tab 3), and this behavior has not changed.All google searches suggest that the firefox browser android home page is not editable,

  • Missing items such as buttons and images in pages

    Last week, since the update to FF28, most Web pages download with lack of buttons, associated text, logos, images etc. The reload or restart FF makes no difference. Using Win 7 Home premium. Also overlap text - the bilerplate at the bottom of the pag

  • Sync has replaced the existing bookmarks instead of "synchronization"... How can I recover lost bookmarks?

    Decided to try to use the bookmark option in sync of 4 FF. I had been using the other options of synchronization without problem. My goal was to get to my work PC bookmarks in sync with my PC at home. I turned sync bookmark on my work PC, when I Rose

  • XML file for GigE Vision camera

    Hello I'm working on a model of GigE Vision camera. It should be very simple linescan camera. I put in place the necessary set of registers GigE Vision, can communicate with the camera in MAX. The problem is that I need creata this XML file for the c