Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Ron Grzywacz
Starting Member
2 Posts |
Posted - 2002-08-15 : 16:03:08
|
| Is there something different on how sql2000 handles comments in my jobs now. When I try to run the script below in a sql agent job, I only get the results of the getdate statement. Only after I remove the lines with the "--" does the full script run. Thanks for you help --dbo.usp_oasis_tape_backup CREATE proc sp_oasis_backupasSELECT GETDATE()declare @TapeName varchar(50)declare @MediaDesc varchar (50)set @TapeName = datename (dw,getdate()) + ' OASIS SQL Backup'set @MediaDesc = getdate()--select @TapeName as named--select @MediaDesc as Descr--SELECT GETDATE()------ BACKUP DATABASE hpn TO TAPE='\\.\tape0'WITH FORMAT, MEDIANAME=@TapeName, --MEDIADESCRIPTION=@MediaDesc, NAME='hpn backup', NOUNLOAD,STATS=25GORon Grzywacz |
|
|
solart
Posting Yak Master
148 Posts |
Posted - 2002-08-15 : 16:18:05
|
| Any line starting with -- is considered a comment.I suspect that what appears visually to you as individual lines may be being treated as a single line by Q/A.Make sure your lines break by entering a "new line" character.solart |
 |
|
|
|
|
|