Select Distinct SomeDay.SomeDayID, SomeDay.FolderName, SomeDay.FolderColor from SomeDay, SomeDayEvent where SomeDay.SomeDayID != 4,3,2,1;
You cannot use != For multiple values ββfor which you should use not in , for example:
!=
not in
Select Distinct SomeDay.SomeDayID,SomeDay.FolderName,SomeDay.FolderColor from SomeDay,SomeDayEvent where SomeDay.SomeDayID not in (4,3,2,1);
You cannot separate values ββin the WHERE part by comma. You must use the keyword IN or BETWEEN.
SomeDay.SomeDayID NOT IN (1,2,3,4)
or
SomeDay.SomeDayID NOT BETWEEN 1 AND 4
Select Distinct SomeDay.SomeDayID,SomeDay.FolderName,SomeDay.FolderColor from SomeDay,SomeDayEvent where SomeDay.SomeDayID NOT IN (4, 3, 2, 1)
Use the IN clause.
Is SomeDayID valid? You should know that expression
SomeDayID
NULL NOT IN (1, 2, 3, 4)
does not evaluate to TRUE.
Source: https://habr.com/ru/post/1347903/More articles:Does Multiple Shard Key Help Performance In Mongodb? - mongodbC # event inheritance - c #Is the use of AntiXss library necessary / recommended in mvc 3 razor application - encodingWhy are blocked pages not counted in the size of the working set? - windowsCreating and binding objects in a workflow - multithreadingPossible error in odeint β interp1d interplay? - pythoniOS does not load the next level - iospopulate AutoCompleteTextView with BaseAdapter android - androidMake a div, but don't move subsequent elements down - htmlJquery check if li with id = x already exists in ul - javascriptAll Articles