Order of operations with parentheses

I have a query which returns unexpected results. I feel that when parentheses are included that they override the precedence of the operators. If this is the case, the NOT_EQUAL_CHECK must be the negation of the EQUAL_CHECK, right? 10.2.0.4 on a machine using in AIX.
WITH src AS
    (SELECT 'T' AS var1, 'T' AS var2 FROM dual
    UNION ALL
    SELECT 'T' AS var1, 'F' AS var2 FROM dual
    UNION ALL
    SELECT 'T' AS var1, NULL AS var2 FROM dual
    UNION ALL
    SELECT NULL AS var1, 'F' AS var2 FROM dual
    UNION ALL
    SELECT NULL AS var1, NULL AS var2 FROM dual
    )
  --
  --
  SELECT   nvl(var1, 'NULL') AS var1,
      nvl(var2, 'NULL') as var2     ,
      CASE
        WHEN((var1 = var2) OR (var1 IS NULL AND var2 IS NULL))
        THEN 'T'
        ELSE 'F'
      END AS equal_check,
      CASE
        WHEN NOT((var1 = var2) OR (var1 IS NULL AND var2 IS NULL))
        THEN 'T'
        ELSE 'F'
      END AS not_equal_check
    FROM src
    ORDER BY var1,
      var2;

VAR1   VAR2   EQUAL_CHECK   NOT_EQUAL_CHECK
-------------------------------------------
NULL   F      F             F
NULL   NULL   T             F
T      F      F             T
T      NULL   F             F
T      T      T             F

The reason is

NOT ((var1 = var2) OR (IS NULL var1 AND var2 IS NULL))

If var1 and var2 is null then var1 = var2 is unknown

Now unknown or FALSE = unknown---> NOT (unknown) = false

He documented I did not find tom even explain it

Tags: Database

