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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -