Can anyone explain Diff between except and Not in.?

Hi experts,
Sometimes "not in" function is not working.Can anyone tell me the reason.please
Query 1:-
Select POL from table_1 where pol not in (select pol from table_2)
Query 2:-
select pol from table_1 except select pol from table_2
Getting output from Query 2. Query1 dosen't displaying output.
Thanks and Regards

While using Except
the resultant result is given after removing duplicates
the resultant result shall include NULL values as well as present in the source table
While using NOT IN
the resultant result is AS IS from the source table (no duplicate elimination)
But, it DOES ignore the NULL values.
The following code should explain in a better way!
declare @tab1 table ( id int)
insert @tab1 select 1
insert @tab1 select 1
insert @tab1 select 2
insert @tab1 select 2
insert @tab1 select 3
insert @tab1 select NULL
declare @tab2 table ( id int)
insert @tab2 select 2
insert @tab2 select 2
--using NOT IN
--duplicates returned/NULL ignored
select id from @tab1
where id not in (select id from @tab2)
--using NOT EXISTS
--duplicates returned/NULL also returned
select id from @tab1 t1
where not exists(select id from @tab2 t2 where t1.id=t2.id)
--using Except
--duplicates Eliminated/NULL returned
select id from @tab1
EXCEPT
select id from @tab2
Thanks,
Jay
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

