in reply to Re^3: Dynamic SQL script
in thread Dynamic SQL script
I think the problem is that I don't understand the logic you're using to determine the months to use. (if mth_00 is the current month, and mth_01 is the previous month, I'd have actually expected you to count from 0 out to the number of months back that you want, and the current date to be insignificant in the calculation)
Anyway, just figure out which mth_xx fields you want, and adjust the line that sets @months_of_support so the logic is correct.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Dynamic SQL script
by sasrs99 (Acolyte) on Nov 16, 2006 at 16:49 UTC | |
by sasrs99 (Acolyte) on Nov 17, 2006 at 18:19 UTC |