How to replace a new line character with row number within a string based on id following is the sample from one row from a table ,table has so many rows and each row should starts with 1.and so on.
sample data
I
am
Awesome
desired out put
1.I
2.am
3.Awesome
I tried to replace newline with rownumber but no success
select concat(1.,replace(field,char(10),cast(1+row_number()over(order by field) as varchar),'.') as desired_Formula from tbl
any help or suggestions are welcomed , It should be ideal if it's done without using cte.