Similar Messages

  • My ipod 60gb classic is showing as fully charged until I connect it to my pc when it comes up with the error message, 'please wait very low battery' and the little wheel goes round and nothing happens, can anyone explain why this is and what i can do?

    My ipod 60gb classic is showing as fully charged until I connect it to my pc when it comes up with the error message, 'please wait very low battery' and the little wheel goes round and nothing happens, can anyone explain why this is and what i can do?

    I have worked my way through the assistant and nothing works. I have tried connecting in disc mode but although the screen on the ipod is showing that the device is charged and that it is in disc mode as soon as I connect it to the computer it comes up with the error message 'please wait very low battery' and stays like that until I disconnect when it appears to be OK again. I have tried on both pc and mac.
    BTW the ipod is an ipod video not classic if that makes any difference.
    Thanks

  • Can anyone explain how to download and upload TROY ECF fonts with SAP

    Can anyone explain how to download and upload TROY ECF fonts with SAP.I have downloaded ECF font from TROY wesite as TTF format. but it is not getting upload with SAP.please kindly help me on this issue..

    Hi,
    You can use the SE73 Transaction and upload your TTF files.
    Please check the link here for more details:
    http://help.sap.com/saphelp_nw70/helpdata/en/36/5b3438fd263402e10000009b38f8cf/frameset.htm
    Regards,
    Siddhesh

  • Can anyone explain me the procedure and initial settings to do sto for schedule lines?

    can anyone explain me the procedure and initial settings to do sto for schedule lines?
    Create a STO with new doc type for material M1 to ship from plant 1 to plant 2 with qty as 100. On pressing enter you should be able to see schedule lines in delivery schedule tab. In schedule line you should see the Material availability date, GI date, loading date etc.
    can anyone give the answer for this question..

    Hi Megha,
    Please find below links for Config STO with schedule lines.
    http://dhavalatsap.blogspot.sg/p/configuration-of-plant-to-plant-sto.html
    https://scn.sap.com/thread/1260375
    Thanks,
    Bala.

  • EFax. Can anyone explain how this works and on what printers?

    HP and eFax are rather mum on how this works. Can you set the 6500a + to save incoming faxes? What are the printers that can use this?

    Hello mistercrowley,
    Currently eFax is only available on the Hp Photosmart eStation e All in One Printer C510a. The OfficeJet 6500a Plus has the standard analog fax.
    **Click the KUDOS star on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.
    (Although I am employed by HP, I am speaking for myself and not for HP)

  • Can somebody explain difference between SYS_REFCURSOR and REFCURSOR

    I want to know the exact difference between sys_refcursor and refcursor.

    Please do not post Re: SYS_REFCURSOR and CURSOR. It makes them soggy and difficult to light, er, hard to follow.
    Thank you for your future co-operation.
    Cheers, APC

  • Can anyone explain an error sound and erratic control of wireless mouse

    Hi people. I have a 21inch iMac from September 2013, just before Apple gave iMac a minor hardware update to the processor.
    Within 9 months of  purchase i have had this weird problem.
    The problem is the  "sound you get from the iMac when you press a key on the keyboard and its an error". Well... that error sound sometimes continues as if constantly pressing a key.
    Even though I've just switched on the computer this sound occurs.
    To add to that odd problem i have strange control over the wireless mighty mouse.
    If i go to the task bar at the top of the screen and select the Apple icon and attempt to shut down or any selection for that matter, the cursor jumps from one selection to the other. And there are occasions when the Macintosh HD icon on the right of the desktop is highlighted in blue as if i have selected it.
    Batteries in mouse are new Duracell and from the same new packet.

    There are several possible causes for this issue. Please take each of the following steps that you haven't already tried until it's resolved. Some may not apply in your case.
    1. Follow the instructions in this support article, and also this one, if applicable. A damaged or defective AC adapter could be the cause, even if it's the right kind.
    2. Press down all four corners of the trackpad at once and release. If there's any effect, it's likely to be temporary, and in that case the unit must be serviced or replaced.
    3. Open the Bluetooth preference pane in System Preferences and delete all pointing devices other than the trackpad, if applicable. Disconnect any USB pointing devices. By a "pointing device," I mean a peripheral that moves the cursor, such as a trackpad, mouse, trackball, or graphics tablet. A plain keyboard is not a pointing device.
    4. Start up in safe mode and test, preferably without launching any third-party applications. If you don't have the problem in safe mode, but it comes back when you restart as usual, stop here and post your results. Do the same if you can't start in safe mode. If there was no difference in safe mode, go on to the next step.
    5. Reset the System Management Controller.
    6. If you're using a Bluetooth trackpad or mouse, investigate potential sources of interference, including USB 3 devices.
    7. A swollen battery in a portable computer can impinge on the trackpad from below and cause erratic behavior. If you have trouble clicking the trackpad, this is likely the reason. The battery must be replaced without delay.
    8. There's a report that a (possibly defective) Thunderbolt Ethernet adapter can cause the built-in trackpad of a MacBook to behave erratically. If you're using such an adapter, disconnect it and test.
    9. There's also a report of erratic cursor movements caused by an external display that was connected but not turned on.
    10. If none of the above applies, or if you have another reason to think that your computer is being remotely controlled, remove it from the network by turning off Wi-Fi (or your Wi-Fi access point), disconnecting from a Bluetooth network link, and unplugging the Ethernet cable or USB modem, whichever is applicable. If the cursor movements stop at once, you should suspect an intrusion.
    11. Make a "Genius" appointment at an Apple Store to have the machine and/or external trackpad tested.

  • Can somebody explain relation between BAM and TrackingHost

    In My application I have used BAM API to track some business data.
    Is it mandatory to have at lease one tracking host is running to move data between BizTalk Message box database to BAM primary import database?
    Thanks
    Ammu.

    Is it mandatory to have at lease one tracking host is running to move data between BizTalk Message box database to BAM primary import database?--> Yes. There should be at least one tracking host (a BizTalk host which has tracking enabled) to move data
    from message box to BAM Primary Import.
    Check below link
    https://msdn.microsoft.com/en-us/library/cc296633(v=bts.10).aspx
    Hope this helps
    Greetings,HTH
    Naushad Alam
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or
    Mark As Answer
    alamnaushad.wordpress.com

  • My wife, daughter and I have iPhones. We all have iMessage and Send Read Receipts activated. All the messages sent between the three of us are blue except those that my wife sends to me. They are green. Can anyone explain why.

    My wife, daughter and I have iPhones with iMessage and Send Read Receipts activated. All the messages sent between the three of us are blue however, when my wife messages me, the message appears in green on her iPhone. Can anyone explain why.

    Because some kind of error occured.  This is only from her iPhone to your iPhone?  Whenever she sends a message to any other iPhone, it is sent as blue?  And when anyone else sends you a message from an iPhone, it sends as blue?

  • Can anyone explain the main differences between CRM 2007 and CRM 7?.

    Can anyone explain the main differences between CRM 2007 and CRM 7?.
    Does CRM 2007 use the WebUI?.
    Jason

    My fault for not putting my question forward correctly.
    I have worked with CRM 7 a few times now, but my experience has jumped me from CRM 5 straight to CRM 7, having never touched CRM 2007.
    I now have an opening to work on CRM 2007 so I was intrigued to know what it physically looked like. I assume it does not use the WebUI interface?.
    Jas

  • Can anyone explain why on my iPhone 4S, whenever I play music, it won't hold my place in the song? I pause it, and then when I go back later, it's all the way back at the beginning? A google search was not very helpful, any tips would be great!

    Can anyone explain why on my iPhone 4S, whenever I play music, it won't hold my place in the song? I pause it, and then when I go back later, it's all the way back at the beginning? A google search was not very helpful, any tips would be great!

    Try assigning Queen as the Album Artist on the compilations in iTunes on your computer.

  • Hi, can anyone explain the difference between the models A1457 and ME432B/A of the iPone 5s. Thanks

    Hi, can anyone explain the difference between the models A1457 and ME432B/A of the iPone 5s.

    Hi Gary,
    Model # A1457 designates that it's the European market model, which I believe works on EE, Vodafone and O2 in the UK.
    ME432B/A is the part # that, in your case, I believe, desginates a 16GB Space Grey Unlocked version...
    Someone can correct me if I'm wrong on that
    Kev

  • Can anyone explain why my Dell laptop and my iphone can "see" a server in Luton when using a wireless broadband (I get 20 Mbps download speed) but my ipad can not see this server and finds one in Milton Keynes which gives me 0.37 download speed.

    Can anyone explain why my Dell laptop and my iphone can "see" a server in Luton when using a wireless broadband (I get 20 Mbps download speed) but my ipad can not see this server and finds one in Milton Keynes which gives me 0.37 download speed.

    Can anyone explain why my Dell laptop and my iphone can "see" a server in Luton when using a wireless broadband (I get 20 Mbps download speed) but my ipad can not see this server and finds one in Milton Keynes which gives me 0.37 download speed.

  • Can anyone explain nonpredefine exception with real world example

    Can anyone explain nonpredefine exception with real world example

    Is this what you mean?
    i.e. When others catches all errors - so it is not predefined
    Predefined errors are things like no rows, too many rows etc - meant to catch specific errors
    It is the difference between tolerating one 'bad' thing specifically and tolerating all 'bad' things.
    DECLARE
       v_text  varchar2(1);
    BEGIN
       v_text:= 'THIS STRING IS TOO LONG FOR THIS VARIABLE';
    EXCEPTION
       WHEN OTHERS --this is non error specific and generally VERY BAD practise as it suppresses all errors
           dbms_output.put_line('Whatever you want to do when an unknown error manifests here');
    END;

  • Can anyone explain to me why some of my photos are landing in events and others are appearing only in photo stream?

    I want to delete photos from camera roll on my iPhone to clear space to install ios7 but after importing photos to iPhoto on my macbook pro only 4 out of 339 photos taken in September landed in events, though all 339 are in Sept photo stream. It seems like on previous uploads all photos "fell" into events according to the day they were taken, as well as into photostream. I want to make sure these photos stick around permanently and do not exist only in photo stream where I imagine they will eventually be bumped from my computer (photostream). Can anyone explain why some of my photos are landing in events and others are appearing only in photo stream?

    You have uploaded two different things - pHotos are in one and only one event - if you have the same photo in two different events then you have imported it twice
    Please explain what you want - your initial question and yoru current comments are 180 degrees apart
    You say they are not all in events
    Can anyone explain to me why some of my photos are landing in events and others are appearing only in photo stream?
    Now you say they are
    All 15 pics appear in  Sept 2013 PS
    It sound to me like you have no problem except you imported some photos twice adn you may not understand how the automatic import form PS works - but that is not clear
    you can choose to have all of your My Photo Stream photos automatically downloaded. In iPhoto or Aperture preferences on your Mac, to select Photo Stream > My Photo Stream > Automatic Import. All of your photo stream photos will be imported into your Events, Projects, Photos, Faces, and Places folders in iPhoto or Aperture.
    The event they are imported into is MMMM YYYY PS
    If you import via iTunes sync or by connecting your IOS device via USB then they are importeed into the regular event structrue as defined in your iphoto preferences - and if you imoport via two or more different methods you will ahe duplicates
    LN

