Pls find attached results.xlsx file
and the sql file, this script is supposed to only run once but if I accidently ran twice or thrice the AdjTotal
amount is doubled or tripled for the dates I run. I have highlighted the problem areas with yellow and imp columns are marked red.
I need help with modifying the query for reusability and also should fix the problem areas
For ex: want to AdjTotal
to be -9.74 instead of -19.48 for the first row and the Adj
column should be corrected to 0