BIND THE VARIABLE INSIDE A LOOP

Hello
I have question about the sort of the values using Plsql... My requirement is to get values of N with the user and sorting in ascending or descending order. I tried the following query

DECLARE
Is of type TABLE numsort
NUMBER
INDEX OF DIRECTORY;
v_num numsort;
number of v_total;
number of v_no;
BEGIN
-get the number of values to sort
v_total: =: TotalNum;
dbms_output.put_line (v_total);
because me in 1.v_total
LOOP
v_no: =: none; -Read the values
v_num (i): = v_no;
dbms_output.put_line (v_num (i): 10;)
END LOOP;
END;

its code is not complete... sound to read the value in the table... Read itself does not

The problem is that the connection variable is not reset with each iteration. I am using Toad and he asked me to pass all the variable binding both... But I want to read the values in the table with each iteration. Is it possible in PLSQL... or is there another way to do this...

hope you are clear with the requirement... If any infomartion extra need please come bk...

Waiting for your replay

Thanks and greetings
Rognard

Maybe like this?

SQL> create or replace procedure test_proc (p_input varchar2, p_separator varchar2) is
  2  v_input varchar2(32767):= p_input||p_separator;
  3  begin
  4  if p_input is not null then
  5  while instr(v_input,p_separator) > 0 loop
  6      dbms_output.put_line(substr(v_input,1,instr(v_input,p_separator)-1));
  7      v_input:=substr(v_input,instr(v_input,p_separator)+1);
  8  end loop;
  9  end if;
 10  end;
 11  /

Procedure created.

SQL> exec test_proc('10, 4, 6, 3',',')
10
4
6
3

PL/SQL procedure successfully completed.

SQL> exec test_proc('',',')

PL/SQL procedure successfully completed.

SQL>

Nicolas.

Tags: Database

