Requête SQL
Résolu
Dounilab
Messages postés
9
Date d'inscription
Statut
Membre
Dernière intervention
-
Dounilab Messages postés 9 Date d'inscription Statut Membre Dernière intervention -
Dounilab Messages postés 9 Date d'inscription Statut Membre Dernière intervention -
Bonsoir ,
J'ai trois tables :
Article (Ref, designation, prix, type )
Stock ( id_stock, Stock_actuel, date, #ref)
PC(id_donnée, stock_sécurité, stock_max, point_cmd, annee, #ref)
Je veux afficher les articles qui ont un stock_actuel inférieur au point_cmd.
comment puis-je afficher cette requête? Merci d'avance
J'ai trois tables :
Article (Ref, designation, prix, type )
Stock ( id_stock, Stock_actuel, date, #ref)
PC(id_donnée, stock_sécurité, stock_max, point_cmd, annee, #ref)
Je veux afficher les articles qui ont un stock_actuel inférieur au point_cmd.
comment puis-je afficher cette requête? Merci d'avance
4 réponses
-
salut, essaye :
SELECT DISTINCT Stock.Stock_actuel FROM Stock, PC WHERE Stock.Stock_actuel < PC.point_cmd ORDER BY Stock.Stock_actuel ASC LIMIT 0,20
j'ai pas testé...dis nous :)
׺°"~'"°º×]|I{*------» LÖBÖTÖ «------*}I|[׺°"~'"°º× -
-
essaye ca...
SELECT DISTINCT Article.designation FROM Article, Stock, PC WHERE Stock.Stock_actuel < PC.point_cmd AND Article.Ref = Stock.ref LIMIT 0,20
-
j'ai trouvé la requête, en fait un ami à moi l'a trouvé :) !!
select s.ref, pc.ref, s.stock_actuel, pc.point_cmd, annee from stock s, pc where s.ref=pc.ref and s.stock_actuel < pc.point_cmd
Merci beaucoup pour votre temps :)