Similar Questions

  • Order of operations

    What is the best order of operations to perform an upgrade of RAM, upgrade the OS and firmware update on a freshly wiped Macbook?

    The laptop in question is a Macbook version 7.1; 2.4 GHz; 250GB, 2x1GB RAM.

    I have the installation discs for Snow Leopard.

    I want to upgrade to El Capitan, and I would like to install 16 GB of RAM (2X8GB), I understand that this model can accept 16BG despite the specs from Apple.

    The System Profiler indicates that the firmware is not the latest version, which is believe is necessary for the 16 GB of RAM to work.

    To update the firmware, I would need to install it (temporarily) Snow Leopard, correct? And then should I upgrade the RAM, then the OS? Or is there a better order?

    Thanks for any idea.

    a. install the original OS first to see if that works correctly.

    b. then update the firmware, and it should work correctly after that too.

    c. now you can go after your wishes, without slipping questions with you:

    install more RAM using 2x8GB modules of the correct specifications (PC3-8500 (1066 MHz) of 204-pin DDR3 SO-DIMM) have a good brand, Crucial research or OWC.

    Use the mac and see if everything is still OK.

    4. all applications you want to use to ensure compatibility with ElCapitan 10.11.6 research:

    Search developer sites, a general site that helps (not always) is roaringapps.com

    5. check the operation of your Apple ID.

    6. download ElCapitan since the Appstore. You can make a bootable stick with Setup on this topic, if you have a backup before installing ElCapitan in the Applications folder. Then install ElCapitan and enjoy.

    Lex

  • Order of operations for PIX

    I intend to migrate from ducts in the ACL, and I'm interested to know the order of operations.

    Lets assume that I have access list on the external interface that allows the packet HTTP & HTTPS to the Web server. However, on the DMZ interface I encouraged only SMTP packets.

    Do I need to allow packets to the Web server on the DMZ interface?

    Can't control the before State of ACL table PIX?

    (Please let me know if there is any document which deals with the order of operations.)

    Thank you.

    I'm a little confused by your example, but I think I know what you're looking for.

    Yes, the PIX search a connection exstablished front of LCD. Therefore, if the package has been allowed in through the ACL on your external interface on a server web DMZ, the answer would automatically be allowed. You must enable explicitly all traffic through the ACL on the interface DMZ that you wanted to come (initiated, this isn't an answer) of the web server on the DMZ. For example, open a web browser on the web server itself should be allowed.

    And ACL have a higher priority than the pipes so mix are not a good idea (just an info).

    Scott

  • Order of operations NAT on Site to Site VPN Cisco ASA

    Hello

    I have a question about the order of operations NAT on Site to Site VPN Cisco ASA 8.2.x. I have a scenario where the internal IP address of the range 10.17.128.x are NATTED IP public 31.10.10.x. below is the config:

    Tunnel normally passes traffic to dmz - 31.10.11.10, 31.10.11.11 servers.

    But the servers NATTED (10.17.128.x <->31.10.10.x) does not work.

    inside_map crypto 50 card value transform-set ESP-3DES-SHA

    tunnel-group 100.1.1.1 type ipsec-l2l

    tunnel-group 100.1.1.1 General-attributes

    Group Policy - by default-PHX_HK

    IPSec-attributes tunnel-group 100.1.1.1

    pre-shared key *.

    internal PHX_HK group policy

    PHX_HK group policy attributes

    VPN-filter no

    Protocol-tunnel-VPN IPSec svc webvpn

    card crypto inside_map 50 match address outside_cryptomap_50

    peer set card crypto inside_map 50 100.1.1.1

    inside_map crypto 50 card value transform-set ESP-3DES-SHA

    inside_map crypto 50 card value reverse-road

    the PHX_Local object-group network

    host of the object-Network 31.10.11.10

    host of the object-Network 31.10.11.11

    host of the object-Network 31.10.10.10

    host of the object-Network 31.10.10.11

    host of the object-Network 31.10.10.12

    host of the object-Network 31.10.10.13

    host of the object-Network 10.17.128.20

    host of the object-Network 10.17.128.21

    host of the object-Network 10.17.128.22

    host of the object-Network 10.17.128.23

    the HK_Remote object-group network

    host of the object-Network 102.1.1.10

    inside_nat0_outbound list extended access permitted ip object-group PHX_Local-group of objects HK_Remote

    ACL_INSIDE list extended access permitted ip object-group PHX_Local-group of objects HK_Remote

    ACL_OUTSIDE list extended access permitted ip object-group HK_Remote-group of objects PHX_Local

    outside_cryptomap_50 list extended access permitted ip object-group PHX_Local-group of objects HK_Remote

    Route outside 102.1.1.10 255.255.255.255 30.1.1.1 1

    public static 31.10.10.10 (Interior, exterior) 10.17.128.20 netmask 255.255.255.255

    public static 31.10.10.11 (Interior, exterior) 10.17.128.21 netmask 255.255.255.255

    public static 31.10.10.12 (Interior, exterior) 10.17.128.22 netmask 255.255.255.255

    public static 31.10.10.13 (Interior, exterior) 10.17.128.23 netmask 255.255.255.255

    He started to work when I did another group of object by name PHX_Local1 and added to the list of access inside_nat0_outbound, instead of the object group PHX_Local, as below:

    the PHX_Local1 object-group network

    host of the object-Network 31.10.10.10

    host of the object-Network 31.10.10.11

    host of the object-Network 31.10.10.12

    host of the object-Network 31.10.10.13

    No inside_nat0_outbound access list extended only to allowed ip object-group PHX_Local-group of objects HK_Remote

    inside_nat0_outbound list extended access permitted ip object-group PHX_Local1-group of objects HK_Remote

    Can you please help me understand why group object PHX_Local failed with access-list inside_nat0_outbound, but he began to work with the Group of objects PHX_Local1.

    Also, if you could tell me the order of operations to NAT via VPN Site to Site, it would be useful.

    Thank you

    Kind regards

    Thomas

    Hello

    I think you could have said the original question in a way that could be missleading. In other words, if I understand now.

    From what I understand now, you have the DMZ set up the server that are measured with a public IP address on the real servers. And for those that you have configured NAT0.

    Then you have other servers that do not have public IP addresses themselves, but they are translated on the SAA.

    If this is the case, then the next question would be. The server with the NAT should attend the L2L VPN connection with their real IP or address IP NAT.

    Of course if you configure static NAT for the same servers and NAT0 the NAT0 will always win.

    You have these guests who were not able to use the VPN L2L

    31.10.10.10 10.17.128.20

    31.10.10.11 10.17.128.21

    31.10.10.12 10.17.128.22

    31.10.10.13 10.17.128.23

    IF you want them to go to the VPN L2L with their original IP address then you must configure

    object-group, LAN

    host of the object-Network 10.17.128.20

    host of the object-Network 10.17.128.21

    host of the object-Network 10.17.128.22

    host of the object-Network 10.17.128.23

    object-group, REMOTE network

    host of the object-Network 102.1.1.10

    inside_nat0_outbound list extended access allowed ip-group of objects LOCAL object-group remote

    outside_cryptomap_50 list extended access allowed ip-group of objects LOCAL object-group remote

    IF you want to use the L2L VPN with the public IP address, then you must configure

    object-group, LAN

    host of the object-Network 31.10.10.10

    host of the object-Network 31.10.10.11

    host of the object-Network 31.10.10.12

    host of the object-Network 31.10.10.13

    object-group, REMOTE network

    host of the object-Network 102.1.1.10

    outside_cryptomap_50 list extended access allowed ip-group of objects LOCAL object-group remote

    EDIT: in this case you naturally do not configure any NAT0 for actual IP addresses we want precisely the IP addresses to be visible to the L2L VPN with the IP NAT address.

    Or you can of course use the same "object-group" as currently but change the content in an appropriate manner

    Be sure to mark it as answered if it was answered.

    Ask more if necessary

    -Jouni

  • What is the order of operations

    Where can I find the order of operations that are evaluated by the Oracle database? I mean, for example, for a query like this:

    Select an element, rank on (partition of order in...) r

    from t1, t2

    where t1.x = t2.x

    and t2.other_something = 'value '.

    order by 1;

    We can say that: "order by" going to last, "rank" works on lines after that the paintings are "United" and "selected". So in a sense, there is an order of operations. I understand that the actual order of operations when execution can be different if optimizer concludes on an equivalent, alternative execution plan. But what is a sort of operations of op "basic" order Oracle follows "to understand" the request even before trying to understand the alternative form. Is there such a list of order of operations?

    Thank you

    Hello

    946279 wrote:

    Where can I find the order of operations that are evaluated by the Oracle database? I mean, for example, for a query like this:

    Select an element, rank on (partition of order in...) r

    from t1, t2

    where t1.x = t2.x

    and t2.other_something = 'value '.

    order by 1;

    We can say that: "order by" going to last, "rank" works on lines after that the paintings are "United" and "selected". So in a sense, there is an order of operations. I understand that the actual order of operations when execution can be different if optimizer concludes on an equivalent, alternative execution plan. But what is a sort of operations of op "basic" order Oracle follows "to understand" the request even before trying to understand the alternative form. Is there such a list of operations?

    Thank you

    No, I've never seen any kind of official list like that, no doubt because, as you say, the optimizer does not follow these rules; the optimizer has done what he thinks is the fastest way to get the results that you specified.

    It may be useful to imagine things in the following order:

    1. Subqueries
    2. Joins (including the join in the WHERE clause conditions)
    3. PIVOT and UNPIVOT
    4. START WITH and CONNECT BY clauses
    5. WHERE clause
    6. Clause GROUP BY and aggregate functions
    7. HAVING clause
    8. Analytic functions (for example, RANK)
    9. ORDER BY clause

    Again, this has the same relationship to what actaully goes according to the drawings of atoms you see in science books have to the real atoms.  It can help you to remember (for example) that an analytic function (n ° 8 in the list above) may rely on an aggregate function (#6), but not vice versa.

    Yet once, SQL is not a procedural language, and the optimizer does not actually follow a rule of procedure like this.

  • RemoteObject order of operations

    I need help understanding the order of operations in Flex. I have an initApp() function that is called in the attribute of the tag in the Application creationComplete. Inside this function, I try to call four different methods of a single RemoteObject and then move the tables returned each RO function to another function that combines all of the tables.

    (see code below)

    The problem occurs in the assembleTreeArray function because none of the tables being moved in have something in them.

    When I throw in a bunch of breakpoints and step by step application, I noticed that the whole function initApp() runs before the RO result handler functions are called. With that being the case, when can I run the assembleTreeArray function?

    Thanks for the advice or nudges in the right direction.
    -Scott

    You have four calls to the remote object, each of which will return in no particular order and asynchronously.

    The functions of result can each call assembleTreeArray. assembleTreeArray can test to see if the four ArrayCollections are available (non-null) and when they are it can assemble the table.

  • Help! You are ordering photo book with pictures 1.0.1

    I can't finish my order a photobook with pictures 1.0.1 (urgent!)

    I have compiled, press BUY BOOK, move to the system asking me to you connect using my ID Apple (OK) and it starts to 'ALLOW' then stops and asks me to enter my Apple (OK) registered credit card security code.

    I enter this info, then get a message that says "the credit card associated with this Apple ID is assigned to the Bank of Australia. If you change the store, you will need to place the order again. »

    As I checked the store "Australia" in the preferences of Photos AND have an Australian listed billing/shipping address I hit continue.

    When exactly does nothing... the retractable window disappears and the process seems to have cancelled itself.

    What I am doing wrong?

    Re-enter all your account information, including payment information (do not check but just go)-usually that can solve these questions

    LN

  • Why? Reminders app does ' t order of tasks with a priority higher on top more.

    Reminders app does ' t order of tasks with higher on top priority. First of all he did, now he doesn't. On my iMac and iPhone. Do I have to change the settings?

    On the Mac, look at the view menu. Select sort by, and then priority.

    I think that the iPad and iPhone reminders program takes its look at a landmark of the computer.

  • Can I connect a link more MXI for PXI-1033 card in order to work with it

    Ladies and gentlemen,

    Tell me please that I can plug a card of MXI link more in the PXI-1033 chassis in order to work with it.

    In other words, I don't use the built-in controller for MXI and want to work with the NI PXI-8366 MXI-Express and PXI-1033.

    Thank you.

    The answer to your question is no. The question that must be taken into consideration is the type of housing, we have access to on the PXI-1033. To use a PXI MXI card for control purposes in a PXI system, we need to use the card in a slot of system controller (denoted by a triangle around the number of slots on the chassis). With the 1033 however, we have no access to slots control. Because of the connection of controller MXI incorporated, we only have access to a calendar/trigger and devices slots.

    Is there a particular reason you don't want to use on the 1033 MXI connection, or you just want to avoid having to change the connection to another computer?  Single MXI cards which would depend on the space available on the PXI-1033 would be something along the lines of the 8367 and 8367, who are used to the Garland of a separate chassis.

  • Process * \MCSHIELD. EXE the nest (428) contained code signed or corrupted and could not perform an operation with a McAfee driver.

    XP SP3 system

    I get warnings like this when Mcafee updates.

    Process * \MCSHIELD. EXE the nest (428) contained code signed or corrupted and could not perform an operation with a McAfee driver.

    Process * \SVCHOST. EXE the nest (1632) contained code signed or corrupted and could not perform an operation with a McAfee driver.

    Is this a problem Microsoft or Mcafee?

    Do I need to fix?

    In the McAfee forums, there are several similar positions such as:

    https://community.McAfee.com/message/241542

    I'll sue your question on in their community, as they already seem to know about it.

    I would also say that, unless you are very fond of McAfee or you are forced to use it, you plan to replace it with something that has a smaller footprint, uses less resources and doesn't have these problems - something like Microsoft Security Essentials, you can get here:

    http://Windows.Microsoft.com/en-us/Windows/Security-Essentials-download

    MSE completed with the free version of MBAM and SAS should permanently keep your clean enough unless you're a daredevil like me:

    Download, install, update and do a quick scan with these free malware detection programs (not at the same time) and remove all threats:

    Malwarebytes (MMFA): http://www.malwarebytes.org/products/malwarebytes_free
    SUPERAntiSpyware: (SAS): http://www.superantispyware.com/

    SAS will probably report a lot of tracking cookies and you can just let him delete them.

    Even if you keep McAfee, I always supplement it with MBAM and SAS since no single AV program does seem to know everything.  If your McAfee of your system is clean, I would interpret that means - McAfee found nothing, says he knows.  It is prudent to use more than a reputable scanner to get more coverage.

    If you choose to spend (and you can't have both at the same time), you must be sure to use the uninstaller that you can get from here:

    http://service.McAfee.com/FAQDocument.aspx?LC=1033&ID=TS101331

    Your system will give you better performance.

  • ordered a pavilion with graphics card upgrade, upgrade used only 16-bit location

    ordered a pavilion with graphics card upgrade, upgrade used only 16-bit location. I want to connect a second monitor, can I use the parent connections card currently have coverage through them that say "do not remove"?

    Hello

    If you use an adapter, then you have the choice on the end to use the adapter based on the adapter that you use. Buy cable HDMI to DVI and save frustration adapter problems and possible.

  • ASA software order of operations

    I'm trying to find a graph or something that identifies the order of operations what ASA cross when traffic passes through the appliance. I found different info already, but nothing him explained me the specific point, the decision is made to not let traffic pass interface more high level of confidence to interface low enough level of trust. When she assesses levels of security access lists? When does a decision of routing security levels.

    Thanks for any info

    Here is an example:

    fwasa01 # entry packet - map out tcp 5.5.5.5 1024 172.16.64.101 22

    Phase: 1

    Type: FLOW-SEARCH

    Subtype:

    Result: ALLOW

    Config:

    Additional information:

    Not found no corresponding stream, creating a new stream

    Phase: 2

    Type:-ROUTE SEARCH

    Subtype: entry

    Result: ALLOW

    Config:

    Additional information:

    in 172.16.64.0 255.255.240.0 inside< routing="" wants="" to="" route="" the="" packet="" from="" outside="" to="">

    Phase: 3

    Type: ACCESS-LIST

    Subtype:

    Result: DECLINE

    Config:

    Implicit rule< outside="" interface="" has="" an="" inbound="" acl="" which="" doesn't="" mention="" "172.16.64.0"="" network,="" so="" the="" implicit-deny="" will="" drop="">

    Additional information:

    Result:

    input interface: outdoors

    entry status: to the top

    entry-line-status: to the top

    the output interface: inside

    the status of the output: to the top

    output-line-status: to the top

    Action: drop

    Drop-reason: flow (acl-drop) is denied by the configured rule

    So to answer your question, when the packet flows of low trust in the high level of confidence it goes like this:

    1 course

    2. check the ACL< if="" no="" match,="" drop.="" acl="" is="" required="" if="" going="" from="" low-trust="" to="" high-trust.="" if="" no="" acl="" is="" configured,="" and="" this="" is="" inbound="" session,="" the="" packet="" is="" dropped.="" acl="" is="" not="" required="" if="" going="" from="" high-trust="" to="">

    3. If nat-control is disabled (default): try to find nat/static flow correspondence or existing (there are a few things here depending on where the session initiated from), if no nat found config found, send the package without nat

    3B. If nat-control is activated: there must be existing or nat/static flow

    There are other components, but these are the most important

    Kind regards

    Roman

  • NAT order of operation on the PIX firewall

    Hi all.

    Can someone refer me to a document that clearly explains the order of operations on a PIX w firewall NAT / code 6.3 (3) or 6.3 (5)?

    The statements are first aveluated? Static Nat, static policy NAT, NAT/PAT dynamics and so forth, for outbound connections?

    And for incoming connections? I know that xlate table is checked on the first place for incoming connections, but, assuming that there is no entry corresponds to an incoming packet... What is the medal in which NAT set out are avaluated?

    TKS in advance.

    Diego

    Hello

    Refers to these positions. These are the same though...

    http://Forum.Cisco.com/eForum/servlet/NetProf?page=NetProf&Forum=security&topic=firewalling&CommCmd=MB%3Fcmd%3Dpass_through%26location%3Doutline%40%5E1%40%40.1ddb829a/0#selected_message

    http://Forum.Cisco.com/eForum/servlet/NetProf?page=NetProf&Forum=security&topic=firewalling&CommCmd=MB%3Fcmd%3Dpass_through%26location%3Doutline%40%5E1%40%40.1ddb999a/1#selected_message

    HTH

    AK

  • As an operator with the long data type

    Oracle 10g.

    Hi gurus

    I want to apply as an operator on the long data type, but I get the error message, can you please help me why is that I use as an operator with the long data type. I did some research and but unable to find a solution, see query for more details below...

    Query

    SELECT trigger_body FROM user_triggers

    WHERE trigger_body LIKE '% UPDA % CASE % ';

    Error

    ORA-00932: inconsistent data types: expected NUMBER got LONG

    00932 00000 - ' incompatible data types: wait %s %s got. "

    * Cause:

    * Action:

    Error on line: column 2: 7

    Concerning

    Muzz

    Adrian Billington wrote to the top of your options.

    working with long columns

  • Basic operations with vCO

    Hi all

    Our team of db generates a txt file and I have this zip file and send a few ftp site... This recurring transaction and I repeat every day.

    I need a workflow to move the file, copy the file, zip file, and send to the ftp site...
    Is possible this operation with vco...

    Thank you

    I see quite a few ways that you can do with vCO.  In my environment, we use vCO installed on windows hosts.  Windows hosts where is installed the vCO slightly contain other software we have created wrappers around workflow.  Among the software we have created wrappers of vco for various windows of the cli-based the eggs/ovf VMwares management tools, commands Windows AD, etc..  You can very easily run local commands that could be batch, or powershell scripts that you created.  We wrap also tricks of powershell.  If you have the device or a linux-based install of course you will need to shell script or whatever you prefer in this environment.

    There is also the ssh plugin we use pretty heavily in our environment for various tasks.  I have a general purpose host script to make calls to various utils, we have developed in-house and based on linux cli for a few different packaging products.

    There is also another great utility which is posted here as a bunch of comments script manager to run scripts on a virtual machine.  We use this a little utility for new deployments and other configuration after commissioning management tasks.

    You will also find this vCO has capabilities of management very simple file so if you just need to move files or open one up a process you can do if the text or xml.

    I hope this helps. Don't forget there are also REST and SOAP plugin to take advantage of all the products that have one of these APIs.

    Paul

Maybe you are looking for

  • created archive camera - clips in case of lack?

    Been bickering a lot of material.  Summer camera archives first, at the same time make a power of attorney.  Everything is fine.  If the last attempt, I suddenly have a problem.  There is only an single element in the event of archive of the camera o

  • the firefox button is higher up the page and I can find

    the search engine bar upstairs disappears and reappears only when I move my cursor up there and it didn't use to do. In addition, the firefox button is not there either. I uninstalled and reinstalled firefox, but it changed nothing. can you help me?

  • Disk space MacAir swallowed in 10 minutes after the start.

    MacAir fast - disappearing of disk space! My problem: When I turn on my OS 10.6.8 MacAir is about 8Gb available, but in a few minutes, that reduces to zero. Whenever I restart the same thing happen again..... after that 10 minutes maximum available s

  • How can I change the data format of the digital display of the digital meter?

    I created a screen that uses digital counters to display data.  Each meter has its visible digital display so that the user can see the level accurately.  I have changed the format of the data from the meter to 2 digits of precision and want to displ

  • Duplicate the 'Favorites' and 'Music' folders that appear.

    In my file user a few months ago I noticed that I had two folders called 'Favorites '. I deleted one of them only a few times to make it reappear later.  Today, I noticed another problem of dupe. I have now two "Favorites" and two records 'music '. D