Insert selected in several checked uncheck the delete record

Hi all

I have a detailed block I add a checkbox not database once check the records is inserted into the temporary table

the same records uncheck the box delete records

IAM has inserted when checking the records of the table

but when I have a check only check all records are deleted in my temporary table

WHEN-BOX-CHANGE

declare

v_app_user_id integer (10);

number of v_count;

Start

v_app_user_id: = dtc_util.get_global_value('dtc_global.user_id');

go_block ('RULE_ITEM');

premier_enregistrement;

loop

SELECT count (1) in the dtc_rule_item_lock v_count

where rule_item_id =: rule_item.rule_item_id;

If Checkbox_Checked ('rule_item.checkout') and v_count = 0 then

insert into dtc_rule_item_lock values (:rule_item.rule_item_id, v_app_user_id, sysdate);

ELSIF: RULE_ITEM. BOX = 'n' then

DELETE FROM dtc_rule_item_lock

where exists (select 'x' from dtc_rule_item dtcl

where dtcl.rule_item_id =: rule_item.rule_item_id);

end if;

When the output: system.last_record = "TRUE";

next_record;

end loop;

premier_enregistrement;

If form_success or sqlcode = 0 then

message ("documents saved successfully in the database '");

message (' ', no_acknowledge);

FORMS_DDL ('COMMIT');

on the other

message ("error saving documents: ' |") SQLERRM);

message (' ', no_acknowledge);

end if;

end;

Let me help you for this

Thank you

Olivier

I guess there is the clause does not. You check against dtc_rule_item, I guess that is dtc_rule_item_lock.

Tags: Oracle Development

