Try...
USE msdb
GO
IF NOT EXISTS(SELECT * FROM dbo.sysjobs WHERE name = '<job name>')
BEGIN
....
END
"SnapDive" <SnapDive (AT) community (DOT) nospam> wrote
Quote:
In T-SQL, I know how to add stored procs and tables if they do not
already exist. I am trying to figure out the right query for a job but
am not getting the syntax - can anyone show me what that is?
Thanks.
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4680 (20091211) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com |
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4680 (20091211) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com