Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update Table
Message
De
03/09/2004 17:45:53
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Update Table
Divers
Thread ID:
00939360
Message ID:
00939360
Vues:
53
I have a table(currentbalance) that needs to be updated every month, the columns I need are Customer and balance, if customer didn't earn any balance I want to keep their current balance in tact but update any other customers balance that has changed. I've tried the "update" function but not working. Any direction appreciated.
SELECT a.customer, sum(a.redeem) as redeemed;
  FROM redeem a, date b;
  WHERE a.date between b.startdate AND b.enddate;
    group BY a.customer;
    into CURSOR redemption

SELECT customer, VAL(points) as Points;
  FROM ag;
  INTO cursor Pts

SELECT customer, sum(points) as Points;
  FROM pts;
  GROUP BY customer;
  INTO CURSOR CurtPts

SELECT a.customer, (b.balance-a.redeemed)+ c.points as Balance;
 FROM redemption a, currentbalance b, curtPts c;
 WHERE a.customer=b.customer AND c.customer=a.customer;
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform