Lamarmottedu73
Messages postés19Date d'inscriptionjeudi 26 mai 2005StatutMembreDernière intervention14 mai 2009
-
2 avril 2008 à 17:29
Lamarmottedu73
Messages postés19Date d'inscriptionjeudi 26 mai 2005StatutMembreDernière intervention14 mai 2009
-
3 avril 2008 à 23:43
Bonjour, je cherche depuis ce matin comment résoudre ce problème sans trouver la moindre solution ou trace de solution.
Je m'explique :
J'ai une table :
ChampI | ChampN | ChampV
1 | Toto | 10
1 | Polo | 20
2 | Toto | 11
3 | Toto | 13
3 | Polo | 23
Et je souhaiterais faire une requète qui me renverais cela:
ChampI | t.ChampV | t2.ChampV
1 | 10 | 20
2 | 11 |
3 | 13 | 23
Voici ma requète :
Select t.ChampI, t.ChampV, t2.ChampV
From Table t, Table t2
Where t.Champ1 = t2.Champ1And (t.ChampN Toto AND t2.ChampN Polo)
Union
Select t.ChampI, t.ChampV, t2.ChampV
From Table t, Table t2
Where t.Champ1 = t2.Champ1And (t.ChampN Toto AND t2.ChampN Polo)
Mon problème est que pour le ChampI qui vaut 2 j'ai rien puissqu'il ne possède pas de valeur Polo ... Comment faire pour qu'il m'affiche au moin la ligne avec la valeur Toto.
(Je suis sous oracle 10g et je développe un programe avec Delphi (ver 2007).