Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Monthwise Breakup
Message
De
19/08/2006 07:58:47
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
19/08/2006 06:07:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01146956
Message ID:
01146990
Vues:
35
This message has been marked as the solution to the initial question of the thread.
>My dear Professor
>
>Your codes work fine.
>Is it possible to show output as follows
>
>code -----------May-----------June
>1111 ----------300-----------600
>1112 ----------200--------------0
>1113 ------------ 0------------400
>
>The month names should appear in vertical with data
>
>Please help again
* Separate the amounts by month
* One field per month
select Code,;
    sum(iif(month(Date) =  1, Amount, $0)) as Amount01,;
    sum(iif(month(Date) =  2, Amount, $0)) as Amount02,;
    ...
    sum(iif(month(Date) = 12, Amount, $0)) as Amount12;
    group by Code;
  into cursor Tmp
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform