create table test (id int, col varchar(10)) insert into test values (1,'a*b*c*'),(2,'a*b'),(3,'*b*c*d') select col+ replicate('*',5-(len(col)-len(replace(col,'*',''))) ) from test drop table test
↧
T-SQL Question
↧