Update + results where condition

Hi all

I have the following code
update article_stock
set    recalculation = 'I'
where  article_number in (
         select distinct oo.article_number 
         from   outbound_order oo 
           join article_stock ast 
             on oo.article_number = ast.article_number)
When executing the query, he says "xxx updated records. How ever when I look at the columns of article_stock then I don't see the changes.
What he supposed to do is to update all the columns of recalculation of the separate article_numbers in the outbound_order table.

The code above does not work. So it seems that I do not understand how to use 'in '. I tried using where exists, but which will update all the records in the article_stock table.

Can someone explain to me, how to approach this problem? And how to fix it?

Kind regards

Metro

Hello

If you see the "xxx files updated" result, but nothing has changed, the files that you put at day probably already had the column recalculation = 'I', then you will not see the difference.

If I understand what you're trying to do, I think you can simplify your application by:

update article_stock
set    recalculation = 'I'
where  article_number in (
         select oo.article_number
         from   outbound_order oo
          );

The JOIN is useless that you update article_stock of the table, then you are on the items you are looking for in the outbound_order table already exists in article_stock.
The SEPARATE is also unnecessary, because if the article exists in outbound_order, in the Oracle Update article in article_stock, but doesn't change the fact that the article can exist more than once.

Kind regards
Sylvie

Tags: Database

