Sum of integer in table with .dbf format

15 pts.
Tags:
Integer
Substring
I have table with .dbf format..inside only have 30 records which are 239,45,340,...etc. I wan to sum the integer like this..for example the first number..239=2+3+9=14..and the second number 4+5=9..then the output is 14,9,...until the 30th number..How would i do it? Help is desperately needed..I only know few tips..which are using for loop and substring...

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • CharlieBrowne

    What programming language are you using?

    Since you know substring and loop, you can loop through and sum each number in the data field. Then have and output field where you substring the result. When you are done with the first loop, you can determine the length of the answer by IF statements. If answer < 10, Length = 1. If Answer < 100, Length = 2. Etc.

    Now you can value of length when you substring populating your final output field.

    41,380 pointsBadges:
    report
  • Quinten
    Sorry i forgotten to mention my programming..its Microsoft Visual Foxpro 9.0
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following