I was developing a 'Payment Tracker' web application. I used MS Access as back-end database. I made a 'Payment_entry' table with user_ID and Payment_amount fields with 'Text' and 'Long integer' datatypes. Now , when I wanted to find the total payment of each user I used the following SQL command :
Select user_ID , SUM(payment_amount) From Payment_entry Group By payment_amount ;
But unfortunately I got strange result from the command. Then I got back to my database and reset the datatype of Payment_amount field from Long integer to Decimal. Then I again applied the SQL command. This time I got the correct result. From this , I think that the Sum( ) function does not work correctly with the long integer datatype. Am I correct in this decision ? I want logical comments.

I got strange result from the command.

What do you mean by "strange"? What was the actual error message?

web application. I used MS Access as back-end database.

Honestly MS SQL would be a better choice. MS Access was designed for individuals to use on their desktops, not for web applications.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.