Similar Questions

  • WHERE condition in a sql statement

    Hello people,

    I have a screen with data grid where one of the columns is STATES_CODES and other VOLUMES one. Grid consists of several lines. I need to create a CUSTOM SEARCH field that will be filtering on this database.

    Unfortunately a customer wants to enter a search string with custom functions: '+' (plus) to include in the selection of the result and "-" (less) to exclude from the selection of the results. For example: "+ IT + -100". Based on this string, I need to return only the States HE and and exclude volumes with a value of 100.

    A tip how to build a query where condition, so it will be more effective as possible?

    Simple example:

    test data:

    with t (select 'IT' State, volume 90 of any union double

    Select 'IT' State, 100 volumes of all the double union

    Select 'IT' State, 100 volumes of all the double union

    Select 'OF' State, 90 volume of all the double union

    Select 'OF' State, in 100 volumes of all the double union

    Select 'OF' State, in 100 volumes of all the double union

    Select 'NL' State, 90 volume of all the double union

    Select 'NL' State, 100 volumes of all the double union

    Select 'NL' State, 100 volumes of all the double union

    Select 'FR' State, 90 volume of all the double union

    Select 'FR' State, in 100 volumes of all the double union

    Select 'FR' State, in 100 volumes of all the double union

    Select 'ARE' State, 90 volume of all the double union

    Select 'ARE' State, in 100 volumes of all the double union

    Select 'ARE' State, 100 volumes of double

    )

    Select * from t

    Search string: "+ IT + - 100".

    I thought to somehow using regular expressions REGEXP_LIKE condition, but do not know how to change the entered search string in above format as long as the regular expression.

    And if you want to be specific about the characters representing the State and the numbers represent the amount then you will need to divide them into more...

    SQL > with t (select 'IT' State, 90 volume of all the double union)
    2 Select 'IT' State, 100 volumes of all the double union
    3 select 'IT' State, 100 volumes of all the double union
    4. Select 'FROM' State, 90 volume of all the double union


    5. Select 'FROM' State, in 100 volumes of all the double union
    6. Select 'FROM' State, in 100 volumes of all the double union
    7 select 'NL' State, 90 volume of all the double union
    8 select 'NL' State, 100 volumes of all the double union
    9 select 'NL' State, 100 volumes of all the double union
    10. Select 'FR' State, 90 volume of all the double union
    11. Select 'FR' State, in 100 volumes of all the double union
    12. Select 'FR' State, in 100 volumes of all the double union
    13. Select 'ARE' State, 90 volume of all the double union
    14 select 'ARE' State, in 100 volumes of all the double union
    15 select 'ARE' State, in 100 volumes of double
    16              )
    17, ch. as (select "+ IT + -100"as the double criterion)
    18, split as (select regexp_substr (trim (', ' regexp_replace (criteria,'([+ -]) ', ', \1')), "[^,] +', 1, level") as a criterion of)
    19 c
    20 connect the regexp_substr (trim (', ' regexp_replace (criteria,'([+ -]) ', ', \1')), "[^,] +', 1, level") is not null
    21                 )
    22, inc_state as (select substr(criteria,2) as a criterion
    23 split
    where the 24 regexp_like(criteria,'^\+[A-Z]+')
    25                     )
    26, inc_vol as (select substr(criteria,2) as a criterion
    27 split
    where the 28 regexp_like(criteria,'^\+[0-9]+')
    29                    )
    30, exc_state as (select substr(criteria,2) as a criterion
    31 split
    where the 32 regexp_like(criteria,'^\-[A-Z]+')
    33                     )
    34, exc_vol as (select substr(criteria,2) as a criterion
    35 split
    where the 36 regexp_like(criteria,'^\-[0-9]+')
    37                    )
    38-
    39 select *.
    40 t
    where the 41 (exists (select 1
    inc_state 42
    43 where inc_state.criteria = t.state
    ((44) or (select count (*) in inc_state) = 0)
    45 and (exists (select 1
    46 by inc_vol
    where the 47 inc_vol.criteria = t.volume
    ((48) or (select count (*) in inc_vol) = 0)
    49 and (not exists (select 1
    50 to exc_state
    where the 51 exc_state.criteria = t.state
    ((52) or (select count (*) in exc_state) = 0)
    53 and (not exists (select 1
    exc_vol 54
    where the 55 exc_vol.criteria = t.volume
    ((56) or (select count (*) in exc_vol) = 0)
    57.

    ST VOLUME
    -- ----------
    HE 90
    90

  • explain query plan uses no unique index with where condition

    Hi all

    I use in the 10.2.0.5 oracle database Enterprise edition 64-bit on 64-bit windows server 2008.

    I'm following this tutorial on my own table

    Guide to understanding Oracle QUERY PLAN - 10 minutes

    my questions are below

    Analyze table LIB_CLASSIFICATIONS compute statistics;
    explain plan for  SELECT class_id  FROM lib_classifications WHERE class_no = '538' ;
    select * from table(dbms_xplan.display);
    

    the result is less than

    Hash value of plan: 3022072076

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

    | ID | Operation | Name                | Lines | Bytes | Cost (% CPU). Time |

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

    |   0 | SELECT STATEMENT |                     |     1.    10.     5 (0) | 00:00:01 |

    |*  1 |  TABLE ACCESS FULL | LIB_CLASSIFICATIONS |     1.    10.     5 (0) | 00:00:01 |

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

    Information of predicates (identified by the operation identity card):

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

    1 - filter ("CLASS_NO" = '538')

    DESC LIB_CLASSIFICATIONS

    Name of Type Null

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

    CLASS_ID NOT NULL NUMBER (10)

    CLASS_DESC VARCHAR2 (50)

    REMARKS VARCHAR2 (250)

    CLASS_NO VARCHAR2 (20)

    CLASS_TYPE VARCHAR2 (10)

    CREATE_USER VARCHAR2 (10)

    MODIFY_USER VARCHAR2 (10)

    CREATE_DATE DATE

    MODIFY_DATE DATE

    CLASS_CATEGORY_ID VARCHAR2 (10)

    class_id has a primary key.

    now when I remove the condition where the query, the result is lower;

    Analyze table LIB_CLASSIFICATIONS compute statistics;
    explain plan for  SELECT class_id  FROM lib_classifications ;
    select * from table(dbms_xplan.display);
    

    the result is less than

    Hash value of plan: 262704430

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

    | ID | Operation | Name | Lines | Bytes | Cost (% CPU). Time |

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

    |   0 | SELECT STATEMENT |             |  1558.  6232.     2 (0) | 00:00:01 |

    |   1.  FULL RESTRICTED INDEX SCAN FAST | SYS_C005653 |  1558.  6232.     2 (0) | 00:00:01 |

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

    now it's using indexes with INDEX FAST FULL SCAN.

    I need the index using the WHERE condition as well.

    How to do this?

    Thank you.

    you have indexes on the column class_id not on class_no column how u would expect index to use when there is no index on the column class_no

  • How to exclude search results where the situation is just the right search term was found

    Is there a way to exclude the results of search results where the search term appeared in the path/location of the file?

    For example, I find the term 'XYZ' and am only interested in results that include XYZ in the name of the file (not the path) or in the content of the file.  I want to have the screen of search results that appear only because "XYZ" was found in the path.

    One thing is certain, you're familiar with some of the great powers in search bing or google?  For example, how you can search something like this on bing:

    How to set the folder site: cmdrkeene.com view (s)

    This site: cmdrkeene.com tells your Internet search to look at only one site for these terms.  Windows allows you to do the same thing in areas very choose what to look for.  So for your case, type it like this:

    filename:XYZ

    Or if your file name includes spaces, type it between quotation marks, as follows:

    file name: 'project xyz '.

    This is a file if it has those in the special file name.  This includes a file of type "Project WXYZ" because he always has these letters in it.  If you want to ONLY have these letters, nothing else at all (exact matches only), you can put a ~ after the colon.  That means "file name must exactly", then this:

    file name: ~ 'project xyz '.

    Although it would be unlikely to find anything, because most files have something after the name (such as .doc or something), so you can use a * generic, just like the old days:

    file name: ~ "xyz project."

    --------

    It's probably more that you wanted to know, but the first example is what you :)

  • Print the view current option disappeared after the last update. Where at - it go?

    Print the view current option disappeared after the last update. Where at - it go?

    Hi wpaldridge,

    Please click on 'Other Options' in the Pages to print to get the current view.

    Thank you

    Abhishek

  • How to make a sum of text_field or column with where condition?

    Hi all

    In Oracle forms 6i, I created a form in which there are 5 text_Items (with 20 none of the displayed fields) namely ACCOUNT FD DO, AMOUNT, INTEREST RATE, STATUS and INTEREST_YEAR.

    FD ACCOUNT NO.

    AMOUNT

    INTEREST RATE

    STATUS

    INTEREST_YEAR

    47665

    50000

    1. 11.5

    E

    5750

    37463

    60000

    12

    D

    7200

    47651

    100000

    1. 12.5

    D

    12500

    34766

    70000

    11

    E

    7700

    I want to make the sum of the INTEREST_YEAR where status = 'E '.

    I created a TOTAL_INTEREST_YEAR name field in which I want to display the sum.

    How the sum with where condition?

    Thank you.

    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production

    Oracle form Builder 6i.

    Michael,

    When you write the formula for a calculated item, it does not use PL/SQL expressions (to include built-in DECODING) in Forms 6i.  If there was no conditional control over your calculation, you can simply make your article a summary point and perform the summation over column interest_rate .  However, because your calculation depends on the value in the STATUS column, you will need to use a combination of a calculated item and a summary article because you can't use an IF, DECODE or any other PL/SQL statement in the formula for the calculated item.  Therefore, you need to create a function in the knot of program units and call the function in your formula.  I tested it using the following code and it worked correctly.

    First, create the following function in the node of the object browser program units.

    FUNCTION calc_interest RETURN NUMBER IS
         n_ret_val  NUMBER := 0;
     BEGIN
       IF ( :YOUR_BLOCK.STATUS = 'E' ) THEN
           n_ret_val := :YOUR_BLOCK.interest_rate;
       END IF;
       RETURN n_ret_val;
    END calc_interest;
    

    First, you must change the property to BLOCK request all archives = Yes

    Then, open the palette of your calculated item property, and set the following properties:

    1. calculation = Formula

    2 property Forumla = CALC_INTEREST

    3. point data base = No.

    Now create a second item in the table not based on in your block that will display the amount of the interests summarized.  Open the palette property for this element and set the following properties:

    1 Data Type = number

    2 calculation Mode = Summary

    3. function = sum

    4 summarizes point = "name of your element calculated.

    5 base of data point = No.

    6 canvas = "your canvas.

    When you query your block, you should see the sum of all records where STATUS = 'E '.

    It worked for me, in my example form that I created so this should work for you.

    Craig...

  • How to add a where condition to seeds VO

    Hi I have a VO PoRequisitionLinesVO.Now knowledge I want to add the SQL where condition...

    How can I do this...? There is no addition of all fields... only adding a where condition clause?

    Will I need to extend that VO? If yes then how should I do this?

    Thank you...

    Yes, you must extend the VO.

    To get the procedure you can search the Internet, there is a great article (that I mentioned below):

    https://blogs.Oracle.com/prajkumar/entry/eo_based_vo_extension_in

    Kind regards

    Sandeep M.

  • Based where conditional clause...

    dear team,
    i have following code..
    
    Declare
      gv_flag1 Varchar2(1)   := 'N';
      gv_flag2 Varchar2(1)   := 'N';
      gv_flag3 Varchar2(1)   := 'N';
      all_where1       Varchar2(250);
      all_where2       Varchar2(250);
      ALL_where3       Varchar2(250);
      V_QTY           Number;
    Begin
      If gv_flag1 = 'N' Then
         all_where1 := 'AND '||'V.OWNER = ''PROD''';
      End If;
      DBMS_OUTPUT.PUT_LINE(all_where1);
      
      If gv_flag2 = 'N' Then 
         all_where2 := 'AND '||'V.OPERATION NOT LIKE (''10%'')';
      End If;   
      DBMS_OUTPUT.PUT_LINE(all_where2);
      
      If gv_flag3 = 'N' Then
         all_where3 := 'AND '||'V.OPERATION NOT LIKE (''07%'')';
      End If;
      DBMS_OUTPUT.PUT_LINE(all_where3); 
       
      --select based on conditions..
    End; 
    
    NOW I want where conditions in select statment to be conditional...
    
    which means if flag1='N' and flag2 = 'N' then use both all_where1 and all_where2 in *where* clause statement...
    if flag1='N' and flag3 = 'N' then then use all_where1 and all_where 3 in *where* clause of select statement...
    if all there flag = 'N' then use all_where conditions in *where* clause of select statement...
    
    i have 3 flags, which means total of 9 combinations,  is there any simpler way to do such kind of thing??
    
    please assist me
    
    nic

    Nicloei W wrote:
    Hi Jeenesh,

    What happens if Flag2 = 'Y' and Indicateur3 = 'Y' in this case, I want only the condition with Flag1

    concerning
    NIC

    SQL> ed
    Wrote file afiedt.buf
    
      1  Declare
      2    gv_flag1 Varchar2(1)   := 'N';
      3    gv_flag2 Varchar2(1)   := 'Y';
      4    gv_flag3 Varchar2(1)   := 'Y';
      5    --all_where1       Varchar2(250);
      6    --all_where2       Varchar2(250);
      7    --ALL_where3       Varchar2(250);
      8    lc_query varchar2(1000):= 'select count(*) from test v ';
      9    lc_where varchar2(500) := ' where 1 = 1 ';
     10    V_QTY           Number;
     11  Begin
     12    If gv_flag1 = 'N' Then
     13       lc_where := lc_where||' AND V.OWNER = ''TEST''';
     14    End If;
     15    If gv_flag2 = 'N' Then
     16       lc_where := lc_where||' AND V.OPERATION NOT LIKE ''10%''';
     17    End If;
     18    If gv_flag3 = 'N' Then
     19       lc_where := lc_where||' AND V.OPERATION NOT LIKE ''07%''';
     20    End If;
     21    lc_query := lc_query||lc_where;
     22    dbms_output.put_line(lc_query);
     23    dbms_output.put_line('-----------');
     24    execute immediate lc_query into v_qty;
     25    dbms_output.put_line('Count: '||v_qty);
     26* End;
    SQL> /
    select count(*) from test v  where 1 = 1  AND V.OWNER = 'TEST'
    -----------
    Count: 3
    
    PL/SQL procedure successfully completed.
    
  • SQL only: WHERE Condition pulled the correct runtime of the Central "SQL" tab

    I have a requirement that seems like it should be easy to solve in SQL, but me seems to be stuck with blinders and can't see the solution.

    The 'problem' that I'm trying to solve is to get several reporting units to any use of the SQL even in their where clause for certain types of metrics reports. So this is the solution I am proposing that we store the sql in a central table, which, in a simplified form, would have two columns as:

    GroupName Varchar2 (2000)
    SQL_Filter Varchar2 (5000)


    What I want to do conceptual, it's allow the user (even if they're using MS - SQL) to


    WHERE FunctionName (GetSQL_ForGroupName)

    But first of all, I would tell them that this can be done in Oracle sql. However, I can't understand how to achieve this end. From what I've read so far that oracle will not do:

    WHERE (subquery that returns SQL)

    or (in SQL)

    WHERE VariableSubstition

    or

    WHERE FunctionName (GetSQL_ForGroupName)

    It seems that these things in the WHERE clause allows Oracle after only

    FieldName [operator]

    as in

    WHERE price > (subquery)

    or

    WHERE ID IN (Value) Function

    Is it possible to do a subquery (or anything else) that allows me to draw the where clause running SQL - using only SQL? I can do this with a stored procedure, but it is to say it seems to me I had start coding select specific instructions for them or code so that they could enter select statements (or joins etc.). I don't want to write a complete dynamic reporting engine. I want to do is be able to pull the sql running. This ensures that everyone is 1) with the good sql for metrics 2) by using the same sql and 3) the core sql parameters can be stored in one place instead of 3000 definitions of the various reports.

    I must be looking at this the wrong way, I think. The solution does NOT seem to do WHERE (pull in the SQL running)... but I was not able to find a different way of thinking. For example, WITH does not resolve as you immediately the requirement WHERE fieldname [operator] [subquery | function]. I was browsing the internet and looking through all the books SQL on Safari of O'reilly but I have not met a solution. However, I think, this issue of 'centralization of base SQL' must have been resolved several, several times previously. Why can't I find anything on it then?

    Brad

    You might use a pipeline function to return a TABLE object. This function accepts a parameter that contains the name of the Group (although "GetSQL_ForGroupName" is supposed to represent). The query that they deliver will then look something like this:

    SELECT column_list
    FROM   TABLE(table_function('GroupName'))
    WHERE  additional_conditions
    

    In the function, you can create the SELECT statement that channels the rows in the table with WHERE conditions pulled a table for the provided group name.

  • Shot summary of a where condition clause...

    I have a form that displays the code material and this number in which different warehouses...

    It is possible to create an element of the summary screen is based on the place where the condition

    for ex.
    SQL> select  sum(arar) from tbs;
    
     SUM(ARAR)
    ----------
          1488
    
    for this query i can create a  display item and in the propery  pallete  i can select mode as summary,
    summary function as count, and select respective block and item...
    
    what i want to know is can this be based on where condition 
    some thing like the count shoudn't include where the column values is zero
    SQL> select count(arar) from tbs where arar!='0';
    
    COUNT(ARAR)
    -----------
            144
    Published by: Chase Suhail on November 9, 2010 22:45

    Hello

    Create a column of formulas no database in the same block to say 'NON_ZERO.
    The formula for the column would be: SET_NON_ZERO - this function returns 1 if arar is non-zero and 0 if it is zero.

    FUNCTION SET_NON_ZERO RETURN NUMBER IS
    BEGIN
     IF :ARAR = 0 THEN
       RETURN (0);
     ELSE
       RETURN (1);
     END IF;
    END;
    

    Now you can create a column of synthesis and use the text-to-speech function 'sum' and item summarised as "NON_ZERO.

    I hope this helps.

    Best regards

    Arif Khadas

  • with different same DataBlock where condition

    Hello

    I use forms 6i and 10g db.

    I have a datablock, say product_master, which retrieves columns product_id, product_name and price.

    and I have 2 control blocks (2 tables)

    what I want is based on list in 2 blocks of different control items, I need to retrieve data from the datablock

    say ctrlblk1 has a listitem named 'pdtlst '.
    so in this case where condition to be - WHERE the product_id =: pdtlst

    and in ctrlblk2 have another element of list "edpdtlst."

    where condition will - WHERE the product_id =: edpdtlst

    Is this possible?
    I found a "WHERE Clause" option in the Palette property of the Datablock.But I want to spend the condition based on the ctrlblock

    Pls help

    Hello

    Changing the block where clause with:

    -- numeric column --
     Set_Block_property( 'block_name', DEFAULT_WHERE, 'col1=' || :ctrl.item1 ) ;
    
    -- char column --
     Set_Block_property( 'block_name', DEFAULT_WHERE, 'col1=''' || :ctrl.item1 || '''') ;
    

    François

  • Condition within a where condition clause

    Dear friends,
    I am a beginner in PL/SQL and I need your help.
    I'll show you my code (it does not):
    declare
        var_mese VARCHAR2 (2);
    begin
        select max(to_number(MESE)) 
        into var_mese
        from NOC_MONITORAGGIO;
           SELECT count(*)
            FROM noc_sdoc_work a,
                 noc_sdoc b,
                 NOC_MONITORAGGIO
           WHERE NVL(a.CD_STRUTTURA,'x') = NVL(b.CD_STRUTTURA,'x')
             AND NVL(a.CD_SUB_STRUTTURA,'x') = NVL(b.CD_SUB_STRUTTURA,'x')
             AND NVL(a.NR_PRATICA,'x') = NVL(b.NR_PRATICA,'x')
             AND NVL(a.ASL,'x') = NVL(b.ASL,'x')
             AND b.STATO IN ( 1, 2 )         
            and
                if  var_mese in ('03','04','05','06','07','08','09','10','11','12') then
                    NOC_MONITORAGGIO.ANNO_GESTIONE = b.ANNO;
                else
                    NOC_MONITORAGGIO.ANNO_GESTIONE = to_number(b.ANNO)-1;
                end if;
    end;
    My problem is here:
            and
                if  var_mese in ('03','04','05','06','07','08','09','10','11','12') then
                    NOC_MONITORAGGIO.ANNO_GESTIONE = b.ANNO;
                else
                    NOC_MONITORAGGIO.ANNO_GESTIONE = to_number(b.ANNO)-1;
                end if;
    I need a nested where condition

    Thank you
    Leo

    You can code box that using a statement in the WHERE clause:

     and NOC_MONITORAGGIO.ANNO_GESTIONE =
                case
                   when var_mese in ('03','04','05','06','07','08','09','10','11','12') then b.ANNO
                   else to_number(b.ANNO)-1
                end
    
  • Updated with 2 different WHERE condition

    I have 2 tables, Table1 contains only the ID and table2 has id and indicator. Now, I want to update the Individual field in Table2.
    TABLE1
    ======
    ID
    -----
    A123
    A456
    A678
    A890
    
    
    TABLE2
    ======
    ID     INDI
    -----     ----
    A123     
    A456
    A678
    A890
    A666
    A898
    If the TABLE2 ID matches with ID from TABLE1 then update Individual with "MMM" of another update Individual with "OOO." How can I achieve this?

    FInal result will be...
    TABLE2
    ======
    ID     INDI
    -----     ----
    A123     MMM
    A456     MMM
    A678     MMM
    A890     MMM
    A666     OOO
    A898     OOO

    Something like:

    SQL> update tab_2 x set indi = NVL((SELECT 'MMM' FROM tab_1 WHERE id = x.id),'OOO');
    
    6 rows updated.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select * from tab_2;
    
    ID         INDI
    ---------- ----------
    A123       MMM
    A456       MMM
    A678       MMM
    A890       MMM
    B130       OOO
    C180       OOO
    
    6 rows selected.
    
    SQL> select * from tab_1;
    
    ID
    ----------
    A123
    A456
    A678
    A890
    
    SQL> select * from tab_2;
    
    ID         INDI
    ---------- ----------
    A123       MMM
    A456       MMM
    A678       MMM
    A890       MMM
    B130       OOO
    C180       OOO
    
    6 rows selected.
    
    SQL> 
    
  • ADF: Re-apply the where condition of a view object and updating table

    Hello

    I have a table for documents, with columns for the title of document, document type and so on. There is also a column called "receiver".
    In the viewobject based on the table, I have a condition that only the lines where the receiver is null should be included. In other words: only documents unassigned should be indicated in the table.

    The purpose of the page that contains the table is to assign documents to the receivers. The idea is that the user enters a name in the column of a receiver or several lines and then press a button of validation.
    When a line - a document - has been assigned to a receiver and the change is committed, this line is more fills the where of the viewobject condition and I would like my page to reflect the fact that. In other words: as soon as one or more lines have been assigned to a receiver and the changes are committed, the lines should disappear from the table and the page.

    What is the best way to achieve this?

    Kind regards
    Andreas

    To do this is to add a navigation case to the same page and use this case to navigation after validation. Should run the query again, it costs you a full page sent.

    Another way to do the validation and the use of a managed method bean to re run the iterator.

    Timo

  • How to use where condition in an update statement

    Oracle forms 6i
    Hai All

    I generate table of attendance. My name of the table is daily_attend and fields

    name varchar

    empcode number

    Date of the respondent

    Outtime date

    number of working_hrs

    Date of Attend_date

    Attend_status varchar

    So here, I calculate the hours of work of an employee by

    Update dail_att set wtime = lpad (((outtime-intime) * 24 * 60), 4, 0);

    It works great for example for one day

    When I want to do on a daily basis, I have to give in the where Clause and how I can give attend_date in where Clause

    Thank you in advance

    Srikkanth.M

    change this to more well-intentioned and reusable procedure... Remove commit inside of the procedure

    PROCEDURE W_TIME(p_date date)
    
    IS
    BEGIN
    update dail_att set wtime= lpad(((outtime-intime)*24*60),4,0)
    where trunc(attend_date) = trunc(p_date);
    
    END;
    

    and whenever you want to call it simply call

    begin
     ......
     w_time('12-APR-2010');
     commit;
    ....
    

Maybe you are looking for

  • Satellite L500-1DT - unable to read discs

    During these last days, I was unable to play all disks on my laptop but I am able to view the files on the disk. Usually they would be auto-play, but it just doesn't happen.Money is a little tight right now so I'm hoping there is a simple solution th

  • Cannot open the XMP files

    I downloaded my picture together i - pad file on my PC and several files are labeled XMP and I can't open them

  • Impossible to manually reset the Windows Update KB971058 components

    System: 32 bit, Win 7 Home Premium SP1 Problem: WU forever "check for Updates" after had to power-off because boot hung to ' installation up-to-date 68 74 "» History: Perform clean installation of Windows 7 Windows Update (WU) has stopped working on

  • Error in the installation of the new iTunes update. Windows 7, 32 bit.

    Hi all After download and save the last iTunes updated during the installation I received the message "Service"Apple Mobile Service"was able to start. Make sure you have sufficient privileges to start system services"pressing retry, I received the sa

  • The computer crashes during Gaming (BSOD) and Windows performance index

    Windows 7, 64-bit OK, so I've had this problem for weeks. Initially, I thought the graphics card was defective. When I ran the Windows experience index, it would break on the part where he is to note the graphics card. So what I did I sent to the man