November 11, 2010 at 2:09 pm
We are running SQL Server 2005 SP3 on Windows Server 2003. I have some TSQL set up to run within a job. I put comments within the TSQL, see below:
PRINT ''
PRINT '************************************************'
PRINT '* BEFORE BB_BB60 BACKUP:'
PRINT '************************************************'
PRINT ''
PRINT ' '
PRINT ' '
PRINT ' '
GO
DECLARE @TimeStamp char(17)
SET @TimeStamp = (SELECT REPLACE(CONVERT(varchar(10),getdate(),112),'/','')) + (SELECT REPLACE(CONVERT(varchar(12),getdate(),108),':',''))
DECLARE @FileName char(75)
SET @FileName = 'd:\CCPS Database Maintenance\Backups\Weekly\bb_bb60_before_' + Substring(@TimeStamp,1,12) + '.bak'
BACKUP DATABASE bb_bb60 TO
DISK= @FileName
GO
I am trying to get blank lines to print within the Job's Output Text File by using the various Print Statements. The Job's Output Text File does not show the blank lines. When I run the code from a new query window the blank lines are displayed in the query output window.
How may I get blank lines to print in the Job's Output Text File?
Thanks in advance, Kevin
November 11, 2010 at 3:33 pm
Try carriage returns/line feeds.....
SELECT '' + CHAR(13) + CHAR(10)
+ '************************************************' + CHAR(13) + CHAR(10)
+ '* BEFORE BB_BB60 BACKUP:' + CHAR(13) + CHAR(10)
+ '************************************************' + CHAR(13) + CHAR(10)
+ CHAR(13) + CHAR(10)
+ CHAR(13) + CHAR(10)
+ 'END'
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply