Query issues

Solved
meeks Posted messages 61 Status Membre -  
 Anonymous user -
Hello everyone,

I thought I had some basics in Access but I realize that they are even more limited than I expected!!
Anyway, as part of my work, I want to have a real-time overview of my toner stock without taking into account the null quantities by supplier (multiple suppliers for 1 type of toner).
My SQL code is as follows:
SELECT Article.id_fournisseur, Type_art.nom_cat, Article.Code_article, Article.Qte, Sum(Article.Valeur_stock_HT) AS Valeur
FROM Type_art INNER JOIN Article ON Type_art.id_cat_art = Article.id_type_art
WHERE (((Article.Qte) Is Not Null))
GROUP BY Article.id_fournisseur, Type_art.nom_cat, Article.Code_article, Article.Qte
HAVING (((Type_art.nom_cat)="toner"));

Yet, items with null quantities continue to appear in the query result.

Could you please enlighten me?

Thank you in advance.

1 réponse

meeks Posted messages 61 Status Membre 3
 
I am answering my own request, I knew it was all bullshit
I just needed to add a: AND ((Article.Qte)<>"0"))
2
meeks Posted messages 61 Status Membre 3
 
Hello,

Sorry for the delay but yes, it's resolved.

Thank you :)
0
Anonymous user > meeks Posted messages 61 Status Membre
 
Yes,
in computer science, "null" is different from 0.

Null corresponds to an empty field, while 0, like 1 or 9, corresponds to a "true" value.

To avoid this kind of inconvenience, always set a default value for fields; it helps avoid dealing with "null" values...

See you!
0