Hi i'm trying to do a query where it scans through all the i_user fields and groups the results of the i_status, and give me the results if an i_user does not have a i_status of 2. example below would return 010000 since i_status 2 is not present out of all the entries. the query has to look at the results as a group and not an individual entry.
what does 'hiccough' never seen that used in a sql statement before
thank you, thank you very much, i am glad that you asked me because not everyone does, when i post this solution
you could substitute 'hiccup' if that helps
actually you could substitute any non-null value, and sometimes i write it like this --
HAVING COUNT(CASE WHEN i_status = 2
THEN 937 END) = 0
and of course the ELSE value is NULL by default
now all you have to do is take this knowledge of NULL versus not NULL, armed with the fact that aggregate functions do not include NULLs, and consider that the aggregate function in this instance is COUNT...