Articles n'ayant pas été commandés depuis 2 ans
Salut à tous j'ai une préoccupation: j'ai trois tables( articles commande stock),la table commande reçoit client et article (nr) et la date_commande,
je veux afficher la liste des articles (dont le stock est positif ) qui n'ont pas encore été commandés depuis 2 ans . Help me please
voici ma requête
Code:
1 2 3 4 5 6
| select distinct (a.artnr), a.titre
From article a, stock b
where a.artnr= B.artnr
and B.stock>0
and not exists (select Distinct(c.artnr) from commande c
where to_char(C.dat_comm, 'YYYY') > '2014') |
Merci