• Erland Sommarskog (7/30/2013)


    You could use a single row temp table for your "global variables".

    Presumably you mean a global temp table.

    Although it would probably work, it's a bad idea - it would require just as much code as the DATEADD solution, with the added server overhead of having to retrieve the info from disk.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.