formatting sql server PRINT messages? -
i have following print statement print details not tabbed , looks awful. there way print them in tabbed format meet @ same place in end of line.
print'bylineid: '+ convert (varchar,@bylineid,1 )+' , '+ convert(varchar,@count,1)+ ' matching records found, '+ convert(varchar,@@rowcount,1)+' updated.'
end result:
bylineid: 119952 , 168 matching records found, 0 updated. bylineid: 93979 , 56 matching records found, 0 updated. bylineid: 266021 , 45 matching records found, 0 updated. bylineid: 105976 , 44 matching records found, 0 updated. bylineid: 97525 , 40 matching records found, 0 updated. bylineid: 94138 , 39 matching records found, 0 updated. bylineid: 88967 , 37 matching records found, 0 updated.
print 'bylineid: '+ convert (varchar,@bylineid,1 ) + char(9) + ' , ' + convert(varchar,@count,1) + char(9) + ' matching records found, ' + convert(varchar,@@rowcount,1) + char(9) +' updated.'
add tab characters?
Comments
Post a Comment