I have a table a which have multiple entry of artikelNr for it to contain multiple Enhet values just like in the picture below, I would like to query all the unique artikelNr which are not associated with Enhet=5.
There is another table which contains unique artikelNr only, if it can help. I am using MS SQL in my local database.
artikelNr enhet output should look like
1 0 artikelnr enhet
1 5 2 0 or 3 no problem
1 8 6 0 or 8 or 3 no problem
1 3
2 0
2 3
4 5
4 0
4 1
4 2
6 8
6 0
6 3
1 2
Try this