Similar Questions

  • A field using text to check/uncheck the check box

    Hello

    I have a series of boxes in my form. I tried to get it then one of the automatically active boxes / turns off if the text is entered or completely removed from a text field.

    I can get to "verify" when the text is entered, but nothing I've tried is "uncheck" when the text is deleted and the field is empty.

    The most logical script I've tried seems to be this...

    In the event of changing a text field (checkbox (called 'other') both the text field are wrapped in the subform even):

    If

    ((this.rawValue! = "") |) (this.raw.Value! = "null")) {

    other.rawValue = "1";

    }

    else {}

    other.rawValue = '0 '.

    }

    This verification when a character of text entered in the field, but not clear when they are deleted. I tried to reverse so the 'if' was rawValue '0' (using == instead of! =) around two ways in the case of 'exit' - and the other was rawValue '1' - new 'check' but not 'uncheck the box. I tried all combinations of if / if and if/else I can think of.

    I know I must be missing something obvious, but anyone could explain why it does not work, and how I can the script to make it work?

    Thank you!

    TW

    Try this on the change of the textfield event.

    var txtLength = xfa.event.newText.length;

    If (txtLength > 0) {}

    CheckBox1.rawValue = "1";

    }

    else {}

    CheckBox1.rawValue = '0 '.

    }

    I hope this helps.

    -Rambeau.

  • Tree with hierarchical function to check/uncheck the checkbox

    Hello

    I build a tree with checkbox APEX 3.2 feature

    My query tree looks like
    Select "SERVICE_ID' id
    "PARENT_ID" pid
    , The name of 'service_name '.
    connection null
    APEX_ITEM. CheckBox(1,SERVICE_ID) a1
    null a2
    of ' #OWNER # '. " SERVICES_TEST ".
    Start with "SERVICE_ID" =: P9_TREE_ROOT
    connect prior "SERVICE_ID" = "PARENT_ID".

    So far so good. The tree displays correctly

    Now my requirement is check_all_child/uncheck_all_child when the parent is checked/unchecked.

    Let's take an example like

    ROOT
    -SERVICE1
    -SERVICE1_CHILD1
    -SERVICE1_CHILD2
    -SERVICE2
    -SERVICE2_CHILD1
    -SERVICE3

    If SERVICE1 is checked, then SERVICE1_CHILD1 and SERVICE1_CHILD2 must be verified.

    Could someone help me please on how to do it?
    I can write a function onchange against the box, but I need to check/uncheck hierarchically and the hierarchy is dynamic.

    Please let me know if any other information is required.

    Amri,
    Try the following

    $('[name=f01]').click( function() {
      this_checked = this.checked;
      this_row = $(this).parents('tr:first');
      this_level = this_row.children('td').size();
      next_row = this_row.next();
      /* Loop through next rows and use the no: of columns to identify children */
      while ( next_row && ( next_row.children('td').size() > this_level) )
      {
       next_row.find('[name=f01]').attr('checked', this_checked );
       next_row = next_row.next();
      }
    })
    

    I tested it only on the code of html Tree you posted earlier

  • check for the delete operation

    Hi all

    I'm a deletion of a table. How can I check if the removal of deleted rows?

    Thanks in advance
    BN

    I'm guessing that you want to check SQL ROWCOUNT % immediately after the DELETE statement (if you are not in a PL/SQL block when you issue DELETE it, your API client probably has a different appeal for this information).

    BEGIN
      DELETE FROM some_table
       WHERE some_column = some_value;
    
      IF( SQL%ROWCOUNT = 0 )
      THEN
        dbms_output.put_line( 'No rows were deleted' );
      ELSE
        dbms_output.put_line( 'We deleted some rows' );
      END IF;
    END;
    

    Justin

  • Selection of several columns in the variable of a string

    Hi all

    Is there a trick how to select the values of all columns in a single variable of type varchar?

    Consider that une_table has 5 columns of data type VARCHAR or NUMBER.

    DECLARE

    vvc_String VARCHAR2 (1000);

    BEGIN

    SELECT * INTO vvc_String une_table;

    END;

    /

    Thanks for the tips.

    Use dynamic SQL statements:

    SQL > CREATE TABLE UNE_TABLE
    2 AS
    3. SELECT *.
    4 OF DEPT
    5 WHERE ROWNUM = 1
    6.

    Table created.

    SQL > DECLARE
    2 vvc_String VARCHAR2 (1000);
    3 v_stmt varchar2 (10000);
    4 BEGIN
    v_stmt 5: = Q'[select "]';
    6 for v_i to (select column_name from user_tab_columns where table_name = 'Une_table"of order of column_id) loop
    7 v_stmt: = v_stmt | ' || ' || V_I.column_name;
    8 end of loop;
    9 v_stmt: = v_stmt | "to une_table";
    10 run immediately v_stmt
    11 in vvc_String;
    12 dbms_output.put_line (vvc_String);
    13 END;
    14.
    10ACCOUNTINGNEW YORK

    PL/SQL procedure successfully completed.

    SQL >

    SY.

  • question [10g] Simple on the selection of a column in the same record as the value min

    I have the sample data to illustrate my question:
    CREATE TABLE     t_1
    (     c_a     VARCHAR2(1)
    ,     c_b     NUMBER(2)
    ,     c_c     DATE
    );
    
    INSERT INTO     t_1
    VALUES('A',1,SYSDATE);
    INSERT INTO     t_1
    VALUES('A',2,SYSDATE+1);
    INSERT INTO     t_1
    VALUES('A',3,SYSDATE+2);
    INSERT INTO     t_1
    VALUES('A',4,SYSDATE+3);
    INSERT INTO     t_1
    VALUES('B',3,SYSDATE+6);
    INSERT INTO     t_1
    VALUES('B',4,SYSDATE+7);
    INSERT INTO     t_1
    VALUES('B',5,SYSDATE+8);
    I have the following query, which lets me select the ikram value that corresponds to the minimum value of c_b grouped by are. In other words, my goal is: for each value in are, I want the ikram value that corresponds to the minimum value of c_b.
    SELECT     t1.c_a
    ,     t1.c_c
    FROM     t_1 t1
    ,     (
         SELECT      c_a
         ,      MIN(c_b)     AS min_c_b
         FROM      t_1
         GROUP BY c_a
         ) t2
    WHERE     t1.c_a     = t2.c_a
    AND     t1.c_b     = t2.min_c_b
    ;
    This query works, but I wonder if there is a better way to do it. Something without a subquery? I can't get to what anyone else... It's just a bit tedious with my real data, as there are probably 10 columns of data instead of 3 has. (1 single minimum value but still).

    Use the KEEP FIRST / LAST function, grouping, that is to say:

    with t_1 as (select 'A' c_a, 1 c_b, sysdate c_c from dual union all
                 select 'A' c_a, 2 c_b, sysdate + 1 c_c from dual union all
                 select 'A' c_a, 3 c_b, sysdate + 2 c_c from dual union all
                 select 'A' c_a, 4 c_b, sysdate + 3 c_c from dual union all
                 select 'B' c_a, 3 c_b, sysdate + 6 c_c from dual union all
                 select 'B' c_a, 4 c_b, sysdate + 7 c_c from dual union all
                 select 'B' c_a, 5 c_b, sysdate + 8 c_c from dual)
    -- end of mimicking your t_1 table, see SQL below:
    select c_a, min(c_c) keep (dense_rank first order by c_b) c_c
    from   t_1
    group by c_a;
    
    C_A C_C
    --- -------------------
    A   21/07/2011 16:41:46
    B   27/07/2011 16:41:46
    

    NB. the min (ç_ç) is to choose what the lowest value of the ikram should there be more than one row returned for the first c_b. You can max (ç_ç) instead, according to your needs. (If are, c_b is unique, you can use either.)

  • Email address used for the deleted record

    A couple of years ago, we bought adobe Acrobat pro 10. My Secretary has registered the software from his email address. She has since left the company and its address has been deleted. I have a new computer and cannot download the software because the email address used for registration is no longer valid! I have the serial numbers and the license certificate. Can someone help me.

    Thank you

    Peter

    I don't know what are your terms of organization, but I think that you could recreate the e-mail address so that it can be used.  I know that I can create sub-accounts for my own e-mail service.

    Aside from that, you might be able to download the demo version of the software directly via the site linked below and then use your current serial number to activate it.

    Don't forget to follow the steps described in the Note: very important Instructions in the section on the pages of this site download and have cookies turned on in your browser, otherwise the download will not work correctly.

    http://prodesigntools.com/tag/DDL

  • Select several CSS classes simultaneously (was: how to select multiple css rules at the same time?)

    Hello!

    I have Dreamweaver 8

    I tried to select several css rules at the same time create a css stylesheet, but I don't know how to do it!

    This man do in this video at 03:00

    http://www.YouTube.com/watch?v=ZbQ3GTFC-O0

    Thank you!

    DW8 does not support the selection of several classes in the properties panel.  I'm sure that this feature appeared in the exit of the CS6.  Unless you upgrade to CC or CS6, you must do this manually in your code.

    Nancy O.

  • BlackBerry Z10 configure my Outlook sync but you must disable synchronization with the sent, drafts and deleted records

    When I go into settings it greys these they are already registered.  So I chose to sync all e-mail files, assuming that I could disable the files already sampled, but it only allows me to select folders additional vs uncheck the existing folders.

    Help!

    Jason

    Hello and welcome to the community!

    To work properly and transparently, be sync these files all the time. As you write a message, it must be auto registration in the drafts folder and synchronization on the server to prevent the catastrophic device failure. Similarly, sent items must be constantly placed on your server because it is a necessary function. Similarly with the elements removed (although there may be separate issues).

    Suffice it to say that, if the box is already checked, AND it is grayed out, then you cannot affect the adjustment.

    Good luck!

  • Multi-selects search form break when the screen is Exact = true

    I came across a problem where selecting 'Vascular' in a drop-down list in my webapp search form also returned results 'Non-vasculaire '.

    After some research, I found adding "& Exact = true" at the end of the form action has solved this problem.

    I have then proceeded to re - test the selection of several elements of the multiple selection and submit the form. I got exactly zero results. I chose the two elements of the multiple selection separately and returned the results twice. I took the & Exact = true back out and retested select multiple items and received my results once more.

    Does anyone know how build the search engine so that I can prevent the search within words and allow also my multiple selection dropdowns to work properly?

    Also, I think that this behavior that I'm experiencing is a bug. Could an Adobe employee submit a bug report if yes please?

    Thank you!

    Well you do but you select two things for 2 custom fields, he'll get both, neither, or in this case. It's simply not how does the search in British Colombia. Maybe they will bring improvements to the search, but which will correspond to the server load etc which is probably why it was not the door.

  • Materialized Oracle view | Deleting records, Oracle materialized view

    One question reg Materialized views.

    If as part of the interview of the Source database, we remove some (older) recordings, the materialized view will also be updated with the deletion?

    I believe that the answer is Yes. In this case make sure that deletion is not the case?

    Is there anyway that we'll stop MView update to delete records that is inserted once even if we remove the same records in the source DB?

    This is a common scenario, especially with materialized views that summarizes the detail data where you want to keep the summary but not the detail, and it is discussed in the documentation.

    The technique is to make the MV refresh on request, delete the data in the detail tables and the CONSIDER_FRESH procedure to prevent the changes propagating to the MV. You will probably find it in the docs by searching on DBMS_MView.Consider_Fresh. There are a few caveats to note, in my opinion.

  • Format the first and the last record of query result

    Hello
    I have the following query

    < tt > select 1 seq, "This is the first record" data from dual union of all the
    Select 2, 'Data ' | tNom tab Union all
    Select 3, "It was last last record" double
    order by 1 < /tt >

    When I have the coil this summary to a listfile with col seq noprint option I get:

    This is the first record
    Data MLA_ACCESS_LIST
    Data MLA_APPLICATIONS
    Data MLA_VPD_PCK
    Data MLA_VPD_TABLES
    It was the last last record

    But I want to:

    It's first record MLA_ACCESS_LIST
    Data MLA_APPLICATIONS
    Data MLA_VPD_PCK
    MLA_VPD_TABLES it was save finally last record

    I tried with 1 statement with the use of lead and lag, because first and last record stand the other result record. But I get ORA-30484: lack of specification of the window for this function

    Is this possible with 1 statement or am I've sentenced to modify the results by myself?

    Thank you Auke

    Select row_number() case above (tNom control)
    When 1 then 'it's the first record
    end | tNom |
    -case row_number() over (order by desc tNom)
    When 1 then 'it was the last record. "
    end
    tab
    order by tNom

    HTH

  • When "allow pages to choose their own colors, instead of my selections above" is not checked in the menu options, I can't see images on Web sites. How can I maintain with the box unchecked and always display images?

    I recently decided to spend autour colours in Firefox. I work in a fairly dark environment and have the dark color on white or light background text is quite difficult on my eyes in the dark.

    I changed the background to a dark gray, light gray text and visited the two and links not visited in a blue light. With these changes, I unchecked the "allow pages to choose their own colors, instead of my selections above" box.

    After unchecking the box, I'm more able to display images on many sites. Turn all grey images - as if Firefox has changed their image in part of the background. When I check the box, I am able to see fine pictures, however, Web sites typically return to their light background with dark text.

    Any help and assistance with this is greatly appreciated!
    Thank you!

    You can use the NoSquint extension to define the font size (zoom text/page) and colors of text on web pages.

  • How to delete several items at the same time. need to highlight or check multiple items? I am referring to the Tablet Surface.

    I would like to empty deleted and unwanted records. Is there a way to select all!

    I do not know how to select everything, but you can scan slightly with your finger from left to right in each email that you want to remove, each in turn will be darker and get a check mark. Select the delete icon in the upper right and remove all these selected emails.

  • How to add and delete a hidden gross a table while checking and unchecking the box?

    I want to add an array of 1 * 1 or saw just a cell with the text field, when I check the box and remove the same when I uncheck the checkbox. I have tried almost everything, but doesn't show is not the correct result. Can someone Guide please?

    Hello shahnisarg28,

    I think you can get what you want by simply using the Action Builder provided by the program.

    Make you it visible to the cell when the checkbox is enabled by:

    1. you right-click the checkbox, select Actions - Add Action.

    2. you set

    Condition: When the check box is selected

    Result: (show or hide an object) = the visibility of visible cell salt

    You do the hidden or invisible cell when the checkbox is unchecked by:

    1. you right-click the checkbox, select Actions - Add Action.

    2. you set

    Condition: When the checkbox is unchecked

    Result: (show or hide an object) = set the cell visibility to hidden.

    Tell me if that works for you.

    Kind regards

    David.

Maybe you are looking for

  • SR_FF

    Dear all... I saw a bit of headache with this tour of the mine. I understand the flip flop that I use I based on NOR doors because the Set and Reset are active high. When R = 1, U4 should light up. When S = 1, U3 should light up. But in my case, the

  • I received a phone call that is supposed to be from Microsoft

    Original title: Error Messages I received a phone call that is supposed to come from Microsoft (foreign accent) and telling me that error and messages of warning in the workstation had to be deleted or I was running a risk of piracy.  I hung up becau

  • T61 Bluetooth not pair w / Wiimote (Wii remote) with 5.5.0.5800

    I try to use a wiimote for an implementation of the elecronic whitebaord. (wiimoteproject.com). the wiimote does not use an access key to the pair. If one is given, it will not pair. I just downloaded the last stack of BT and now version 5.5.0.5800.

  • Need help to get the drivers on my new E520

    Hi, I just got my new ThinkPad E520. I bought new without any OS. I just installed Windows 7 Professional 64-bit, but now I have a problem because there is no drivers and I can't connect to WIFI to download drivers (as the wlan drivers are not instal

  • Call answer blackBerry with SMS Q10 Q10

    Hello! I've updated my Q10 to OS 10.2 and I don't know how to respond to a text message when I can't talk. To be more precise, I heard on the new OS 10.2 If someone calls and I wan't to reject this call and automatically sent a message text... to say