It’s something with the NOT IN (‘0x1234’, ‘0x12345’, etc…);
Where you can’t use multiple with NOT… in works fine, but it won’t let you use the NOT with the IN
From: hharwood [mailto:bounce-hharwood@toadworld.com]
Sent: Thursday, August 17, 2017 10:34 AM
To: toaddatapoint@toadworld.com
Subject: RE: [Toad Data Point - Discussion Forum] Oracle query excluding certain ID’s in count
RE: Oracle query excluding certain ID’s in count
Reply by hharwood
Strange, using Toad for Oracle I did this query …
SELECT COUNT(MYID) FROM MYTABLE;
… and got back 12. Then I issued …
SELECT COUNT(MYID) FROM MYTABLE WHERE MYID NOT IN (1)
… and got 11, so it appears to work. Perhaps the ids you have in the IN clause are not matching, which would mean the counts would be the same.
Try SELECT COUNT(ID) FROM A WHERE ID IN (‘0x1234’,‘0x12345’, etc…) and make sure you get a count of 22.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad Data Point Forum notifications altogether.
Toad Data Point - Discussion Forum
Flag
this post as spam/abuse.