Number of rows different when add/remove the same table

Hello
I have a problem in a select statement.
My database is a 9.2.0.8.
select *
from  tab1 t1,
        tab2 t2,
        tab2 t3
where t1.id_c1 = 1
   AND t1.id_c2 = t2.id_c2
   AND t1.id_c2 = t3.id_c2
   AND t2.id_init = 3693
   AND t3.id_init = 3892;

936 rows selected.
If I change the query to:
select *
from  tab1 t1,
        tab2 t2
where t1.id_c1=1
   AND t1.id_c2 = t2.id_c2
   AND t2.id_init in ( 3693,3892);

61132 rows selected.
Any ideas? What's wrong??
TNX

Published by: 842366 on 3.10 there / 10/2011

Published by: 842366 on 3.10 there / 10/2011

T2.id_init in (3693,3892);

T2.id_init of means is 3693 or 3892. It's the same as:

t2.id_init = 3693 OR t2.id_init 3892;

While the first request was:

T2.id_init = 3693 AND t3.id_init = 3892;

SY.

Tags: Database

Similar Questions

  • Add/Remove the same exact point from a drop down list

    Hello!

    I need power remove/hide and/add/view THE SAME POINT, or that it doesn't look like the same question, please see the example of what I m doing:

    When you open the document:

    01.png

    If you click 'Yes' to the first radio 4 value is added

    02.png

    If you click 'Yes' in the second radio, value 5 is added

    03.png

    If you click 'no' on the first radio, you remove the value 4 BECAUSE you remove the element #3

    04.png

    If you click on 'no' on the second radio, you delete nothing 4 BECAUSE you try to delete the point #4


    05.png

    And then you get this weird combination

    06.png

    This is the code on the first Radio

     form1.#subform[0].value_4::click - (JavaScript, client)

    if (this.rawValue == "1") {
         DropDownList1.addItem("value 4");
    }else {
        DropDownList1.deleteItem(3);
    }

    This is the code on the second radio

     form1.#subform[0].value_5::click - (JavaScript, client)

    if
    (this.rawValue == "1") {
           DropDownList1.addItem("value 5");
    }else {
           DropDownList1.deleteItem(4);
    }

    Anyone know how to remove a specific item of a dropdrown? or may not remove, hide only if this is possible... I tried to change specific values for Add/Remove always from the same point, but it did not work.

    Thank you!

    Ago, I find it odd that there is no native method xfa for the index of an item in the menu drop-down. Not documented at least (as I know).

    What you can do however, is create your own method!

    Here, in the initialize event of your highest subform you create a method that exends class object (which includes all XFA objects too), like native JavaScript:

    //@para String value of the item in the drop down
    //@return Boolean - true if item was deleted, false if not and null object if not found in the list
    
     Object.prototype.deleteItemValue=function(sVal){
     for (var a=0;a
    

    You can remove any item from your drop by modying your code:

    if (this.rawValue == "1") {
     DropDownList1.addItem("value 4");
    }
      else {
     DropDownList1.deleteItemValue("value 4");
    }
    

    Kyle

  • How can I align two different text lines in the same table in two different directions (centered on one and one on the left)?

    Hello

    I want to focus the two different text lines that are in the same table, but one on the Center and the other on the left. I put a < span > tag in the hope that he was overwhelmed the family of police .bottomsel table class properties and the. Police-family Cig84 and color but the text-align only: they are both on the left.

    Here is my source and CSS codes:

    Source:

    < table width = "600" border = "0" >

    < b >

    < class td = "bottomref" > < p > < span class = "bottomsel" > | < a href = "index.html" target = "_self" > Main < /a > | " < a href = "about.html" target = "_self" > on < /a > | " < a href = "clients.html" target = "_self" > customers < /a > | " < a href = "contact.html" target = "_self" > Contact < /a > | " </span > < br / >

    < span class = 'credits' > credits: < span class = "Cig84" > Cig84 </span > < / span > < /p > < table >

    < /tr >

    < /table >

    CSS:

    {.bottomsel}

    text-align: center;

    do-family: Georgia, "Times New Roman", Times, serif;

    }

    {.credits}

    text-align: left;

    }

    . {Cig84}

    Color: #F00;

    do-family: "Comic Sans MS", cursive;

    }

    Use tags to paragraph with CSS classes.

    CSS:

    . Center {text-align: center}

    .the {text-align: left}

    HTML:

    This text is centered

    This text is left-aligned

    Nancy O.

  • ValueChangeListner do not get fired when I entered the same value after you remove the first.

    Hello world

    Can anyone help on this.

    JDeveloper version 11.1.1.7

    I use '< af:inputText >' with valueCaangeListner.

    Here as soon as I entered a value, valueChangeListener get fired...

    Problem:

    When I remove the and I entered the same gain value in the text entry box, ValueChangeListner do not get fired.

    When I came again, a value different valueChangelistner get me fired.

    Kind regards

    Malenfant.

    What you say is logic and sense, you enter 500 then delete 00 then add 00 in inputText perspective there is no change in place, therefore, the converter does not occur because there is no changes occur.

    To do something like that you can do a work around using javascript. You can follow these steps:

    1. Select af:inputText and bind it to the backbean

    
    

    2 - Add clientListener and serverListener inside inputText as:

    
        
        
        
    
    

    3 - Add handelEnterButton as javascript method:

    function handelEnterButton(event)
    {
      var code=event.getKeyCode();
      if (code==13)
      {
         var source = event.getSource();
         AdfCustomEvent.queue(source,"serverListenerOperations", {}, false);
      }
    }
    

    4. in the method of serverListener back bean refresh as inputText component:

      public void serverListener(ClientEvent clientEvent)
      {
        RequestContext.getCurrentInstance().addPartialTarget(getMyInputTextComponent());
      }
    

    5. now, try to change something in the inputText and then press enter

  • Add/Remove the effect with CSS

    Hello

    I'm trying to implement some sort of entry in my application validation. I expanded TextField to accept only the entry with a number of characters and corresponding to a regular expression. When the regular expression match falls, I want textfield to have an innershadow, and he does. However, the effect is not removed when I remove the CSS class where this effect is defined.

    setOnAction(new EventHandler<ActionEvent>(){
                @Override
                public void handle(ActionEvent e) {
                    if(!getText().matches(restrict.get())) {
                        getStyleClass().add("invalid");
                    }
                    else {
                        getStyleClass().remove("invalid");
                    }
    
                    for(int i=0; i<getStyleClass().toArray().length; i++) {
                        System.out.println(getStyleClass().toArray()[i]);
                    }
                }
    

    .text-field.invalid {
        -fx-border-color: indianred;
        -fx-effect: innershadow(gaussian, indianred, 5, 0.5, 2, 2)
    }
    

    The style class "invalid" appears in the table when the entry is not valid. The class is removed successfully, but not the effect. How can I fix it? Do I need to set the effect in code and no CSS?

    Have you tried this:

    .text-field.invalid {
        -fx-border-color: indianred;
        -fx-effect: innershadow(gaussian, indianred, 5, 0.5, 2, 2)
    } 
    
    .text-field {
        -fx-border-color: indianred;  // change to some other color maybe transparent or use null
        -fx-effect: null
    } 
    

    Could be he you pls tell me how to use the CODE tags.

    Post edited by: jojorabbit

  • my iphone 5 c screen stops working when I remove the case

    my iphone 5 c screen stops working when I remove the case

    Delete this case? Please explain what you ask a little more clear.

  • Nb505 shuts off when I remove the charger

    for some reason any my Toshiba netbook mb505 turns off when I remove the AC adapter / charger netbook. I can go on the netbook when its plugged in. I also see that the charger is plugged and not to charge and is 99%. If anyone can help it would be appreciated.

    Are you using the original Toshiba AC adapter?

    Looks like the battery or motherboard has a problem and may need repair to a Toshiba repair center.

  • am adding memory when I remove the battery I have to pay in order to get the full charge of her

    am adding memory when I remove the battery I have to pay in order to get the full charge of her

    N ° but see:

    About the batteries in the modern Apple laptops

    Battery Universityy

    Apple laptops - batteries-

    Apple - Batteries

    Extending the life of your laptop battery

    MacBook and MacBook Pro-Mac reduced the speed of the processor when the battery is removed when using an adapter A - C

    Apple laptops-calibrate the battery in your computer for optimal performance

    County of Mac Laptops-determining battery cycle

  • Let me know scenarios when different virtual machines with the same UUID are created in VMware Hypervisors?

    Let me know scenarios when different virtual machines with the same UUID created in VMware Hypervisors, aside from editing the .vmx file?

    The only other way I've seen is when you manually copy the virtual machine to another location on the data store (or another data store) and then when turn on/off the virtual machine, select I moved, rather that I copied it (the default option).  This will keep the same UUID.

  • My old laptop is dying. When I tried to install Photoshop elements 7 on my new laptop, he told me that the serial number is not valid. It's the same number that I used before. What gives?

    My old laptop is dying. When I tried to install Photoshop elements 7 on my new laptop, he told me that the serial number is not valid. It's the same number that I used before. What gives

    I think that this program is covered in the link below

    CS2 (or earlier version) activation server has disappeared, then read below

    You MUST use the special version and the serial number on the page, not your original drive or serial number

    l http://helpx.adobe.com/x-productkb/Policy-Pricing/Creative-Suite-2-activation-end-Life.htm

    NOTE that CS2 will not install on a Mac "modern", and when you install the special version of the PPro2 on a Win7 or Win8 or Win10 computer, you may need to right click on the program icon and select Windows XP compatibility in the popup of option

  • Mobile side.  Using the drop down of your video.  I once put some text on the Mobile page the Menu drops down, but behind the image.  When I remove the text box the menu works correctly.  This also happens with a HTML code placed to Paypal.

    Mobile side.  Using the drop down of your video.  I once put some text on the Mobile page the Menu drops down, but behind the image.  When I remove the text box the menu works correctly.  This also happens with a HTML code placed to Paypal.

    Please check layers panel and put in place the menu item in the list, you can use the layers panel and move up or attempt to move the content.

    If there is still the same, then download a few screenshots of the design view.

    Thank you

    Sanjit

  • Why layer handles disappear when I remove the absolute positioning in the style sheet

    Why layer handles disappear when I remove the absolute positioning in the style sheet, and I can't shift the most in the property inspector. Thank you, bryan

    Layers are positioned absolutely. That's what their positioning coordinates
    makes them "layers."

    Once they are positioned absolutely (via the CSS details), they are
    withdrawn from circulation of the code of the page and 'float' on the page, as a
    overlay, which appear when the code indicates to start (from top left
    then, coordinate height x width).
    That's why you can drag the around anywhere you like view creation with
    layer handles - details are updated in the CSS by DW by dragging
    your mouse.

    Once you remove the absolute positioning, they are regular

    elements in
    the flow of the page with a height and width. So DW deletes the handles as well
    they cannot be dragged around because he no longer has all the details to
    update in the CSS.

    --
    Concerning

    John Waller

  • Report with multiple columns NUMBER of counts of the same table

    I am new to discoverer, so I'm a little lost.

    I work to create a report to show usage data and Knowledge Base of e-business. I have written using subqueries in SQL query that is in the format:

    Solution number | Soultion title | Solution views. Positive feedback | Negative feedback
    Title of 12345 _ 345 _ 98 34


    The entries 'Views', 'Positive' and 'Negative' are stored in the same table, so I do a count where setid = setid and usedtype = VS, then count where usedtype = usedtype and PF = NF

    Discoverer, I can get the number of solution, the title and THE totals but I can't seem to understand how to get an ACCOUNT for three different things from the same table in the columns on the same line.

    When I go on change map-> select the items once I select the option NUMBER of the UsedType column in the CS_KB_SET_USED_HISTS table, I can't select it again. I also found way now to add a column based on a query entered.

    If someone could help it would be much appreciated.

    Thank you

    Published by: Toolman21 on December 2, 2010 14:17
    _ to correct spacing added.

    Hello
    You can separate the column with a case or decode.
    for example to create 2 calculations:

    case
    When usedtype = "PF".
    then - that contain both
    0 otherwise
    end

    case
    When usedtype = 'NF '.
    then - that contain both
    0 otherwise
    end

    After that, you can create the aggregation count on those.

    Tamir

  • Update of several rows of the same table using trigger

    Hello

    I have the following table

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

    CREATE TABLE ATT_PERMISSIONS
    (
    DATE OF PRMONTHYR,
    EMPIDNUMBER (10)DEFAULT VALUE 0,
    FROMDATETIMEDATE,
    TODMTFDATETIMEDATE,
    NUMBER OF PERMMINS (3),

    SSLINASTRETCH NUMBER (3).

    PERMATTINELIGIBLENUMBER (1)DEFAULT VALUE 0
    );

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

    I want to update the column PERMATTINELIGIBLE in the same table when each line is inserted.

    I created following trigger for that

    CREATE OR REPLACE TRIGGER SSL_AFTER_UPDATE AFTER UPDATE ON ATT_PERMISSIONS

    FOR EACH LINE

    BEGIN

    Update ATT_PERMISSIONS set PERMATTINELIGIBLE =

    (

    SELECT THE CHECK BOX

    WHEN PERMMINS < = 60

    or

    (

    PERMMINS < = SSLINASTRETCH

    AND

    COUNT (CASE WHEN PERMMINS = 0 THEN NULL OTHERWISE 1 END)

    COURSES (PARTITION BY empid, prmonthyr) < = 1

    )

    THEN 1

    0 OTHERWISE

    END

    FROM ATT_PERMISSIONS where prmonthyr =:new.prmonthyr, empid =:new.empid

    ) where prmonthyr =:new.prmonthyr, empid =:new.empid;

    END;

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

    That is to say.

    When a row is inserted the PERMATTINELIGIBLE of all records for this employee for the month is recalculated.

    There would be only two or three records for an employee for a month.

    PERMMINS is the number of minutes to use as short leave.

    If it is less than 60 is eligible for the bonus to attendance for this employee.

    If this isn't normally the date is not eligible for the attendance for this employee premium.

    but an exception is that if a short leaves of DISP employee allowed a month (IE. ( SSLINASTRETCH ) in a straight line, IE. one day, that day is eligible for the bonus of presence.

    That is to say. Why the number of short leaves in a month is taken. If it's one and done minutes use is lower to SSLINASTRETCH, then the day is eligible for the attendance bonus.

    But when I try to create the trigger I get error, PL/SQL: ORA-00907: missing a right parenthesis.

    Help, please

    I use oracle 10g

    I want to update the column PERMATTINELIGIBLE in the same table, when each row is inserted.

    No - you do NOT want to do in a trigger.

    You cannot query the same table that the trigger is activated on. -C' is a MUTANT and you will get an exception.

    When a row is inserted is recalculated to the PERMATTINELIGIBLE of all the records for that employee for that month.

    There would be only two or three records for an employee for a month.

    PERMMINS is the number of minutes to use as short leave.

    If it is less than 60 is eligible for the bonus to attendance for this employee.

    If is not normally the day is not eligible for the premium of attendance for this employee.

    but an exception is that if a short leaves of DISP employee allowed a month (IE. SSLINASTRETCH) in a straight line, IE. one day, that day is eligible for the bonus of presence.

    That is to say. Why the number of short leaves in a month is taken. If it's one and done minutes use is less than SSLINASTRETCH, then the day is eligible for the bonus of presence.

    But when I try to create the trigger I get error, PL/SQL: ORA-00907: missing a right parenthesis.

    You can not do in a trigger. Even if correct you this error of syntax, you will get the exception that I mentioned above.

    Oracle is a multi-user system. Other users can modify the same table that you use.

    So even if you could try to interview "all the records for this employee" some of them may be locked if other users access them. Also, an insert statement could try to insert two rows for an employee and the trigger could not have seen the other lines still.

    If you want to work with data SETS (all records for an employee), you must write the PL/SQL code that LOCKS all lines updated to prevent others to interfere.

    Then you make your operations but NOT in a trigger. Perform inserts and then use an UPDATE query to set this value.

    Then VALIDATE to unlock the lines.

  • Update lines with the info from the other rows in the same Table.

    I'm trying to update the lines with the information of the same table. The table is loaded with information from a report that runs and there must be a new entry every month, but I would like to bring some of the info from the last month. This statement below works but updates all rows in the new load table and in my test case, I only did a few game only like 5 files need to get updates. It is an example of what I'm trying to do. If I add this (C2. COL_INVC_ID = C1. COL_INVC_ID) until the last "* where *" statement get an invalid identifier for 'C2 '. COL_INVC_ID ". So what I'm doing wrong here? How can I update only the lines where also in recent months run?

    Thanks in advance for any help!

    ------------
    Update OpenIssues OI1
    Together (OI1. NUM, OI1. Status, OI1. Code, OI1. LastModifiedDate) =
    (Select ios2. NUM, ios2. Status, ios2. Code, ios2. LastModifiedDate
    Of OpenIssues ios2
    Where OI2.num = OI1.num and ios2. TableLoadDate = TO_DATE (January 31, 2012 00:00:00 ',' ' the HH24: MI: SS DD/MM/YYYY)
    )
    Where and OI1. TableLoadDate = TO_DATE (February 29, 2012 00:00:00 ',' ' the HH24: MI: SS DD/MM/YYYY)
    ------------


    SQLMe

    As Frank suggested merger is much effective here, go...

      create table  temp
    as(
    select 1 eno, 1 amt , sysdate load_date from dual union all
    select 1 eno, 2 amt , add_months(sysdate,1) load_date from dual union all
    select 2 eno, 1 amt , sysdate load_date from dual union all
    select 2 eno, 2 amt , add_months(sysdate,1) load_date from dual
    );
    
    merge into temp t
    using (select eno, amt, load_date
             from temp
            where trunc(Load_Date) = TO_DATE('05/30/2012', 'MM/DD/YYYY')) s
    on ((s.eno = t.eno) and trunc(t.Load_Date) = TO_DATE('06/30/2012', 'MM/DD/YYYY'))
    when matched then
      update set t.amt = s.amt;
    commit;
    
    select * from temp;
    

Maybe you are looking for