Hello, I need some help with a group by. I have a table which contains itemnumber and warehouses. I need to find which itemnumber by group that do not have a warehouses that = 1
I've tried select itemnumber , warehouses from stuff where warehouses <> '1' and warehouses > '1' group by itemnumber , warehouses
But this just eliminates the itemnumber with warehouses that = 1 in the results.
I believe that I need to first group the itemnumber and then determin which of these groups have an itemnumber with a warehouses that do not =1
The problem that I face is that each itemnumber should have a wherehouse of 1 and many other warehouse if the part is also stocked in that warehouse. But they must have 1 for the system to work properly. Well, things happen and some of the itemnumber where the warehouse = 1 were changed and I need to find those which have changed or do not have the default warehouse which = 1.
Sorry for the confusion if I'm not being very clear.