Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select
Message
De
05/04/2010 14:07:40
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Select
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01458778
Message ID:
01458778
Vues:
114
hi all,

i need help to select twice from the same table and make sum to replacement to another fileld at the same table as below
m.tnNumber1=1
  m.tnNumber2=2
  
 SELECT ID1 ,Y2010 FROM NEWTEST WHERE ID1=m.tnNumber1 AND ID>0
id1      y2010
 1       10.3
 1        20
 1        15
  
   SELECT ID1 ,Y2010 FROM NEWTEST WHERE ID1=m.tnNumber2 AND ID>0
   
id1    y2010
 2    12
 2    11.5
 2    18
 
i need to sum y2010 where ID1=m.tnNumber1 + y2010 where ID1=m.tnNumber2 and replace at the same table to field ty2010

id1   ty2010
2     22.3
2     31.5
2      33
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform