Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What Should be the Logic ?
Message
 
To
15/04/2013 05:58:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01570922
Message ID:
01570928
Views:
54
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform