Viewing 2 posts - 1 through 2 (of 2 total)
You can actually avoid using trunctation. Consider that if @t is the sql agent time, @t % 100 will be seconds, @t % 10000 - @t % 100 will be...
August 23, 2012 at 4:09 pm
#1529485
You can also do this with two variables with one SELECT:
DECLARE @t varchar(max)
DECLARE @s-2 varchar(1)
SET @t = ''
SET @s-2 = ''
SELECT @t += @s-2...
March 21, 2011 at 6:27 am
#1301229