Good day all! Need assistance with the following:
I a table that houses information and want to create calculations based on the info.
I have created a view to perform one of the calcs.
Now I want to sum columns that will put info into another field that I can than perform another function. Unfortunately I keep getting aggregate errors that I need to add field in group by or select statement. I can do one, but not others. After I do one I then need to take that field and perform another calculation.
Example
SUM (Column A) AS TotalColumnA
SUM (Column B) AS TotalColumnB
Then I need to divide Column A by Column B to get to AS Column C
etc....
Since this is a vew can it be done? To further complicate this I need to be able to choose a "between date" end user fills in the begin date and end date.
YIKES!!! I have manual and have been trying to figure out, but I am brain dead trying many different things.
Your expertise would be very appreicated on how I should set this up in MS SQL. If you need a copy of what I am doing... happy to send along.
Thank you!!!!!!!!!!!!!!!!