Maybe you are looking for

  • Sales tax on online orders

    I am unclear on the sales tax situation for online orders of iPads. Will I be charged sales tax if I order an iPad thru the Apple online store? If online orders are sales tax free why are there so may people lining up at stores to buy iPads (and othe

  • Trying to run CSS11503 08.10.0.02 one-armed DNAT+SNAT with UDP 921

    Is there a way to perform DNAT + SNAT and portmap disable on the CIsco CSS 11503. I need to do a DNAT in a one-armed configuration and the to SNAT for UDP traffic with SRC Port 9211 and DST Port 9211. I don't need loadbalancing but only NAT. Is there

  • Check Portal System Database Backup status

    Hi, we have a portal system and i have performed an online DB-Backup using brtools. Like DB02 in ABAP Stack, is there a way to display the status of the Backup either using NWA at SAP level or using brtools at OS level ? Thank you, Mohan.

  • Formatting java code in html [code]

    Hi ppl, any suggestions how does code tag(formatted java code) works in this site? thanks in advance.

  • Getting 'unidentified error occured' while database connecting on local computer

    I have downloaded CS5 Dreamweaver trial version on my c omputer, with windows 7. I have also downloaded easy php as php-mysql-apache server on the same computer. While creating a databse connection, I get following message 'Undefined error ocurred'.