Doubt in precedence

hello,
i have a doubt in the order in which a sql query will execute.
when there are joins and where conditions in an sql query, which would be executed first? the joins or the where conditions??
Regards,
Roopa.

you can generate an execution plan and read it to see how Oracle intends to execute a query, something like
SELECT STATEMENT     ALL_ROWS     
  SORT(AGGREGATE)     
     HASH JOIN
       INDEX(FAST FULL SCAN) FEE_INDX1
       INDEX(FAST FULL SCAN) FIE_INDX1generally you go in as far as you can, then out again so the first one read should be FEE_INDX1, then FIE_INDX1. If other items existed you would then go down to the next operation and repeat the process until you are done.

Similar Messages

  • Operator Precedence Doubt

    public class PrecedenceEx {
         public static int m(int i) {
              System.out.print(i + ", "); return i;
         public static void main(String s[]) {
                  m(m(1) - m(2) + m(3) * m(4));
    Output is : 1, 2, 3, 4, 11
    I used operator precedence and got 3, 4, 1, 2, 11
    Why is operator precedence not applicable here.

    Operator precedence is applicable.
    m(1) + m(2) * m(3)
    In the above, precendence does NOT mean that m(2)*m(3) is executed before m(1). Expressions are evaluated left to right. Precedence simply means that the * binds more tightly than the +, so that it's like
    m(1) + ((m(2) * m(3))
    rather than
    (m(1) + m(2)) * m(3).
    So m(1) is evaluated first, then m(2), then m(3), then the results of m(2) * m(3) are computed, and the result of that is added to the m(1) that was computed previously.

  • Price condition precedence

    Hi,
    We have two Price condition types in a pricing procedure
    1) ZPRO
    2) ZP01
    When a condition record is found in ZP01, it takes precedence over condition type ZPRO.
    Is there any way we could configure this other than condition exclusion functionality ?
    Regards,
    Pavan

    Pavan,
    Maintain your ZP01 as the main condition for reference to any thing. Make the other one as statistical purpose only.
      Now the main step is maintain an alternative formula for ZP01 condition, here in the formula check whether a condition record was found for ZP01, if not copy the condition record of the condition type ZPRO.
    Hope it solves your doubt.
    Don't forget to reward points if useful.
    Regards,
    Ajai.

  • Doubt About GPO - Security Zones

    I have Windows Server 2008 R2 and GPOXX with settings about Security Zones and run normally.
    I need create another GPOYY with settings about Security Zones different than GPOXX.
    My doubt is: When I create GPOYY and my settings won't occur conflict in my GPOXX? I don't can problem in my environment production in my GPOXX.
    Thanks a bunch!

    Hi,
    >>My doubt is: When I create GPOYY and my settings won't occur conflict in my GPOXX?
    As long as the settings we configure don't conflict with each other, there won't be conflict between GPOs. If the setting in GPOYY and GPOXX conflict with each other, saying we enable a setting in the former GPO and disable the same setting in the latter
    GPO, then there will be conflict and the GPO processed at last will be the winning GPO for applying the setting.
    Regarding group policy precedence, the following article can be referred to for more information.
    Group Policy processing and precedence
    http://technet.microsoft.com/en-us/library/cc785665(v=ws.10).aspx
    Best regards,
    Frank Shen

  • Operator precedence

    Hello,
    I was going through someone else's code today, and found something I didn't quite understand. The code fragment is as follows:
        for (int j = 0; j < count / 2; j++)
            k = j + 1;
            for (m = 0; m < height; m++)
              for (n = 0; n < width; n++)
                arrayOfInt[j][(m * width + n)] = imgpixels[(m / k * k)][(n / k * k)];
            (snip)
          }Now, most of it, I think I understand, apart from the line:
    arrayOfInt[j][(m * this.width + n)] = imgpixels[(m / k * k)][(n / k * k)];
    - how is Java interpreting the algebra in the square brackets? For the first set of square brackets, is it [m/(k*k)] or is it [m*k/k]? This latter one doesn't make any sense, as the k's would cancel leaving just m.
    I've looked at precedence of the operators and found that *, / and % are given equal precedence, so what is going on here?

    875465 wrote:
    - how is Java interpreting the algebra in the square brackets? For the first set of square brackets, is it [m/(k*k)] or is it [m*k/k]? This latter one doesn't make any sense...Probably because it isn't possible.
    Java will never re-order operators, it will only use predecence to evaluate one set before another, so in the case above the only two possible interpretations are:
    <tt>(m / k) * k</tt>   or
    <tt> m / (k * k)</tt>
    In fact it will use the first, because * and / have the same precedence, so evaluation works from left to right, which indeed looks like a roundabout way of saying 'm'.
    However, since we don't know what the types of n, m, and k are, it's difficult to speculate what the effects are; it could also be a roundabout way of saying 'nearest multiple of k'.
    On the other hand, it could also be
    1. It's a horrible piece of code (my opinion).
    2. They actually intended it to be <tt> m / (k * k)</tt>.
    Which is why it's usually a good idea to explicitly bracket your code and remove all doubt. The only place that sort of stuff belongs is in SCJP tests.
    Winston

  • Doubt in fbl1n transaction

    hi i have a doubt....
    in fbl1n transaction, there are open items and cleared items.
    in it the cleared items  for certain document types such as invoice etc is not present in the open item table (bsik)
    however the cleared items for document types such as general  voucher its present in the open items table (bsik)
    is this possible as all cleared item entries shld b present in the open item table with an indicator set for cleared or not...
    plz exlain!

    Hi
    There are 2 tables(open and Closed Items)  in FI for Account Payables and Account Receivables and GL accounts
    1.Account payables: BSIK is Open Items and BSAK is Closed items
    2.Account Receivables; BSID and BSAD for OPEN and closed items
    3/GL accounts :  BSIS and BSAS  for Open and Closed Items
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Doubt in creation of a new object

    Hi All,
                 I have one doubt in creation of a new object.If a new object is to be created and it is not a subtype
    of any existing object, then what should we enter in the Program field for creating the object?
    I hope I am clear with my question.
    Thanks in Advance,
    Saket.

    Hi Saket,
    Following will be required for created a custom business object.
    1. Object Type - ZTEST (Internal Techincal Key)
    2. Object Name - ZTESTNAME (Technical Key Name)
    3. Name - TEST (Name of BO, it is used while selecting the object type)
    4. Description - (Short Description of BO)
    5. Program - ZTESTPROGRAM (ABAP program in which the methods of the object type are implemented)
    6. Application - A or B.. etc (Area to which your BO is related)
    Please remember that you can learn these basic things by giving F1 help on those fields and in HELP.SAP.COM.
    Regards,
    Gautham Paspala

  • Doubt in sender mail adapter

    Hi Everyone,
    Can we read and validate the attachment of the mail.If so how to do it.
    Thanks in advance,
    Sakthi

    Hi Sakthi,
       Please refere the below links:
      http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/bf93409c663228e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0d/52b240ac052817e10000000a1550b0/frameset.htm
    Let me know if you have any doubts regarding this.
    Thanks,
    sekhar.

  • PI' RFC  Connection pool  doubt.

    Hi PI exports:
    i have a doubt about  pi' RFC  Connection pool ,pi RFC receive channel can set the conn pool size ,but when start the rfc receiver channel ,is there always only one Connection  pool ,or there is only one Connection  pool  instance?
      thinks
    Edited by: kevin liang on Oct 19, 2009 6:45 AM

    Hi,
      Connection poolins size means how many number of connection you want to make open to send data to ECC, We can define maximum number of connection in Receiver RFC Adapter,Go to additional parameters section and define Max Number of connection give the number there,thats it.Internally it works as Connection poolin mechanism.
    Regards,
    Raj

  • Small Doubt Regarding SY-MANDT

    Hi All,
         SELECT changenr FROM cdhdr CLIENT SPECIFIED INTO CORRESPONDING FIELDS OF TABLE it_cdhdr
                                             WHERE mandant = syst-mandt
                                             AND   objectclas = 'MATERIAL'
                                             AND   objectid   = wa_matl-matnr
                                             AND   tcode      = 'MM02'.
         I have written the select stament as shown above.
         In this i have a doubt like adding a field sy-mandt  in the where condition will increase the Efficiency of program or not.
    regards,
    raghu.

    Hi..
    No doubt the efficency would be affected but from business point of view there will many  things that need to be checked as in:
    If you are viewing data from CDHDR and CDPOS which is client specific then you are not viewing complete data.
    These tables give us and document changes made to a particular object in SAP but if anything is cross client like company code(lets assume) then changes to it wont be visible in all the clients..
    so there can be some key information you can miss out while working on some of the objects.
    else in this case its good to make query cross client.
    regards
    vishal

  • Doubts with control break statements on internal table loops (AT/ENDAT)

    Hi, i've had a couple of doubts for a long while which I hope someone can clarify today:
    1) I know how to use the AT statements, however, i'm not sure I get correctly what this part of help regarding this commands means:
    <i>"The control level structure with internal tables is static. It corresponds exactly to the sequence of columns in the internal table (from left to right). In this context, the criteria according to which you sort the internal table are unimportant."</i>
    I've always sorted the internal table before the control break and it works that way. For example:
    SORT ITAB BY EBELN EBELP.
    LOOP AT ITAB.
      AT NEW EBELN.
    *   Code for the order header
      ENDAT.
    ENDLOOP.
    If I <b>don't</b> sort the internal table, it doesn't work! (i get dupplicated processing). In the example, if i have more than one register with the same EBELN and they're not consecutive, the header gets processed twice. I really don't get that part of the help text.
    2) I know this: <i>"At the start of a new control level (i.e. immediately after AT), the following occurs in the output area of the current LOOP statement:
    All character type fields (on the right) are filled with "*" after the current control level key.
    All other fields (on the right) are set to their initial values after the current control level key."</i>
    My doubt is: WHY is that this way? Because sometimes (most times) I need those fields INSIDE the statement! So when that happened i've solved it in one of three ways:
    LOOP AT ITAB INTO WA_ITAB.
      WA_ITAB_AUX = WA_ITAB.
      AT NEW FIELD.
        WA_ITAB = WA_ITAB_AUX.
    *   ...Rest of the code for the first register
      ENDAT.
    ENDLOOP.
    LOOP AT ITAB INTO WA_ITAB.
      AT NEW FIELD.
        READ TABLE ITAB INDEX SY-TABIX INTO WA_ITAB.
    *   ...Rest of the code for the first register
      ENDAT.
    ENDLOOP.
    * (Without AT)
    LOOP AT ITAB INTO WA_ITAB.
      IF WA_ITAB-FIELD <> FIELD_AUX.
        FIELD_AUX = WA_ITAB_FIELD.
    *   ...Rest of the code for the first register
      ENDIF.
    ENDLOOP.
    Is there any problem with this way of coding? Can be done better?
    Thank you very much in advance.

    Hi..,
    1)
    See if u sort the table on a field on which u r using AT ENDAT .. then all the records which are having the same value for that field will form a group or those reocrds will be at one place.. so when u sort the table for all the records  AT ENDAT  will get executed onli once..
    If u dont sort this table on this field then all these records will be at different places and in between there may be records with different value for this field.. so this AT ENDAT will get executed for each record !!
    2)
    No u cannot use the Right hand fields of the field in the table .. Because these AT events work as Group based operations... So till that field on which AT ENDAT is working it breaks that record into two groups.. One is the left hand fields including that field.. and right hand fields as another group.. and makes the right hand group as stars ****.  Thats y u can observe that even any one field in the left hand group changes the AT ENDAT will get executed  !!!!
    Hope u understood !!!
    regards,
    sai ramesh

  • LOOP DOUBT INSIDE  PACKAGE

    CREATE PACKAGE EMP_PKG AS
    CURSOR EMP_CUR IS
    SELECT EMPNO,DEPTNO,SAL,HIREDATE
    FROM EMP
    WHERE DEPTNO=30;
    PROCEDURE P_EMP;
    PROCEDURE P_GET_SAL(V_EMPNO NUMBER);
    PROCEDURE P_GET_LOC(V_EMPNO NUMBER);
    Now inside my Package Body
    INSIDE THE MAINPROCEDURE P_EMP
    I WILL BE CALLING THE BELOW TWO PROCEDURES
    PROCEDURE P_EMP
    BEGIN
    FOR I IN EMP_CUR LOOP
    P_GET_SAL(I.EMPNO);-- DO I NEED TO LOOP AGAIN IN P_GET_SAL PROC?
    P_GET_LOC(I.DEPTNO);
    END LOOP;
    END;
    NOW WHAT IAM DOING IS
    in my P_GET_SAL Procedure is
    PROCEDURE P_GET_SAL(V_EMPNO NUMBER)
    V_SAL EMP.SAL%TYPE;
    BEGIN
    FOR I IN EMP_CUR LOOP
    SELECT SAL INTO V_SAL FROM EMP
    WHERE EMPNO=I.EMPNO --DOUBT HERE
    END;
    I WANT TO KNOW WHETHER I NEED TO LOOP AGAIN
    HERE OR INSTEAD OF THAT
    PROCEDURE P_GET_SAL(V_EMPNO NUMBER)
    V_SAL EMP.SAL%TYPE;
    BEGIN
    SELECT SAL INTO V_SAL FROM EMP
    WHERE EMPNO =V_EMPNO;
    END;
    SINCE iam calling V_EMPNO WITH CURSOR FROM MY
    MAINPROCEDURE ..
    WILL THE PROCEDURE USES THE CURSOR VALUES
    AND LOOP ITSELF FOR EVERY EMPLOYEE TO
    GET THE SALALRY ?
    PLEASE LET ME KNOW SINCE MY PACKAGE IS MORE THAN 3000
    LINES I cant proceed unless its confirmed i can
    do so ..

    Hi all,
    Thanks for Looking into my Problem
    I Got answer by MySelf ..i dont need to loop again my sub procedures
    if i try to do that iam getting the error
    ERROR at line 1:
    ORA-06511: PL/SQL: cursor already open
    Thank you all once again ..

  • Doubt on Rows and Coloums in BEx Query Designer.

    Hello, Experts.
    I have a Doubt in BEx Query Designer.
    In the Rows I have a Fiscal year Period,  if the user enters the Fiscal year period for e.g. : 001/2006  .  
    in the columns i have  forecast for the Fiscal year period which user entered ( 001/2006 ),   and we have another column pervious ( Prior )fiscal year period ( 001/2005 ). 
    My Questions is ,  as we are Restricting with 001/2006 will the query retrieve the values of 2005 or not?
    Thanks in Advance .
    Sharp

    yes i am  Doing Offest.
    I moved this Fiscal year Period to Free char,   and i Restricted with Pervious Fical Year period and Fical year period .  it worked.  but
    when i kept this in Rows and deleted Previous Fiscal Year period .  it is displaying blanks.   in prior years forecast.
    is it because i am Ristricting it to only fical year period  which user entered
             Colums-->  Forcast ( User Entered year )          Prior year
    Rows
    Fiscal year period
      Fiscal year period( user enterd )
    Thanks

  • AND OR precedence in JOIN ON condition

    Hi Guys,
    I have a small operator precedence problem.
    the last part of my LEFT OUTER JOIN clause looks like this:
    ON bsch.key# = aknl.key# AND aknl.month =  bsch.month
    The above works fine, but there are some cases that need an addition
    ON bsch.key# = aknl.key# AND aknl.month =  bsch.month OR aknl.month =  add_months(bsch.month,-1)
    The problem is that when I add the extra OR the records that I get without the extra OR dont appear
    anymore. I need to introduce some precedence here. When it works without the OR i.e. the normal AND clause
    and the = operator then use that first and foremost. Only in case it does not, use the OR clause condition.
    Can someone help me with that?
    Regards,
    metalray
    Edited by: metalray on 23.05.2012 02:03

    It looks like you want
    ON ((bsch.key# = aknl.key# AND aknl.month = bsch.month) OR (aknl.month = add_months(bsch.month,-1)))
    and if you don't want the default precedence, just use ()
    Sybrand Bakker
    Senior Oracle DBA

  • Doubt regarding facebook integration for windows phone 8.1 silverlight app?

    Hi,
    I am developing a windows phone 8.1 silverlight application . For my application I integrated the facebook login. For this facebook integration I used the login with facebook app method.
    My doubt is after getting the app id from the dev center , I updated the appid at developers.facebook.com , wmmanifest.xml (In extensions protocol (msft-appid without dashes)) . Or do I need to change the product id in the place holder also , I tried to
    change the productid also but I am getting error like some signature is wrong try with different signature. I am confused how to do it .
    Any help,
    Thanks...
    Suresh.M

    Hi Suresh,
    According to your description, I assume you want to complete facebook configuration in windows phone silverlight app. Please refer to the following link to see how.
    http://facebooksdk.net/docs/phone/config/.
    You can find code sample from
    https://github.com/facebook-csharp-sdk/facebook-winclient-sdk/tree/master/Samples.
    Facebook API is third-party library and it is our of our support range. You can post questions on here.
    https://github.com/facebook-csharp-sdk/facebook-winclient-sdk/issues.
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
    the survey.

Maybe you are looking for