delete lines with condition "<>".

Hello

I have a table named AAA who have a field called number_type:
AAA
type_ number
2000
2000
2001
2001
....
1999
1999
2001
1998
...


I want to delete all the lines that are different in 1999 and 2000. New version is:
I have a table named AAA who have a field called number_type:

AAA
type_ number
2000
2000
....
1999
1999

Ho can I do?
Thank you

ERM...

delete from AAA where number_type not in (1999,2000);

Tags: Database

Similar Questions

  • problem deleting lines with APEX$ ROW_SELECTOR

    Hello

    I write a PL/SQL procedure to remove the lines checked my tabular form. My code is:
    BEGIN
         FOR i in 1..apex_application.g_f02.count LOOP          
    
                   DELETE FROM PRODUCT_LEVELS 
                   WHERE PARENT_PRODUCT=:P36_PRODUCT_ID AND CHILD_PRODUCT=apex_application.g_f02(i) AND :APEX$ROW_SELECTOR is not null;
                   COMMIT;
                   apex_application.g_print_success_message := 'Entry deleted successfully';
    END;
    Delete all my lines when I start the process by clicking on the button Delete.

    According to the documentation: http://docs.oracle.com/cd/E23903_01/doc/ doc.41 /e21674/concept_sub.htm, the binding variable holds X if it is verified and null when disabled. So I don't know where I am going wrong.

    Would be grateful if someone could guide me gently.

    See you soon.

    Using Apex 4.1.1

    Hi, sorry for jumping in

    BEGIN

    REMOVE FROM PRODUCT_LEVELS
    WHERE PARENT_PRODUCT =: P36_PRODUCT_ID;
    COMMIT;
    END;

    I think that your code should look like:

    BEGIN
      DELETE FROM PRODUCT_LEVELS
      WHERE PARENT_PRODUCT=:P36_PRODUCT_ID
      AND CHILD_PRODUCT=:CHILD_PRODUCT; -- or whatever your column is called
    END;
    

    Unless you have a good reason to do so, I think that the use commit inside process is not necessary or a good idea...

    Luis

  • Web Forms: Deleting line based on the value of a specific column

    Hello

    I have an online form in which I want to apply delete missing on the ranks, but only on the value of the first column. So, if the first column is #missing I want the deleted row, even if the columns are given in it.

    Is it possible to do this?

    I'm on ver 11.1.2.2 Hyperion Planning

    Shehzad

    Published by: shehzad k on January 24, 2013 11:51

    Unfortunately, no. There is no way to add the delete line based SOLELY on the existence of a value in the first column. It would be nice to see some of the more advanced features "conditional delete", we en flies over to the planning of the entry forms.

    You can do the "clumsy" things with data validations where you gray - out ranks in view of the existence of a value in a particular cell, however while this might SUGGEST that the user should not enter data in a particular line, it would not PREVENT to do so.

    We have seen many improvements in form lately with the introduction of data validations. I hope the momentum continues.

    -Jake

  • How can I play files CSV lines with a different number of columns?

    Hi all

    I am trying to load CSV with DIAdem 2014 files, and I found there is a great tool, "use".

    However, with the CSV use tool, there are critical problem with my data files. (See photo)

    As you can see the CSV file attached, it includes a lot of lines with different columns.

    And here, use read the number of columns of 1st line (e.g.: 4 columns) and set it as the number of columns to read.

    So I can not load all of the data (e.g.: 53 columns) if first row data were lower than columns.

    Can anyone recommend any approach, please?

    Kind regards

    Young

    Admin 24/03/16 Note: files deleted by request of the user

    I just add a few lines of script and fix the related use. (I just added the code to get a direct look).

    The uri of the file will appear as a new kind of load in the dialog file tiara is intalled by double click

    Would be nice if you could provide some information, how the data was created. Maybe we can it add as official of our web page to use plugin.

    Option Explicit

    Void ReadStore (File)

    File.Formatter.Delimiters = «»
    File.Formatter.LineFeeds = \n
    File.Formatter.DecimalPoint = '. '.

    Dim startLine: startLine = file. GetNextLine()
    <>InStr (startLine, ' [Tenergy Bus Log Data] "" ") then
    call RaiseError()
    end if

    And that not File.Position = File.Size
    Dim groupName: groupName = file. GetNextStringValue (eString)
    If it isn't root. ChannelGroups.Exists (groupName) then
    root. ChannelGroups.Add (groupName)
    end if
    Dim grp: set grp = root. ChannelGroups (groupName)
    Dim i: i = 1
    do for real
    Dim val: val = file. GetNextStringValue (eR64)
    If isempty (val) then
    Exit
    end if
    < i="">
    dial the grp. Channels.Add ("Brand" & I, eR64)
    end if
    protected chObj: set chObj = grp. Channels (i)
    chObj.Values (chObj.Size + 1) = val
    i = i + 1
    loop
    Call File.SkipLine)
    Wend

    End Sub

  • Cannot print the printer is off line with 14 documents pending.

    Original title: Printing print HPrinter
    My printer is off line with 14 documents pending.  How can I get it online and cancel pending documents.

    Hi Helen,

    I understand that your printer is off line and there are 14 documents waiting in the queue.

    Here are a few troubleshooting steps that you can try to solve this problem.


    Method 1: Run the printer Troubleshooter and check.

    a. open the printer Troubleshooter by sliding in the edge right of the screen, tap Search (or if you use a mouse, pointing to the top right of the screen, move the mouse down and then clicking Search), entering the Troubleshooting in the search box, by typing or clicking on settings and then type or click on find and fix problems. Under hardware and sound, click use a printer.

    b. follow the steps in the resolution of the problems.

    If the method above does not work, proceed to the next method.

    Method 2: Disable the documents waiting in the queue, check the following suggestions.

    a. the key press Windows + R and type services.msc in the search field and press to enter.

    b. the Services listed, stop the print spooler service.
    (c) in Windows Explorer, navigate to the folder below and open the PRINTERS.
    C:\Windows\system32\spool\PRINTERS
    d. click on continue or Yes (if prompted by UAC) to approve the opening of the PRINTERS folder.
    e. remove all files in the PRINTERS folder, until it is empty, and then close Windows Explorer.
    Note: DO NOT DELETE the PRINTERS folder itself. Don't delete its content.
    f. open Services, and then start the print spooler service.

    Also see suggestions from the following link:

    http://Windows.Microsoft.com/en-us/Windows/printer-problems-in-Windows-help#fix-printer-problems=Windows-8&V1H=win8tab4&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

    After completing the methods suggested above, answer us with the State of the question.

  • Updating of the ADF Table strangely after delete line

    Hello

    I use ADF Table with ArrayList to the model of the collection. I do not use View object

    < af:table var = value ' row' = "#{pageFlowScope.dataBean.collectionModel}"... "

    I have a SelectOnceChoice in each row of the table and bind their values to a property of the line

    < af:selectOneChoice value = "#{row.label}"... "

    I have a command link to remove each line and the delete method:

    collectionModel.remove (idx);

    The model is correctly updated, but the table of the ADF is not. Somehow, the value of the selection of the next line is set to the value of the deleted row.

    For example: If there two select with values respectively: Foo, Bar. If I remove the line with Foo, the remaining line (initially Bar) is set to Foo.

    If I refresh (F5) the page, it appears correctly. I also tried to use addPartialTarget and partialTriggers but no help.

    Can someone help me? Thanks in advance.

    Post edited by: 2925664

    Hello

    Previously I use table binding, that's why it has that name.

    BTW, I don't know what's causing the problem. It is related to the life cycle ADF. I put the immediate = "true" for the select box and it is working fine now.

    Concerning

  • join with condition

    Hi all

    Is there a possible way to cross the join with condition?

    I want something like this:

    Table A: custid, accu_id, sum

    CustID, accu_id unique =

    CustomerID amount accu_id

    10 25 400

    10 35 447

    10 29 420

    20 30 510

    30 35 472

    .

    .

    .

    Table b: accu_id, description

    accu_id description

    shoes 25

    Book 29

    30 computer

    pen 35

    Note: in table A, it is a mismatch of the accu_id values that do not use. Please, take into account this.

    I want to see all the columns in the TABLE B for each custid in A. TABLE (something like cross join but with ONE article.) The following query does not work.

    Select * from a right join B on A.accu_id = B.accu_id;

    10-25

    10-29

    10-30

    10-35

    20-25

    20-29

    20-30

    20-35

    30 25

    30 29

    30 30

    30-35

    What should I do for this?

    Thanks in advance

    Use partition outer join:

    with a (too)

    Select double union all 10 custid, accu_id 25, amount 400

    Select 10,35,447 from all the double union

    Select 10,29,420 from all the double union

    Select 20,30,510 from all the double union

    Select double 30,35,472

    ),

    b like)

    Select accu_id 25, "shoe" description of all the double union

    Select 29, 'book' from dual union all

    Select 30, 'computer' from dual union all

    Select 35, 'pen' from dual

    )

    Select a.custid,

    a.accu_id,

    a.amount,

    b.

    a

    by (a.custid) partition

    right join

    b

    On a.accu_id = b.accu_id

    order of a.custid,

    a.accu_id

    /

    AMOUNT ACCU_ID CUSTID DESCRIPT
    ---------- ---------- ---------- --------
    10 25 400 shoe
    10 29 420 book
    10 35 447 pen
    10 computer
    20 30 510 computer
    shoe 20
    book 20
    20                       pen
    30 35 472 pen
    30 shoe
    30 book

    AMOUNT ACCU_ID CUSTID DESCRIPT
    ---------- ---------- ---------- --------
    30 computer

    12 selected lines.

    SQL >

    SY.

  • Hierarchical queries - problem with condition "begins by".

    Hi people

    I play with the connection by and start with clause and am faced with a particular problem which I can not solve...

    My data set is:

    Create table dates_q
    (start_date date,
    end_date date)
    /
    

    REM INSERTING into dates_q
    Insert into dates_q ("START_DATE","END_DATE") values (to_date('01-JAN-14','DD-MON-RR'),to_date('10-JAN-14','DD-MON-RR'));
    Insert into dates_q ("START_DATE","END_DATE") values (to_date('11-JAN-14','DD-MON-RR'),to_date('20-JAN-14','DD-MON-RR'));
    Insert into dates_q ("START_DATE","END_DATE") values (to_date('10-MAR-14','DD-MON-RR'),to_date('20-MAR-14','DD-MON-RR'));
    Insert into dates_q ("START_DATE","END_DATE") values (to_date('21-MAR-14','DD-MON-RR'),to_date('31-MAR-14','DD-MON-RR'));
    Insert into dates_q ("START_DATE","END_DATE") values (to_date('01-APR-14','DD-MON-RR'),to_date('10-APR-14','DD-MON-RR'));
    

    Now I basically just want to get your hands on hierarchical queries and working with the syntax of various...

    What I now want is, start with the date of April 1 as my start date and work backward to build my 'tree '. The condition of my tree is between two rows; my start and end dates differ from 1 day. If they do not; I don't want these records in my tree.

    And using sys_connect_by_path, I want to get all the way from the root.

    Thus, for example,.

    SELECT a.*,
           sys_connect_by_path(start_date, '|'),
           LEVEL lvl
      FROM dates_q a
     CONNECT BY PRIOR end_date = (start_date - 1)
    

    I get the following output

    START_DATEEND_DATESYS_CONNECT_BY_PATH(START_DATE,'|')LVL
    01.01.201410.01.2014| 1 JANUARY 141
    11.01.201420.01.2014| 1 JANUARY 14 | JANUARY 11, 142
    11.01.201420.01.2014| JANUARY 11, 141
    10.03.201420.03.2014| MARCH 10, 141
    21.03.201431.03.2014| MARCH 10, 14. MARCH 21, 142
    01.04.201410.04.2014|10-MAR-14|21-MAR-14|01-APR-143
    21.03.201431.03.2014| MARCH 21, 141
    01.04.201410.04.2014| MARCH 21, 14. 1 APRIL 142
    01.04.201410.04.2014| 1 APRIL 141

    But for the moment I did not have any starting point... Now comes the FUN part...

    When I give the State of departure; I get a single row :-(

    Example of

    SELECT a.*,
           sys_connect_by_path(start_date, '|'),
           LEVEL lvl
      FROM dates_q a
     CONNECT BY PRIOR end_date = (start_date - 1)
     START WITH start_date = To_Date('01-apr-2014','dd-mon-yyyy');
    

    The result is

    START_DATEEND_DATESYS_CONNECT_BY_PATH(START_DATE,'|')LVL
    01.04.201410.04.2014| 1 APRIL 141

    Just a line...!

    I'm unable to understand this and work more and need help.

    The formation of the tree works only in a 'sense' and I'm going the other way around? Don't know what it means but just something that comes to mind. :/

    Thank you

    K

    P.S. - database is 10g R2.

    Hello

    Thanks for the display of the data of the sample; It is very useful.

    What do you expect the result will be and why?

    LEVEL = 1 contains all rows that meet the condition to START WITH.  The rows that meet the condition

    start_date = To_Date('01-apr-2014','dd-mon-yyyy')

    in this case?  Only the line you actually obtained.

    LEVEL = N (where N > 1) contains all rows that meet the conditions regarding some FRONT CONNECT BY rank level = N - 1.  Since the only line level = 1 to end_date = To_Date('10-apr-2014','dd-mon-yyyy'), lines satisfy the condition

    End_date PRIOR = (start_date - 1).

    ? None.  End_date PREREQUISITE is April 10, while rows with start_date April 11 would fulfill this condition, there is no line on LEVEL = 2 and the query stops there.

    You would have expected this from your previous results.  The line with the start_date April 1 had no children in the previous application, so there no children in any application that has the same State of CONNECT BY.

    Maybe you meant the CONNECT BY condtion to be

    End_date = BEFORE (start_date - 1).

  • How to avoid duplicates on a column with condition

    Hi all

    I need some advice here. At work, we have an Oracle APEX application that allow the user to add new records with the decision of the increment automatic number based on the year and the group name.

    Said that if they add the first record, group name AA, for 2012, they get the decision number AA 1 2013 as their record casein displayed page of the report.

    The second record of AA in 2013 will be AA 2 2013.

    If we add about 20 records, it will be AA 20 2013.

    The first record for 2014 will be AA 1 2014.

    However, recently, we get a claim of the user on two files of the same name of group have the same number of the decision.

    When I looked in the history table and find that the time gap between 2 record is about 0.1 seconds.

    In addition, we have the correspondence table which allows the user admin update the sequence number start with the restraint that it must be greater than the maximum number of the current name of the current year.

    This boot sequence number and the name of the group is stored together in a table.

    And in some other case, the user can add a decision duplicate for related record number. (this is a new feature)

    The current logic of the procedure to add the new record on the application are

    _Get max record table with selected group name (decision_number) and the current year.

    _INSERT in the folder table the new record came with the decision to number + 1

    _ update sequence number of the number of the decision just added.

    So instead of utitlising the process of editing the built-in automatic table of the APEX, I write a procedure that combine all three processes.

    I have run some loop for continually perform this procedure, and it seems that it can generate autotically new decision unique number with time about 0.1 second difference.

    However, when I increase the number of entry to 200 and let two users run 100 each.

    If the time gap is about 0.01 second, double decision numbers are displayed.

    What can I do to prevent duplicate?

    I can't just apply a unique constraint here for three columns with condition because it can be duplicated in some special conditions. I don't know much about the use of lock and its impact.

    This is the content of my procedure

    create or replace

    PROCEDURE add_new_case)

    -ID just use the trigger

    p_case_title IN varchar2,

    p_year IN varchar2,

    p_group_name IN VARCHAR2,

    -decisionnumber here

    p_case_file_number IN VARCHAR2,

    -active

    p_user in VARCHAR2

    )

    AS

    NUMBER default_value;

    caseCount NUMBER;

    seqNumber NUMBER;

    previousDecisionNumber NUMBER;

    BEGIN

    -execution immediate q '[alter session set nls_date_format = "dd/mm/yyyy"]';

    SELECT count (*)

    IN caseCount

    OF CASE_RECORD

    WHERE GROUP_ABBR = p_group_name

    AND to_number (to_char (create_date, "yyyy")) = to_number (to_char (date_utils.get_current_date, "yyyy"));

    SELECT max (decision_number)

    IN previousDecisionNumber

    OF CASE_RECORD

    WHERE GROUP_ABBR = p_group_name

    AND to_number (to_char (create_date, "yyyy")) = to_number (to_char (date_utils.get_current_date, "yyyy"));

    IF p_group_name IS NULL

    THEN seqNumber: = 0;

    ON THE OTHER

    SELECT Seq_number INTO seqNumber FROM GROUP_LOOKUP WHERE ABBREVIATION = p_group_name;

    END IF;

    IF caseCount > 0 THEN

    default_value: largest = (seqNumber, previousdecisionnumber) + 1;

    ON THE OTHER

    default_value: = 1;

    END IF;

    INSERT INTO CASE_RECORD (case_title, decision_year, GROUP_ABBR, decision_number, case_file_number, active_yn, created_by, create_date)

    VALUES (p_case_title, p_year, p_group_name, default_value, p_case_file_number, 'Y', p_user, sysdate);

    -Need to update the sequence here also

    UPDATE GROUP_LOOKUP

    SET SEQ_NUMBER = default_value

    WHERE the ABBREVIATION = p_group_name;

    COMMIT;

    EXCEPTION

    WHILE OTHERS THEN

    Logger.Error (p_message_text = > SQLERRM)

    , p_message_code = > SQLCODE

    , p_stack_trace = > dbms_utility.format_error_backtrace

    );

    LIFT;

    END;

    Many thanks in advance,

    Ann

    It's easier to solve for the case, while p_group_name is not null. In this case, you update a GROUP_LOOKUP line, so that you can select to update this line at the beginning, to prevent cases of two for the same group added at the same time. To do this, change the selection of GROUP_LOOKUP to:

    SELECT Seq_number INTO seqNumber FROM GROUP_LOOKUP WHERE ABBREVIATION = p_group_name for an updated VERSION OF the SEQ_NUMBER;

    and move this to be the first thing that did the procedure - before it has CASE_RECORD lines.

    In the case when p_group_name is set to null, you have some object to be locked. I think the best you can do is to lock the entire table GROUP_LOOKUP:

    the table lock in exclusive mode GROUP_LOOKUP wait 100;

    The '100 expectation' means that he will wait until 100 seconds before giving up and trigger an error. in practice, that is expected to only wait a moment.

    Exclusive mode allows others to read, but not to update the table.

    UPDATES and the LOCK of the TABLE will be updates of other sessions wait for this transaction to validate. Queries from other sessions are not affected.

    The locks are released when you commit or roll back.

  • XMLTable to extract columns with conditional path does not

    Hello

    I am on 11.2.0.3 and I need to extract columns on a section of XML with conditions on, but I get "ORA-00907: lack the right parenthesis", so I think that the way I go about it is not supported or that I have somehow the wrong syntax or something.

    This is a very simplified what I'm trying to do (there could be several different entries in the < sets1 > and < sets2 > sections and they might be in different orders, is not as if I can always choose the first or the last):

    with sample_data as (select 1 id,
                                xmltype('<root>
                                           <sets1>
                                             <set1><set_name>name1</set_name><set_val>val1</set_val></set1>
                                             <set1><set_name>name2</set_name><set_val>val2</set_val></set1>
                                           </sets1>
                                           <sets2>
                                             <set2><set_name>name3</set_name><set_val>val3</set_val></set2>
                                             <set2><set_name>name4</set_name><set_val>val4</set_val></set2>
                                           </sets2>
                                         </root>') xml_doc from dual)
    select *
    from   sample_data sd,
           xmltable('<root>' passing sd.xml_doc
                    columns col1 varchar2(10) path 'sets1/set1[set_name=''name1'']/set_val',
                            col2 varchar2(10) path 'sets1/set1[set_name=''name2'']/set_val',
                            col3 varchar2(10) path 'sets2/set2[set_name=''name4'']/set_val') x;
    

    What I'm trying to get:

    COL1  COL2  COL3
    ----  ----  ----
    val1  val2  val4
    

    I know that I could separate the < set1 > and < set2 > nodes in their own xmltypes xmltable on it and then join them and make the necessary pivoting, etc., but when I try to start that against only 1000 lines, db do not love and ended my session! Therefore, I'm looking for a more elegant way to do it.

    Is there a way to do this in a XMLTABLE? Pointers are very welcome!

    It solves your problem of sample request and you get the output that show you.

     with sample_data as (select 1 id,
                                 xmltype('
                                            
                                              name1val1
                                              name2val2
                                            
                                            
                                              name3val3
                                              name4val4
                                            
                                          ') xml_doc from dual)
     select x.*  -- change
     from   sample_data sd,
            xmltable('/root' passing sd.xml_doc  -- change
                     columns col1 varchar2(10) path 'sets1/set1[set_name="name1"]/set_val',  -- change
                             col2 varchar2(10) path 'sets1/set1[set_name="name2"]/set_val',  -- change
                             col3 varchar2(10) path 'sets2/set2[set_name="name4"]/set_val') x;  -- change
    

    As you can see, I've marked the lines that I've changed.  The error you saw came to use two single quotes in the COLUMN XPath instead to use double quotes.  Then I changed the XPath expression in the XMLTable brackets as well.

    I'm confused on what the columns you really want overall, in terms of how you know which values you want, or did you mean that you want something random sets1 and sets2.

    You store the XML file in a column of XMLType SECUREFILE BINARY, right?  It seems that you made previous visits, but just double check.

  • Pulling on the first line with a value of repetition

    Hello
    We use the Oracle 11.1.

    We have a table of postal codes.

    We have several lines for each zip code because we have different areas that use the same zip code.

    We want to reduce the lines of a line by zip code. But they said use they want to keep the fields that differ (neighborhood of the exodus).

    Then they said "Just take the first value of each."

    This code reduces the postcodes of a line by postal code, but as you can see I replaced the field with the name of the field values.
    SELECT distinct  ZIPCODE, CITY, STATE, COUNTY, AREACODE, 'CITYTYPE', CITYALIASABBREVIATION, 'CITYALIASNAME', LATITUDE, LONGITUDE, TIMEZONE, ELEVATION, COUNTYFIPS, DAYLIGHTSAVING, PREFERREDLASTLINEKEY, CLASSIFICATIONCODE,
               MULTICOUNTY, STATEFIPS, 'CITYSTATEKEY', 'CITYALIASCODE', 'PRIMARYRECORD', CITYMIXEDCASE, 'CITYALIASMIXEDCASE', STATEANSI, COUNTYANSI
        FROM   zip_code
    GROUP BY   ZIPCODE, CITY, STATE, COUNTY, AREACODE, CITYTYPE, CITYALIASABBREVIATION, LATITUDE, LONGITUDE, TIMEZONE, ELEVATION, COUNTYFIPS, DAYLIGHTSAVING, PREFERREDLASTLINEKEY, CLASSIFICATIONCODE, MULTICOUNTY, STATEFIPS,
               CITYALIASCODE, PRIMARYRECORD, CITYMIXEDCASE, STATEANSI, COUNTYANSI
    order by zipcode; 
    How should I take either one record per postal code with the first value in these fields or

    How should I take the first record for each zip code?

    either way works for me.

    Thank you

    Hello

    This is called a Query Top - N , and this is a way to do it:

    WITH     got_r_num     AS
    (
         SELECT     z.*
         ,     ROW_NUMBER () OVER ( PARTITION BY  zipcode
                                   ORDER BY          city
                             ,                ...   -- add tie-breakers here
                           )      AS r_num
         FROM    zip_code
    )
    SELECT     *     -- or list all columns except r_num
    FROM     got_r_num
    WHERE     r_num     = 1
    ;
    

    You can simply use MIN or MAX on the columns, as the line with the name of the minimum city do not lowest have area code or the longitude. The above method preserves the first line of each zip code intact, where the 'first': the first in order of aphabetic by the name of the city. If it is not unique, then you may want breakage to the analytical ORDER BY clause.

    If you are deleting rows, you can use this in a NOT IN subquery. If you copy lines to a new table, you can use the query above in an INSERT statement.

    Published by: Frank Kulash, March 18, 2011 12:40

    I just see Polywog response:

    Pollywog wrote:
    You can use the rank or rownumber function...

    If I understand the problem, you don't want to use RANK in this particular case. When there is equality, GRADE will assign 1 to all the contenders. I think the whole point of this thread is that you exactly want a #1 in each zip code, which is what ROW_NUMBER, but not RANK, guarantees.

  • Cannot compare a line with other lines in a table... (comparison of many to many)

    Hi all..
    I am very new to PL/SQL...
    I need through through a table to compare its lines with the table with the other lines. For that I'm trying to use Pl/sql below.
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    create or replace compare()
    Declare
    VAR_HIT CHAR (1);
    SEARCH_RECORD_DATA UDB.table1%ROWTYPE;
    CANDIDATE_RECORD_DATA UDB.table1%ROWTYPE;
    CURSOR SEARCH_RECORDS_CURSOR IS SELECT * FROM UDB.table1 by registration_id;
    CURSOR CANDIDATE_RECORDS_CURSOR IS SELECT * FROM UDB.table1 by registration_id;
    BEGIN
    FOR SEARCH_RECORD_DATA IN SEARCH_RECORDS_CURSOR LOOP
    FOR CANDIDATE_RECORD_DATA IN CANDIDATE_RECORDS_CURSOR LOOP
    IF (CANDIDATE_RECORD_DATA. THE DECISION = 'P') THEN
    VAR_HIT: = 'y ';
    IF (CANDIDATE_RECORD_DATA. First_name! = 'unknown') AND (CANDIDATE_RECORD_DATA. FIRST_NAME! = SEARCH_RECORD_DATA. FIRST_NAME) THEN
    VAR_HIT: = 'n';
    ELSIF (CANDIDATE_RECORD_DATA. Last_name! = 'unknown') AND (CANDIDATE_RECORD_DATA. LAST_NAME! = SEARCH_RECORD_DATA. LAST_NAME) THEN
    VAR_HIT: = 'n';
    ELSIF (CANDIDATE_RECORD_DATA. BIRTH_DATE! = 'unknown') AND (CANDIDATE_RECORD_DATA. BIRTH_DATE! = SEARCH_RECORD_DATA. BIRTH_DATE) THEN
    VAR_HIT: = 'n';
    ELSIF (CANDIDATE_RECORD_DATA. GENDER EQUALITY! = 'U') AND (CANDIDATE_RECORD_DATA. SEX! = SEARCH_RECORD_DATA. SEX) THEN
    VAR_HIT: = 'n';
    ELSIF (CANDIDATE_RECORD_DATA. FATHER_NAME! = 'unknown') AND (CANDIDATE_RECORD_DATA. FATHER_NAME! = SEARCH_RECORD_DATA. FATHER_NAME) THEN
    VAR_HIT: = 'n';
    ELSIF (CANDIDATE_RECORD_DATA. MOTHER_NAME! = 'unknown') AND (CANDIDATE_RECORD_DATA. MOTHER_NAME! = SEARCH_RECORD_DATA. MOTHER_NAME) THEN
    VAR_HIT: = 'n';
    END IF;
    IF(VAR_HIT='y') THEN
    INSERT IN THE UDB. VALUES OF (REGISTRATION_ID, SEARCH_ID, HIT_CANDIDATE_ID, SEARCH_DETAILS, CANDIDATE_DETAILS) BIO_DI_HIT_RESULT (SEARCH_RECORD_DATA. REGISTRATION_ID, SEARCH_RECORD_DATA. EGM_NO, CANDIDATE_RECORD_DATA. EGM_NO, VAR_SEARCH_DETAILS, VAR_CANDIDATE_DETAILS);
    UPDATE UDB. SET BIO_RECORDS_DEMOGRAPHICS = A DECISION ';
    END IF;
    END IF;
    END LOOP;
    commit;
    END LOOP;
    END;

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Outer loop works well (it is raversing throughout the table) is (say by 8000 saves 8,000 times)
    But Enner loop does not work fine e.i. it runs just for 8000 times for 8000 records. While it must run more time then 8000...
    Can someone help me...
    Is the way to use two cursor on a table to compare each line of the report is correct? :(

    >

    But even once come with a problem more in the part of sql, I shared. It does not cover part of my State... :(
    --> If the secondary search field are 'unknown' this field (please AVI single field not as search folder) will not be considered as search criteria.
    But in my current sql, all the side of any field research as "unknown" is not even taken to search for any candidate for other fields match.

    Try to change all the terms in this way (I show here only how to change a condition):

    Instead of:

    AND (SEARCH.BIRTH_DATE!='unknown' AND CANDIDATE.BIRTH_DATE IN (SEARCH.BIRTH_DATE,'unknown'))
    

    Use this one:

    AND (SEARCH.BIRTH_DATE = 'unknown' OR CANDIDATE.BIRTH_DATE IN (SEARCH.BIRTH_DATE,'unknown'))
    

    In the case of the search.birthdate condition will be 'unknown', it will be ignored, otherwise this condition will be used.

  • How to make "In line with text" as default option

    I use 5.6 Pages to deal with certain documents that have a lot of pictures. When I paste an image of the document, the default option of "skin" for the image is "automatic", I have to manually change the "inline with the text" option each time and drag it to the right place, it's extremely frustrating. Is it possible to put "in line with text" as default option when I paste a picture?

    Hello RCN,

    Click in the text where you want the image to be inserted.

    Dough.

    If the focus is on the text, the image will be stick like 'Move with text;' if emphasis is placed on an object (eg. an image that does not move with the text), the image will stick like "rest on the Page.

    Kind regards

    Barry

  • Thunderbird slow to delete emails with attachments

    Using the version of TB 38.3.0
    Thunderbird so slow to delete emails with attachments.

    Did a comparison test with same jpg attachment in Windows Mail. Instant deletion.

    With the help of TB, takes 15 to 30 seconds or more.

    What I tried to solve this problem:

    1. disabled modules
    Result: No difference

    2. disabled my antivirus program (using MS Security Essentials)
    Result: No difference

    3.. .and oh, I forgot to mention that I tried this:

    https://support.mozilla.org/en-US/kb/ca ... e-messages

    Result: No difference

    Help is appreciated,

    T in THE (Lethbridge, Alta.)

    Excellent. You can then mark the thread as "Solved" Please?
    Thank you.

  • cannot delete photos with indicator.  help, please.

    I can't delete photos with indicator.  help, please. Thank you. Dick

    Can't stop without context and details

    What version of the OS (you say OS X 10.8.5 - is that correct?) and iPhoto or PHotos?

    What has changed since it worked?

    LN

Maybe you are looking for

  • Malwarebytes - do I need anything else (security tips)

    Hello ladies and gentlemen, Apple Support Forums! I have a few questions about this great little Mac Mini on my desk. Coming from a Windows background, I have a bit of inherent paranoia that needs a bit of smoothing. I have read about the security of

  • How to transfer messages from the Inbox to another mailbox?

    I need all the messages in my Inbox that I do not delete to access a specific mailbox. An alternative is to send all incoming messages directly to this mailbox. I can't find a way in the preferences to do this. Is there a way? Reason: Inbox is not sy

  • Nidll.TLC, was eliminated for the dll system RT?

    I am currently trying to call some model (*.mdl) in LabVIEW to transform the models of the dll.  The models are manufactured and converted with Mathworks Simulink and LabVIEW I intend to open via call library function node of the dll.  So far, I've d

  • He's stopped rotating screen a1

    My screen stopped rotating. Went to settings/display and the screen auto-sotate is grayed out and canoe be checked. Any suggestions?

  • To automatically reconnect Bluetooth

    Hi, I have a vi that connects to a Bluetooth transceiver and collects and plots / stores incoming data. The connection is initiated by the user on the front panel.  However, sometimes LabVIEW gives me a connection error, sometimes it's once an hour,