CONVERT (varchar, GETDATE() - 1, 112) will give you yesterdays date in that format
Thanks, but I wanted it as an INTEGER, not a varchar... the script references the sysjobhistory table in the msdb database, and, in that table, the run_date column is an integer.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
Offline 96 posts
since Sep 2006