Wonder if anybody can help me with a solution for this query.
Have been asked to flag entries on a table as deleted where there are matching policy premiums. I have created 2 temp tables called #AMPneg (which contains RowID, Premium Value, Absolute value of premium and policy id for all premiums < 0) and #AMPpos
which is the same apart from being for premiums > 0.
I have tried running the following sql:
View Complete Post