Similar Questions

  • Get the value of the variable inside the function from the event (EventListener)

    How to get the value of the variable inside the function from the event. Variable has been declared as a function of external events.

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, myClickReaction);
    
    function myClickReaction (e:MouseEvent):void{
    StringVar="other sample";
    }
    
    trace(StringVar); /* it gives me "sample" value and i would get "other sample" value */ 
    

    This strange because if it would be the trace of a normal function would give me good result.

    var StringVar="sample";
    
    
    function myClickReaction():void{
    StringVar="other sample";
    }
    
    myClickReaction();
    trace(StringVar); /* it gives me result as i wanted to have - "other sample" value */ 
    

    I also know method of passing of arguments depending on the event, but it doesn't for me as I would like to

    var StringVar="sample";
    
    
    
    
    myButton.addEventListener(MouseEvent.CLICK, function(e:MouseEvent){ myClickReaction(e, StringVar) },false, 0, true);
    
    function myClickReaction (e:MouseEvent, StrVar:String):void{
    
    StrVar="other sample";
    }
    
    trace(StringVar); /* it also gives me "sample" value and i would get "other sample" value */ 
    

    How to do it correctly?

    I do not know the structure of your screen lists so I can't tell you how to access the variable, but you're on the right track. If it's a parent, then you can always use the .parent property to cross to the top the list display to try to access.

    for example 1 level:

    MovieClip (this.parent). StringVar = "another sample";

    Add more properties .parent to continue to move to the top of the list.

    for example:

    MovieClip (this.parent.parent). StringVar = "another sample";

    Just like always, use traces (MovieClip (this.parent). StringVar); until you get the value that you want to know that you're accessing them correctly.

  • Bind the Variable in a dynamic query

    The procedure below uses a variable binding for the deptno and run it with a ref cursor The expected result is to display the ename from EMP for the deptno passed for the p_deptno parameter, but the procedure fails with an exception.

    CREATE OR REPLACE PROCEDURE dynamic_query(p_deptno NUMBER)
    AS
        lv_deptno number(4);
    --    l_lookup_type    VARCHAR2(30):='PBAMERICAS_CO';
        lv_query VARCHAR2(15000) :=' SELECT  ename,''Year'' from emp where deptno='|| p_deptno;
        lv_cursor  SYS_REFCURSOR;
        lv_lookup VARCHAR2(20);
        lv_emp_rec emp%rowtype;
        lv_ename VARCHAR2(10);
        lv_year   VARCHAR2(10);
    BEGIN
        dbms_output.put_line(lv_query);
        OPEN lv_cursor FOR lv_query USING p_deptno ;
        Loop
            FETCH lv_cursor INTO lv_ename,lv_year;
            dbms_output.put_line(lv_ename || ',' ||lv_year);
          EXIT WHEN lv_cursor%NOTFOUND;
         END LOOP;
        CLOSE lv_cursor;
    END dynamic_query;       
    
    
    

    
    
    SQL> exec dynamic_query(10);
    SELECT  ename,'Year' from emp where deptno=10
    BEGIN dynamic_query(10); END;
    
    
    *
    ERROR at line 1:
    ORA-01006: bind variable does not exist
    ORA-06512: at "APPS.DYNAMIC_QUERY", line 13
    ORA-06512: at line 1
    
    
    
    
    
    
    

    I can change the code slightly and change the where clause to work but wanted to know what am I did wrong which makes the procedure fails with the above code.

    CREATE OR REPLACE PROCEDURE APPS.dynamic_query(p_deptno NUMBER)
    AS
        lv_deptno number(4);
       lv_query VARCHAR2(15000) :=' SELECT  ename,''Year'' from emp ' ;
        lv_cursor  SYS_REFCURSOR;
        lv_lookup VARCHAR2(20);
        lv_emp_rec emp%rowtype;
        lv_ename VARCHAR2(10);
        lv_year   VARCHAR2(10);
    BEGIN
    
    
        IF p_deptno IS NOT NULL THEN
            lv_query := lv_query || ' Where deptno =' || TO_CHAR(p_deptno);
         END IF;
             dbms_output.put_line(lv_query);
        OPEN lv_cursor FOR lv_query  ;
        Loop
            FETCH lv_cursor INTO lv_ename,lv_year;
            dbms_output.put_line(lv_ename || ',' ||lv_year);
          EXIT WHEN lv_cursor%NOTFOUND;
         END LOOP;
        CLOSE lv_cursor;
    END dynamic_query;
    /
    
    

    PS: I use the table EMP for this example includes so not CREATE TABLE and INSERT.

    The procedure below uses a variable binding

    No, it isn't.

    You're just concatenation of the value of p_deptno in the query, such as a literal.

    It's using a variable binding:

    lv_query VARCHAR2 (15000): = ' 'year', SELECT ename from emp where deptno =: 1';

    Then, the variable may be correctly bound (by post) via the USING clause.

  • to BIND the variable SUBSTITUTION

    I have a code where I find dates START and end range for the past 3 years, the beginning Date must start on a Sunday and the end Date is at the end on Saturday using the weird system they have here:-)

    the end usable VARIABLE must be in YYYYMMDD format as number, because that's how they set up Date here... can anything about...

    So I thought to all the Dates, performing a combination of Variables of SUBSTITUTION AND LINKING, why I do like that it is because

    I received an error when I used just the variables SUBSTITUTION (maximum 240 characters used on the START DATE of the year2, in)

    switching to this, the error has disappeared), well that's what I thought he'll fix it.

    But now, when I try to use and VARIABLE in SQL, I get an error that it cannot use BIND variables, so try to pass values to a SUBSTITUTION

    afin_que this error disappears) - unless there is a better way?

    If there is a better way to stay maybe everything inside SUBSTITUTION and don't imply any LINK, maybe it would be better, if you guys know a way around the 240 character error...

    :-)

    My variables are:

    -find YEAR 1

    SET LY_END_DATE_NUM = "TO_NUMBER (TO_CHAR (NEXT_DAY ((SYSDATE-7), 'SATURDAY'), 'YYYYMMDD'));

    variable BIND_LY_END_DATE_N number;

    run: BIND_LY_END_DATE_N: = & LY_END_DATE_NUM;

    PRINT BIND_LY_END_DATE_N;

    SET LY_START_DATE = ' TO_DATE (: BIND_LY_END_DATE_N, 'yyyy-mm-dd')-363;

    SET LY_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& LY_START_DATE, 'YYYYMMDD'));

    variable BIND_LY_START_DATE_N number;

    run: BIND_LY_START_DATE_N: = & LY_START_DATE_NUM;

    PRINT BIND_LY_START_DATE_N;

    -find YEAR 2

    SET YRS2_END_DATE = ' TO_DATE (: BIND_LY_START_DATE_N, 'yyyy-mm-dd')-1;

    SET YRS2_END_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS2_END_DATE, 'YYYYMMDD'));

    variable BIND_YRS2_END_DATE_N number;

    run: BIND_YRS2_END_DATE_N: = & YRS2_END_DATE_NUM;

    PRINT BIND_YRS2_END_DATE_N;

    SET YRS2_START_DATE = ' TO_DATE (: BIND_YRS2_END_DATE_N, 'yyyy-mm-dd')-363;

    SET YRS2_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS2_START_DATE, 'YYYYMMDD'));

    variable BIND_YRS2_START_DATE_N number;

    run: BIND_YRS2_START_DATE_N: = & YRS2_START_DATE_NUM;

    PRINT BIND_YRS2_START_DATE_N;

    -find YEAR 3

    SET YRS3_END_DATE = ' TO_DATE (: BIND_YRS2_START_DATE_N, 'yyyy-mm-dd')-1;

    SET YRS3_END_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS3_END_DATE, 'YYYYMMDD'));

    variable BIND_YRS3_END_DATE_N number;

    run: BIND_YRS3_END_DATE_N: = & YRS3_END_DATE_NUM;

    PRINT BIND_YRS3_END_DATE_N;

    SET YRS3_START_DATE = ' TO_DATE (: BIND_YRS3_END_DATE_N, 'yyyy-mm-dd')-363;

    SET YRS3_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS3_START_DATE, 'YYYYMMDD'));

    variable BIND_YRS3_START_DATE_N number;

    run: BIND_YRS3_START_DATE_N: = & YRS3_START_DATE_NUM;

    PRINT BIND_YRS3_START_DATE_N;

    Hello

    Kodiak_Seattle wrote:

    I have a code where I find dates START and end range for the past 3 years, the beginning Date must start on a Sunday and the end Date is at the end on Saturday using the weird system they have here:-)

    the end usable VARIABLE must be in YYYYMMDD format as number, because that's how they set up Date here... can anything about...

    So I thought to all the Dates, performing a combination of Variables of SUBSTITUTION AND LINKING, why I do like that it is because

    I received an error when I used just the variables SUBSTITUTION (maximum 240 characters used on the START DATE of the year2, in)

    switching to this, the error has disappeared), well that's what I thought he'll fix it.

    But now, when I try to use & VARIABLE in SQL, I get an error that it cannot use BIND variables, so try to pass values to a SUBSTITUTION

    afin_que this error disappears) - unless there is a better way?

    If there is a better way to stay maybe everything inside SUBSTITUTION and don't imply any LINK, maybe it would be better, if you guys know a way around the 240 character error...

    :-)

    My variables are:

    -find YEAR 1

    SET LY_END_DATE_NUM = "TO_NUMBER (TO_CHAR (NEXT_DAY ((SYSDATE-7), 'SATURDAY'), 'YYYYMMDD'));

    variable BIND_LY_END_DATE_N number;

    run: BIND_LY_END_DATE_N: = & LY_END_DATE_NUM;

    PRINT BIND_LY_END_DATE_N;

    SET LY_START_DATE = ' TO_DATE (: BIND_LY_END_DATE_N, 'yyyy-mm-dd')-363;

    SET LY_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& LY_START_DATE, 'YYYYMMDD'));

    variable BIND_LY_START_DATE_N number;

    run: BIND_LY_START_DATE_N: = & LY_START_DATE_NUM;

    PRINT BIND_LY_START_DATE_N;

    -find YEAR 2

    SET YRS2_END_DATE = ' TO_DATE (: BIND_LY_START_DATE_N, 'yyyy-mm-dd')-1;

    SET YRS2_END_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS2_END_DATE, 'YYYYMMDD'));

    variable BIND_YRS2_END_DATE_N number;

    run: BIND_YRS2_END_DATE_N: = & YRS2_END_DATE_NUM;

    PRINT BIND_YRS2_END_DATE_N;

    SET YRS2_START_DATE = ' TO_DATE (: BIND_YRS2_END_DATE_N, 'yyyy-mm-dd')-363;

    SET YRS2_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS2_START_DATE, 'YYYYMMDD'));

    variable BIND_YRS2_START_DATE_N number;

    run: BIND_YRS2_START_DATE_N: = & YRS2_START_DATE_NUM;

    PRINT BIND_YRS2_START_DATE_N;

    -find YEAR 3

    SET YRS3_END_DATE = ' TO_DATE (: BIND_YRS2_START_DATE_N, 'yyyy-mm-dd')-1;

    SET YRS3_END_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS3_END_DATE, 'YYYYMMDD'));

    variable BIND_YRS3_END_DATE_N number;

    run: BIND_YRS3_END_DATE_N: = & YRS3_END_DATE_NUM;

    PRINT BIND_YRS3_END_DATE_N;

    SET YRS3_START_DATE = ' TO_DATE (: BIND_YRS3_END_DATE_N, 'yyyy-mm-dd')-363;

    SET YRS3_START_DATE_NUM = "TO_NUMBER (TO_CHAR (& YRS3_START_DATE, 'YYYYMMDD'));

    variable BIND_YRS3_START_DATE_N number;

    run: BIND_YRS3_START_DATE_N: = & YRS3_START_DATE_NUM;

    PRINT BIND_YRS3_START_DATE_N;

    Let me make sure I understand the problem.

    One year, in this problem, is exactly 364 days.

    You want the year that ended on the most recent Saturday (otherwise said, the year ending Saturday between 6 days ago and today) and two years ago.

    You want the first date in each of those years and the last date each year, in the format YYYYMMDD.

    Is this fair?

    Here's a way to define variables of substitution (with names like year_1_start):

    COLUMN y1_start new_value by year_1_start

    COLUMN y1_end new_value by year_1_end

    COLUMN y2_start new_value by year_2_start

    COLUMN y2_end new_value by year_2_end

    COLUMN y3_start new_value by year_3_start

    COLUMN y3_end new_value by year_3_end

    WITH got_y1e AS

    (

    SELECT NEXT_DAY (SYSDATE - 7 'SATURDAY') AS y1e

    OF the double

    )

    SELECT TO_CHAR (y1e + 1 - (364 * 3), 'YYYYMMDD') AS y3_start

    , TO_CHAR (y1e - (364 * 2), 'YYYYMMDD') AS y3_end

    , TO_CHAR (y1e + 1 - (364 * 2), 'YYYYMMDD') AS y2_start

    , TO_CHAR (y1e - 364, 'YYYYMMDD') AS y2_end

    , TO_CHAR (y1e + 1-364, 'YYYYMMDD') AS y1_start

    , TO_CHAR (y1e, 'YYYYMMDD') AS y1_end

    OF got_y1e

    ;

    If you prefer that bind variable, write an anonymous PL/SQL block and use the same logic to 6 variables.

  • Bind the Variable Table name in the query of VO

    I have a VO that must have its clause defined dynamically at run time.  I have a string bind variable defined with a default value that is referenced in the query of the VO.  However, JDeveloper allow me to leave the definition of the query of the view object when the from clause is a variable binding, even if the binding variable has the default value.

    For example.

    Select

    « X »

    Of

    : TABLE

    where

    1 = 1

    The variable binding TABLE is defined as a string with a default value of the 'double '.  Did I miss something in the definition of the VO?

    Thank you

    Hello

    I suggest you to dynamically set the query of the view object.  This does not meet your requirements.

    xxVo.setQuery ();

  • bind the variable column of v$ sqlarea

    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE     10.2.0.4.0     Production
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    select to_char(sql_fulltext), bind_data from v$sqlarea where sql_id = '5fwm73ndv5pjp';
    TO_CHAR(SQL_FULLTEXT)                    BIND_DATA
    select vgal.GAFS_DISPLAY_LINE_CD
    from view_gafs_account_line vgal
     where vgal.ACCOUNT_ID =  :p1 and
     vgal.ACCOUNT_LINE_SEQ_CD =  :p2 and 
    vgal.ACCOUNT_TYPE_ID =  :p3 and 
    vgal.PROGRAM_SUMMARY_ID =  :p4     
    I'm not horribly v$ sqlarea. but there were some questions about the application executes a query and get
    no row is returned.

    I find the query in v$ sqlarea but I would like to know what are bind variables, but this column is null.

    This means that the query has been run with null for all bind variables?
    or bind variables not seized for any reason are any?

    v$ sql_bind_capture I bind the value of the variable

    SELECT
       a.sql_text,
       b.name,
       b.position,
       b.datatype_string,
       b.value_string
    FROM
    
      v$sql_bind_capture b,
    
      v$sqlarea          a
    
    WHERE
    
       b.sql_id = 'dpf3w96us2797'
    
    AND
       b.sql_id = a.sql_id;
    
  • Bind the Variable problem

    Hi all

    CREATE OR REPLACE PROCEDURE PRMADM_BATCH. UPDATE_PROC_LOG (p_SRC_SYS_ID VARCHAR,
    p_APPL_MOD_NM VARCHAR, p_INPT_OBJ_NM VARCHAR, VARCHAR, p_OUTPT_OBJ_NM p_ERR_ID
    VARCHAR, p_ERR_DESC VARCHAR)
    AS
    number of p_OUTPT_ROW_CNT;
    number of p_INPT_ROW_CNT;
    p_OUTPT_SQL VARCHAR2 (4000);
    p_INPT_SQL VARCHAR2 (4000);
    number of p_ERR_ID_CHK;
    BEGIN
    IF p_ERR_ID = 0 THEN - success
    p_OUTPT_ROW_CNT: = 0;
    p_INPT_ROW_CNT: = 0;
    p_OUTPT_SQL: = NULL;
    p_INPT_SQL: = NULL;
    p_ERR_ID_CHK: = 0;
    DBMS_OUTPUT. PUT_LINE ('SRC_SYS_ID =' | p_SRC_SYS_ID);
    p_OUTPT_SQL: = 'SELECT COUNT (*) FROM "| p_OUTPT_OBJ_NM | ' WHERE
    SRC_SYS_ID =: a ';
    p_INPT_SQL: = 'SELECT COUNT (*) FROM "| p_INPT_OBJ_NM | ' WHERE
    SRC_SYS_ID =: b';
    DBMS_OUTPUT. Put_line (p_OUTPT_SQL);
    DBMS_OUTPUT. Put_line (p_INPT_SQL);
    EXECUTE IMMEDIATE p_OUTPT_SQL IN p_OUTPT_ROW_CNT IN USING p_SRC_SYS_ID;
    EXECUTE IMMEDIATE p_INPT_SQL IN p_INPT_ROW_CNT IN USING p_SRC_SYS_ID;
    Else - failure
    p_OUTPT_ROW_CNT: = - 1;
    p_INPT_ROW_CNT: = - 1;
    p_OUTPT_SQL: = NULL;
    p_INPT_SQL: = NULL;
    p_ERR_ID_CHK: = - 1;
    SELECT COUNT (*) IN the p_ERR_ID_CHK OF PRMADM. ERR WHERE ERR_ID =
    p_ERR_ID;
    IF p_ERR_ID_CHK = 0 THEN
    INSERT INTO PRMADM. ERR (ERR_ID, ERR_DESC) VALUES (p_ERR_ID,
    p_ERR_DESC);
    COMMIT;
    END IF;
    END IF;
    UPDATE PRMADM. PROC_LOG
    SET PROC_END_DY_DT = SYSDATE,
    INPT_ROW_CNT = p_INPT_ROW_CNT,
    OUTPT_ROW_CNT = p_OUTPT_ROW_CNT,
    ERR_ID = p_ERR_ID
    WHERE APPL_MOD_NM = p_APPL_MOD_NM
    AND PROC_END_DY_DT IS NULL
    AND OUTPT_OBJ_NM = p_OUTPT_OBJ_NM
    AND INPT_OBJ_NM = p_INPT_OBJ_NM
    AND SRC_SYS_ID = p_SRC_SYS_ID;
    COMMIT;
    END UPDATE_PROC_LOG;
    /

    The proc above is running well and gives the result below

    SRC_SYS_ID = 1030
    SELECT COUNT (*) IN THE PRMADM. PGM WHERE
    SRC_SYS_ID =: a
    SELECT COUNT (*) IN THE PRMADM. INPT_PGM WHERE
    SRC_SYS_ID =: b


    My question is where can I enter the value for the variable bind a and b...

    I want to put two to 1030

    Thanks in advance

    Ndiaye (ndiaye) wrote:
    p_SRC_SYS_ID (input in my proc parameter) takes the value of 1030 and I want that the connection variable: an and: b take the same value...

    But they take this value...

    EXECUTE IMMEDIATE p_OUTPT_SQL IN p_OUTPT_ROW_CNT IN USING p_SRC_SYS_ID;
    EXECUTE IMMEDIATE p_INPT_SQL IN p_INPT_ROW_CNT IN USING p_SRC_SYS_ID;

    The 'USE' of the declaration part links the value to bind variables in the SQL statement.

    Where is the problem?

  • Access to bind the variables of class EntityImpl

    Hello

    I use jdeveloper 11.1.1.7.0

    I have an Obj to the entity and a view Obj, in the a view Obj I defined some variables bind to the WhereClause,

    EntityImpl of EO class, I need to access these variable bind, how can I do for this case?

    Habib

    Concerning

    There are several options:

    1. download VO in your EOImpl class (as I have already suggested). It is the best way to recover your var bind, but will present a dependence between OT and VO (and usually EO should not depend on a VO, but of course it depends on concrete use cases). So, if you know that there is only one THAT VO editable based on this OS, I'd go with this approach.

    2. put your var to link to the http session and then access this variable with: ADFContext.getCurrent () .getSessionScope ().  It is not difficult to implement, but this isn't a very good approach because it would break the MVC pattern (you should not reference something layer in the layer of view model).

    3. place your var bind to structure UserData. It's probably "appropriately", but it is also the most difficult to implement correctly, see for example Andrejus Baranovskis Blog: Solution for sharing the global user data in British Colombia ADF

    Dario

  • To bind the Variable as being of a literal string value

    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod

    PL/SQL Release 10.2.0.5.0 - Production

    CORE Production 10.2.0.5.0

    AMT for Linux: Version 10.2.0.5.0 - Production

    NLSRTL Version 10.2.0.5.0 - Production

    Hi there, thank in advance. I have a problem when you create a dynamic statement. The problem is in the binding variable': OLD. CUST_NAME'... my question is is there an escape character to treat the affair as a literal string variable?

    {code}

    v_str2: = "' client_name =" ' |' | ' || ': OLD. CUST_NAME';

    EXECUTE IMMEDIATE 'create or replace trigger trg_.

    || SUBSTR (rec_cur.table_name, 1, 26)

    || "before insert or update or delete on.

    || rec_cur. Owner

    || '.'

    || rec_cur.table_name

    || '

    declare

    Start

    If the UPDATE can

    FIFAPPS.ibug.log_errors('||)

    v_str2 | »

    );

    end if;

    end;';

    {code}

    I want the output in a trigger something like this:

    {code}

    If the UPDATE can

    FIFAPPS.ibug.log_errors (' client_name ='|: O LD.) CUST_NAME

    );

    {code}

    Hello

    What is the need of business that you are trying to address?  Before writing any kind or trigger and especially before you dynamically create a lot of triggers, see if Oracle provides a better way to meet your needs, for example, audit.

    If triggers are really justified, and you are looking for just an easy way to crank out a large number of almost identical triggers right now (not something that end users will do all the time), so I suggest SQL * Plus and the substitution variables.  It will be easier to debug writing and debugging, because you won't have to you not so much worried about quotes and concatenation.  For example, if all the triggers are identical except for the diagram, the table name and column name, you can write a simple script that can be used to create an unlimited number of triggers, like this:

    -Trigger_Factory.sql - create trigger standard

    DEFINE schema_name = & 1
    DEFINE table_name = & 2
    DEFINE column_name = & 3

    CREATE OR REPLACE TRIGGER trg_ & table_name
    BEFORE ON INSERT or UPDATE or DELETE &... schema_name table_name
    -' SEO NEW OLD NEW old' is the default, so do not say

    -REFERENCING NEW AS NEW OLD O
    -In this way, you don't have to worry about the bad OLD spelling.
    FOR EACH LINE
    BEGIN
    IF THE UPDATE CAN
    fifapps. IBUG.log_errors (: OLD & column_name);
    ...

    Once you have this course of debugging, you can write another script that calls the script above:

    @trigger_factory fifapps t t_column_key

    @trigger_factory fifapps u colonne_1

    @trigger_factory foo bar column_xyz

    Alternatively, instead of manually create a script like the one above, write a query to do it for you:

    SELECT '@trigger_factory'

    owner

    table_name

    column_name

    From all_tab_columns

    WHERE THE...

  • OSB: Replace the action inside a loop for

    Hi all

    She seems like a simple question but I'm breaking my head for now quite sometimes.

    I have a recurring element in my diagram. I need to get the value of this repetitive element and convert it to uppercase.

    For example:
    My XML
    <Telephone>
    <Telephone Number>
    <phoneUsage>Contact</phoneUsage>
    <phoneNo>767676</phoneNo>
    </Telephone Number>
     
    <Telephone Number>
    <phoneUsage>Callback</phoneUsage>
    <phoneNo>767676</phoneNo>
    </Telephone Number>
    </Telephone>
    I need to change the value of using phone uppercase (reminder and Contact)

    For this I use a loop For:
    For variable TelephoneNumber in ./Telephone/TelephoneNumber of variable body
    Indexed by variable TelephoneNumberIndex with total count in variable TelephoneNumberCount
     
    Do
    (
    Replace $body/Telephone/TelephoneNumber/phoneUsage in variable body with 
    fn:upper-case($body/Telephone/TelephoneNumber[xs:int(i)]/tro:phoneUsage)
    )
    I do not know how to move the index value in the Xpath expression replace $body, phone, TelephoneNumber, phoneUsage.
    Can you help me please on this? I tried $ phone/body/TelephoneNumber [xs:int (i)] / / phoneUsage, but it generates an error.

    Thanks in advance for your time and support.

    For each [TelephoneNumber] in [. / phone/Tel...] ./Telephone/TelephoneNumber
    [body]
    Indexed by [undefined Variable] with countdown in [undefined Variable]
    Do)

    Replace [content of the node] [. / phoneUsage]. / phoneUsage
    in [TelephoneNumber] with [fn:upper - case ($...)] fn:upper-case($TelephoneNumber/phoneUsage/text())

    )

    Kind regards
    Anuj

  • Define the actions of the buttons inside a loop for

    Hi, me again ^^
    This round is:

    I got a set of buttons and a text field where they load the content.

    I try to take a zillion functions and keep the neat code so I guessed I'd try set the actions to the buttons in the loop too. First of all, I had a few problems to the I counter inside the function onRelease (in fact I don't think I've ever had how do). But I tried this and it worked:
    Stop();
    var comprarXML = new XML();
    comprarXML.ignoreWhite = true;
    comprarXML.load('flash/comprar.xml');
    comprarXML.onLoad = checkLoading;
    function checkLoading (success) {}
    rootNode = comprarXML.firstChild;
    ButtonReleaseAndContent ();
    }
    function ButtonReleaseAndContent () {}
    for (i = 0; I < 12; i ++) {/ / my buttons are not dynamically generated, which is why the County.}
    btTemp = eval ('content.test.bt' + i);
    btTemp.txt.htmlText = rootNode.childNodes [i + 1].firstChild.firstChild.nodeValue;
    btTemp.temp = rootNode.childNodes [i + 1] Sublst.ChildNodes(1).ChildNodes(0) [1].firstChild.nodeValue;
    btTemp.onRelease = function () {}
    this.temp = content.test.test.htmlText;  the problematic line
    }
    }
    }
    On line where I put the text, I had one if "uh Yes, I may be refer to in the mc button, because the generated code goes in! So, I tried the this.temp, guessing it would be equal to the level of the key. A few seconds later I noticed that my SEO for the text field was not coming in the button, but the root. So I have no idea why this works. Anyone know what I did?

    If btTemp is a movieclip to assign dynamic properties (such as temp).  You can then retrieve this property when the button is released.

  • Structure of the event inside while loop

    I'm still fairly new to Labview and this may seem a simple question.  I'm doing a Subvi to display, edit, and create configuration files.  I use a ListBox to list all sections of a config file and structure of the event to update the values in each section, when they are clicked.  The problem is that the structure of the event seems to be a break the while loop so that the buttons do not work until the event has executed.  What I would like is the while loop to run continuously and the event to run only when I click in the listbox control.  I hope this makes sense.  There is a peak in the diagram below. Thank you

    There are a number of issues with your code that could cause problems:

    1. You must use the FP. Open method to open the front panel of a VI and of the public Service. Close method to close. I don't remember exactly the problem, but starting with the 7 worm nor indicated that these methods were the preferred way to perform these tasks.
    2. Based on what seems to be the code, the event for the control of Presets of wood should be a change the value - not a mouse down event. After changing the type of event, use the event data NewVal to drive the indexer table index entry.
    3. The buttons Ok and cancel them should be handled in their own events to change the value. The value change event Cancel would exit the loop, while passing the output error (which indicates that cancel was pressed) and default values for the other 4 outputs. The change of the value Ok event would leave the loop by passing the values that the operator had concluded the 4 controls on the front panel.
    4. An event of timeout with a very short time (1 msec) would stop loop if an error has occurred, or the output of the gate AND is set to true.
    5. The wait function is not necessary, as is the case outside the loop structure.

    Mike...

  • bind the variable question

    Hello

    I wonder what trivial mistake, am I doing here? Qsure uite that the syntax is correct and it has worked before in the developer doesn't have it?

    variable bind_variable number
    execute :bind_variable := 1;
    print bind_variable
    
    
    PL/SQL procedure successfully completed.
    
    
    
    
    BIND_VARIABLE
    ------
    
    
    


    I found regarding reports bug, but for versions a lot older.

    Win 7

    Version 4.1.0.19

    Java 1.8.0_31

    Looks like a bug in 4.1 based on the thread below and the comments in the blog below:

    Printing in SQL Developer 4.1 output

    http://www.thatjeffsmith.com/archive/2015/05/SQL-Developer-version-4-1-feature-recap/

    Works very well in 4.0.3.16

    See you soon

    AJ

  • Possible to develop a chain of the variable inside a literal hash table?

    Attempt to run together-qadcomputer

    together-qadcomputer $adserver - ObjectAttributes @{$VARIABLENAME}

    When I do that - I get the error: Missing '=' operator after the literal hash key.


    The string variable contains the equivalent of the data pairs = of value that works when the entries manually.

    $VARIABLENAME = "' edsvaVar1"= $valeur1;"edsvaVar2"= $valeur2;"edsvaVar3'= $Value3 '.

    When I read the $VARIABLENAME, I see the values that I expect.  I want the same effect of in the literal hash required for the cmdlet set-qadcomputer when you use the @ {BOM} that supports several pairs of value.

    Possible?

    ARS 6.9

    There are two ways to do this.  Add command-line string and then use invoke-expression not at my peak, I think it is the correct command, I used this in a prior cultures and when just debugging print any line to ensure that the expansion works well.  The other option is to use a hash table to store the settings of command and a third, I just thought that everything is instead of create a variable string place the attribute pairs in a table, I'm sure it will work also.  If you can only use a string and then use the invoke-expression cmdlet.

  • Variable inside 'for' loop with parentheses

    Hi all

    Coud someone tell me how Im going to put the I variable within the [[]] because I can't get it to work

    for (var i: Number = 0; i < product; i ++) {}
    _root.menu ["Product" + i] ._x += (product[[[+i]]]x-_root.menu.product["product"+i]._x)/speed;
    }

    Thank you!

    use:

    var tl:MovieClip =;

    for (var i: Number = 0; i<>
    _root.menu ["Product" + i] ._x += (tl ['product' + i + ' x»]-_root.menu.product["product"+i]._x)/speed; "])
    }

Maybe you are looking for

  • is there a reason to keep iphoto on my computer?

    Some time ago the Photos app appeared, and apparently iPhoto became obsolete. But iPhoto is still on my computer. Is there a reason to keep?

  • Notifications of its too quiet

    I think that this coincides with the last update, but my iPhone notification sounds (email, text, etc.) have suddenly become much quieter than they were before. I never paid much attention before just worked, so I don't know if I have to look elsewhe

  • Help - why the songs that are not on my iPhone appearing in my list of app music albums/songs?

    I have over 500 GB of music on my Mac, so I create a playlist for the songs I want to sync my iPhone. Yet when I look at my phone, there are many songs that are not in sync would be playlist. They cannot be read unless the phone is connected to my wi

  • Kein ton in windows 10

    tonausgabe in windows 10 works nicht

  • Save as type using Vista

    Hi all I am save an IMAQ image and would like to have the option in the file dialog box whether me to save in different formats. We have a solution for this at: http://forums.NI.com/NI/board/message?board.ID=170&message.ID=16648&query.ID=392066 Howev