NOT operator

hi everyone, i am having problem with the not operator in oracle.
consider the following
WITH data AS
SELECT 'TAK' cd, 'PL' TYPE FROM dual UNION ALL
SELECT 'TAK' cd, NULL TYPE FROM dual
SELECT * FROM data WHERE NOT (cd = 'TAK' AND TYPE='PL')
the above is not returning anything. what i want to do is to exclude all rows with cd=TAK and TYPE=PL
the rest should be display. so the output should be
CD       TYPE
============
TAK      <NULL VALUE HERE>however, the query above is not doing that. how can i modify my query to exclude rows with cd=TAK and TYPE=PL but display the one that doesnt match this condition like
second row, cd=TAK and TYPE=null

Hi,
elmasduro wrote:
hi everyone, i am having problem with the not operator in oracle.
consider the following
WITH data AS
SELECT 'TAK' cd, 'PL' TYPE FROM dual UNION ALL
SELECT 'TAK' cd, NULL TYPE FROM dual
SELECT * FROM data WHERE NOT (cd = 'TAK' AND TYPE='PL')the above is not returning anything. what i want to do is to exclude all rows with cd=TAK and TYPE=PL
the rest should be display. so the output should be
CD       TYPE
============
TAK      <NULL VALUE HERE>however, the query above is not doing that. how can i modify my query to exclude rows with cd=TAK and TYPE=PL but display the one that doesnt match this condition like
second row, cd=TAK and TYPE=nullRemember, SQL uses 3-value logic.
Conditions can be TRUE, FALSE or UNKNOWN. Rows are returned if (and only if) the WHERE clause evaluates to TRUE.
If either cd or type is NULL, but the other variable is what the condition is checking for, then
WHERE NOT (cd = 'TAK' AND TYPE='PL')will evaluate to UNKNOWN, because
NULL = x     is always UNKNOWN, regardless of what x is,
TRUE AND UNKNOWN     is UNKNOWN, and
NOT UNKNOWN     is UNKNOWN.
See the truth tables in the SQL language manual:
http://docs.oracle.com/cd/E11882_01/server.112/e26088/conditions004.htm#sthref1938
If you want to equate NULL cds with something other than 'TAK', and to equate NULL types with something other than 'PL', here's one way to do it:
SELECT     *
FROM     data
WHERE     NVL (cd,   'OK') != 'TAK'
OR     NVL (type, 'OK') != 'PL'
;I find the condition above easier to understand than the condition below, but they get the same results.
SELECT     *
FROM     data
WHERE     NOT (    NVL (cd,   'OK') = 'TAK'
         AND      NVL (type, 'OK') = 'PL'
;

Similar Messages

  • Error "Connection Failed The server may not exist or is not operational..."

    This is just FYI in case somebody else runs across this. On one user account, an error window would pop up every so often that said:
    Connection Failed
    The server may not exist or it is not operational at this time. Check the server name or IP address and try again.
    It turns out that the problem was caused by Screen Saver. The error popped up whenever screen saver tried to launch. On the problem account I had the "Pictures" folder selected for the screen saver, and apparently there must be an alias in that folder pointing to something on a remote server, because as soon as I go to System Preferences and open the Screen Saver panel, I get the error.
    It has been driving me crazy for months but finally I thought to look in Console, where I saw the error "afp_mount[5045] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0x2d03, name = 'com.apple.afp_mount.ServiceProvider'"
    Searching for that error led me to the Macosxhints forum at http://forums.macosxhints.com/archive/index.php/t-53209.html where a user had posted the same problem. Changing to a different screen saver or a different folder for pictures resolved the issue.
    PowerMac G5   Mac OS X (10.4.6)  
    PowerMac G5   Mac OS X (10.4.6)  

    Welcome to discussions leffjay. Good one. Cheers.

  • Satellite L875-12J: Win 8.1 upgrade - FN brightness key not operating

    After Windows 8.1 upgrade the Function keys for brightness are not operating.
    I've downloaded and installed all new software including that for the function keys without result.
    Brightness is not working in power plans or in change pc seetings.
    PS. Followed also the installation order file for Win 8.1 update.
    Would appeciate any help.
    Model: Satellite L875-12J
    Cheers Tasos

    > hey work but you have to push the FN key,
    This special key function can be changed in the BIOS.
    The point is that you can use the function key pressing FN key or without pressing the FN key
    But this has to be enabled in BIOS.
    Go to +BIOS -> Advanced -> System Configuration+
    There you can find the *special function key mode.*

  • FF does not open in remote locations while Explorer opens . Each time a Firefox Browser upgrade window popsup but is not operative, only removed it by reload. Popups blocked

    FF will not open when using WiFi remote, Explorer opens easily.FF starts with a pop-up window for a Browser Upgrade but is not operative and only removed by using the reload.

    FF will not open when using WiFi remote, Explorer opens easily.FF starts with a pop-up window for a Browser Upgrade but is not operative and only removed by using the reload.

  • How to fix this error: "Scanner is Not Operating Correctly"

    My MP830 (purchased in 2006) will print from my computer but nothing will print  or scan when placed on the scanning bed.  The error is:  "Scanner is not operating correctly."  How can I fix this?  I do have the Set Up CD-Rom with the Driver, Application Software, and Manual on it and the other identifyers on the disk are:  USCD 1.1  QH7-2342
    I am not very tech savvy and would like to get this scanner working properly.  Help please.
    BurninToLearn
    Solved!
    Go to Solution.

    Hello!
    So that the Community can help you better, we will need to know the version of Windows or Mac in use.
    If this is a time-sensitive matter, our US-based technical support team is standing by, ready to help 24/7 via Email at http://bit.ly/EmailCanon or by phone at 1-800-OK-CANON (1-800-652-2666) weekdays between 10 AM and 10 PM ET (7 AM to 7 PM PT).
    Thanks and have a great day!

  • Fan is not operating

    Dear Sirs,
    I'm from São Carlos / SP / Brazil and I bought a TouchSmart Notebook HP ENVY 17-j041nr in Orlando at the Microsoft Store in Millenia Mall 30/10/2013.
    However, the unit is experiencing the following error:
    "The system has detected the cooling fan is not operating Correctly.
    Continued operation is not recommended and may cause unpredictable behavior That Could Result in random shutdown, possible data loss or system damage. The system will shutdown in 15 seconds. To Prevent shutdown operation and continues operation, press the Enter key now.
    System Fan <908> ENTER - Continue Startup "
    The unit is still under warranty according to data from HP:
    HP ENVY TouchSmart 17-j041nr (response from the HP website: The following information is provided for your product)
    Warranty Status: Covered under warranty Warranty end 10/30/2014 (YYYY-MM-DD) Date
    I would like to know, please, what to do?
    Best regards,
    Edvaldo Luís de Almeida

    Hello Vadoalmeida,
    Welcome to the HP Forums!
    I understand you have questions about warranty service for your ENVY 17-j041nr. The good news is that HP has a Global Warranty, but their are some restrictions. The Global Warranty basically means your product will receive warranty coverage based on the available coverage in your current location. For more detailed information you can view the Global Warranty and FAQs page. 
    For more specific information about the error you have you can view this document specifically for System Fan (90b) error message on startup. This document has a list of steps you can try before contacting support for service.
    If the document above does not help you resolve the issue I would suggest contacting phone support for service options. You can contact support in Brazil at this phone number: 0-800-709-7751 - Support is only available in Portuguese for this region.
    Hopefully this helps!
    Please click the "Kudos, Thumbs Up" at the bottom of this post if you want to say "Thanks" for helping!
    Please click "Accept as Solution" if you feel my post solved your issue, it will help others find the solution.
    The Great Deku Tree
    I work on behalf of HP.

  • ITunes option for "SYNCH" is not operable.  Also, the "device" does not sho

    iTunes option for "SYNCH" is not operable. Also, the "device" does not show up on the list as being connected, so I cannot sync any of the Ipods we have. I've updated, deleted and reinstalled iTunes and still not able to sync. The main menu that usually pops up when you connect your Ipod to the computer doesnt happen either....help please
    FeelnPreti

    Welcome to AD!
    Do you know what changed on your PC? Try a differetn USB port or iPod cable.
    Here is an article with a list of other things to check.
    http://support.apple.com/kb/TS1369

  • What is the difference between != and Logical NOT operator

    kindly,tell me what is the difference between Not Equality operator and logical negation operator.
    Edited by: user13414134 on Dec 3, 2010 8:59 AM

    what is the difference between != and Logical NOT operator The NOT operator is transformed into the inequality operator (&lt;>), as can be seen from the Predicate Information of the explain plan:
    SQL> explain plan for select * from dual where  :x != :y
    Explain complete.
    SQL> select * from table(dbms_xplan.display())
    PLAN_TABLE_OUTPUT                                                              
    Plan hash value: 3752461848                                                    
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |    
    |   0 | SELECT STATEMENT   |      |     1 |     2 |     2   (0)| 00:00:01 |    
    |*  1 |  FILTER            |      |       |       |            |          |    
    |   2 |   TABLE ACCESS FULL| DUAL |     1 |     2 |     2   (0)| 00:00:01 |    
    Predicate Information (identified by operation id):                            
       1 - filter(:Y&lt;>:X)                                                          
    14 rows selected.
    SQL> explain plan for select * from dual where not :x = :y
    Explain complete.
    SQL> select * from table(dbms_xplan.display())
    PLAN_TABLE_OUTPUT                                                              
    Plan hash value: 3752461848                                                    
    | Id  | Operation          | Name | Rows  | Bytes | Cost (%CPU)| Time     |    
    |   0 | SELECT STATEMENT   |      |     1 |     2 |     2   (0)| 00:00:01 |    
    |*  1 |  FILTER            |      |       |       |            |          |    
    |   2 |   TABLE ACCESS FULL| DUAL |     1 |     2 |     2   (0)| 00:00:01 |    
    Predicate Information (identified by operation id):                            
       1 - filter(:Y&lt;>:X)                                                          
    14 rows selected.

  • "Not" operator in iTunes search?

    Just wondering if anyone knows if there is a "not" operator to exclude a word from your itunes search, say to keep if from picking upi tracks you don't want. This operator would function in a way that would be similar to the "-" operator on google, so you could search for:
    apple -computer
    to get all apple results that did not include the word computer. On iTunes I'd love to do things like search for:
    U2 -Zooropa
    and get all of U2 except Zooropa, but I don't think you can.
    I realize I could make playlists to pinpoint specific sets of songs, but I don't need to save them for posterity, my preferences change so often, I just want a more refined search.

    This sounds like a really good idea. You can suggest it to Apple at the feedback section of the Apple website.
    15 PowerBook G4 1Ghz 768mb RAM, Rev. A 17 iMac G5 1.8Ghz 1.5gb RAM   Mac OS X (10.4.3)   300gb Maxtor External HDD, 5th Gen. 60gb iPod

  • CONTAINS query -- the NOT operator

    Is there a way to do the following:
    SELECT *
    FROM mytable
    WHERE CONTAINS (my_search_col,'NOT keyword',1) > 0;
    When I do this, I receive the error:
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-20000: Oracle Text error:
    DRG-50901: text query parser syntax error on line 1, column 1
    From reading the documentation, it appears that the NOT operator is really an 'AND NOT' operator. Is there a way to perform a true NOT?
    Thanks for your help,
    Yun-Ho

    Here are a few options:
    SCOTT@10gXE> CREATE TABLE mytable (my_search_col VARCHAR2(30))
      2  /
    Table created.
    SCOTT@10gXE> INSERT ALL
      2  INTO mytable VALUES ('wanted')
      3  INTO mytable VALUES ('keyword')
      4  INTO mytable VALUES ('wanted and keyword')
      5  INTO mytable VALUES ('keyword and wanted')
      6  INTO mytable VALUES ('this, that, and the other')
      7  INTO mytable VALUES ('whatever')
      8  SELECT * FROM DUAL
      9  /
    6 rows created.
    SCOTT@10gXE> CREATE INDEX my_index ON mytable (my_search_col)
      2  INDEXTYPE IS CTXSYS.CONTEXT
      3  /
    Index created.
    SCOTT@10gXE> SELECT *
      2  FROM   mytable
      3  WHERE  NOT CONTAINS (my_search_col, 'keyword', 1) > 0
      4  /
    MY_SEARCH_COL
    wanted
    this, that, and the other
    whatever
    SCOTT@10gXE> SELECT *
      2  FROM   mytable
      3  WHERE  CONTAINS (my_search_col, '_% NOT keyword', 1) > 0
      4  /
    MY_SEARCH_COL
    wanted
    this, that, and the other
    whatever
    SCOTT@10gXE> SELECT *
      2  FROM   mytable
      3  WHERE  CONTAINS (my_search_col, 'keyword', 1) = 0
      4  /
    MY_SEARCH_COL
    wanted
    this, that, and the other
    whatever
    SCOTT@10gXE>

  • Power fan 'not operating'

    Hallo, I have h535 desktop.
    In BIOS is written that my power fan is 'not operating'. But it looks like PSU is working nornally and is quite cool.
    Why there is in Biios such a statement?
    Solved!
    Go to Solution.

    Having a 7200 RPM hard drive is another reason to leave the fans all plugged in and the side cover on.  A 7200 drive will generate more heat than a 5400 RPM drive.  That's why a lot of laptops will have a 5400 installed instead of a 7200. 
    If vibration is a problem you could try inserting strips of rubber like from an inner tube at the points where the drive contacts with the drive cage.  Then secure the drive screws, but don't over tighten them.  It is also possible that the vibration you are hearing is from the drive cage itself.  When the drive is working, try putting little pressure on the cage at different points to see if the vibration quiets down. 
    Owner & Operator of the following:
    ● Lenovo Ideapad Z570 w/ Win 7 & Win 8.1 Dual Boot ● Lenovo Yoga 3 Pro w/ Windows 8.1 ● Toshiba A75-S206 w/ Win 7
    ● IBM Thinkpad T-23 w/ Win XP ● IBM Thinkpad T-22 w/ Win XP • As well as multiple desktops dual/triple booting XP, Vista and Win 7.
    ★ Find a post helpful? Thank that member by clicking on the ☆Star☆ to the left awarding them a Kudo.
    ★ Posting a problem and a reply is helpful and it answers your question, please mark it as an "Accepted Solution"
    ★ I'm not a Lenovo employee, just a volunteer geek who likes to help folks. Enjoy your time here, pay it forward by helping others !
    ★ Sorry, I don't answer questions via Private Messages. Posting in the appropriate forum is the best way to get assistance.

  • The cooling fan is not operating correctly

    I dont know why, suddenly when i turn on my hp notebook there is allert that the cooling fan is not operating correctly, aand system gives suggest to shut down.
    What shoul i do to fix this?
    Thank you

    Hi,
    You can try the steps from this link below and check if it helps. Moreover after that error comes up if you immediately hit enter the computer will load to windows. Once in Windows you can download the latest BIOS update as that from HP Support and Drivers and install it.
    System Fan (90b) error message on startup
    You can also refer to this  Post
    If problem continues then you may have to get the fan replaced. If the computer is still under warranty then you can call HP Tech Support for repair.
    Note:
    If you have HP Support Assistant installed on the computer(The Blue Question Mark) then open it ==> Complete all pending Updates & Tuneups==> Restart and Check. It may solve your problem
    Although I am an HP employee, I am speaking for myself and not for HP.
    **Click on “Kudos” Star if you think this reply helped** Or Mark it as "Solved" if issue got fixed.

  • Error when trying to add users - The server is not operational [domain]

    Installed the admin console and went to start adding users to the system.  On the add users screen I select the domain and then get the following error:
    The server is not operational [domain]
    I looked this up in Service Notes and found this and found SN 1098415.
    The root cause indicated there is that the server is part of a WindowsNT domain and as such can't issue the LDAP query.
    This server is running in an active directory domain (not sure if it is 2000 or 2003, but it is AD nonetheless.
    Any thoughts?  There are no firewalls in-between the servers that provide AD and this server.
    McP

    I solved my problem.  For purposes of discussion let's call my Pre-Windows 2000 domain name ACME and my Windows 2000/2003 domain acme.net.
    After writing several manual VBScript LDAP queries (to take BPC out of the equation) I determined that the DC didn't want to answer to ACME.  It would only answer to acme.net.
    So, I went into Server Manager to "Define System User Groups" and updated the system user group "Domain Users" to look at acme.net for the domain name instead of just ACME.
    That did the trick - I am now able to see all the users in the domain.
    Thanks for all the suggestions.
    McP

  • Addition DC can not operational when Primary DC down

    Dear All
    My system using Primary DC and Additional DC, both server runing window server 2008 R2.
    when primary DC down. I had reboot Additional DC Server after I access to Active Directory User and Computer, appears error 
    " Naming information cannot be located for the following reason:
    The server is not operational.
    If you are trying to connect to a domain controller running Windows 2000,
    verify that Windows 2000 Server Service Pack 3 or later is installed on the
    DC, or use the Windows 2000 administration tools. For more
    information about connecting to domain controllers running Windows 2000, see
    Help & Support. "
    Please help me fix it 
    Thanks so much 

    Hi 
    I have change domain controller in Active Directory User and Computer and
    I can access to Active Directory User and Computer in Additonal DC 
    Thanks so much !

  • System Management entity is not operational

    Hi,
    - NI AT-FBUS Interfacecard
    - Windows XP
    - NI-Fieldbus 3.1
    Installation of the hardware and the software o.k. so far. No Interruptconflict.
    I have connect my Fieldbusdevice to my system. When I Expand All with the NI-FBUS Dialog Utility 3.1 I get the following Error:
    Error: System Management entity is not operational.
    Does anybody has an Idear what does that mean and how I can solve (fix) this problem?
    Thank you very much,
    Genesiss

    Does your system have any existing FF interface module before you connect to AT-FBUS?
    If so, there might be some conflicts between AT-FBUS and the interface module.  In that case, please close NI-FBUS Communications Manager, and run the Interface Configuration Uitility, check the settings of your interface port,  specially check the Device Address (Fixed) and Device Type; the suggested values could be "0x1A" and "Basic Device". Then click "OK" and close the Interface Configuration Utility, and try to connect to your system and run NI-FBUS Communications Manager again, see whether it helps.

Maybe you are looking for

  • Minimise Server Click in a Table view in  BSP

    Hello All I have a issue related to TableView in a BSP Application Our requirement is : User want to edit a coolumn value for  few records displayed in a Table View . as per My knowledge , when a row is selected in a table view , system go to server

  • Had to install a new hard drive, and I cannot get iPhoto to install

    I just had to replace the hard drive in my PowerBook, and I seem to be missing iPhoto after installing everything. All of the other iLife apps installed, but for some reason, no iPhoto in the Dock or in the Applications folder. I will explain what I

  • How to fix problem with opening pdfs in Windows 8.1 with Adobe Reader XI?

    Every time I try to open a pdf on my new laptop with Adobe Reader XI, I get a message than either the file is not supported or its damaged. But it still opens fine on my old laptop with Windows 7. Any suggestions?@

  • Itunes music all deleted

    I recently had to completely wipe out my computer using the install disk because of problems that I was having with it, and now all my Itunes music is gone. Is there anyway that I could get it back?

  • Subscription Suspended because of clock settings! OUTRAGEOUS!

    Hi, I've paid for Adobe Creative Cloud, and when I don't have an internet connection my subscription is suspended. This is not good enough Adobe. Sure my clock settings seem to reset after restart - but I have paid for my subscription! So let me use