I have the following SQL code that works properly for generating a single value if I search for one record within a database.
I am not being asked to come up with this value for every record in the database so that I can create additional groupings.
I can add a "where" clause and get a single record, but when I take the "where" clause out to get every value, I get the following error:
arithmetic overflow error converting int to data type numeric
How can I change this code to return a single value for the 1500 plus records?