Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What Should be the Logic ?
Message
 
À
15/04/2013 05:58:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01570922
Message ID:
01570928
Vues:
56
In addition to what Tore suggests, you might try this (assuming there only a limited amount of months):
select Account,;
   sum(iif(month=2013.10,Amount,0) as Jan,;
   .
   .
   sum(iif(month=2013.91,Amount,0) as Oct,;
from <yourTable>;
group by Account:
Hope this helps.





>No, I didn't meant to ask That. I mean to say How will I convert my Rows i.e Amount of different to columns amounts. What are the limitations to that etc, etc
>
>
>
>
>>Not sure how your representation of dates work, but you might try something like
>>
>>
>>select month,sum(amount) from <yourtable> group by month
>>
>>
>>Hope this helps.
>>
>>>What Logic should I use to compare Data for One Month to another ?
>>>
>>>
>>>My Table contains following fileds.
>>>
>>>Accountno N (10) && example 1234567891
>>>Month N (8,2) && 2013.10 represents Jan,2013.91 Represents October
>>>Invoice N (14) & Amount N(10)
>>>
>>>I have been asked to compare the Monthly Amounts with the preceding months Amount. Also Compare one year to another.
>>>
>>>What logic should I use, How to start up with this.

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform