Create Function [DBO]. [F_Num_Str] (@num int) returns varchar (100) asbegin declare @n_str varchar (20), @ I int search @ n_str = Cast (@num as varchar), @ i = 1, @ RE = '' while @i <= le (@n_str) begin set @ re = @ RE SUBSTRING ('zero one two three four five six seven eight nine ", casters (@n_str, @ i, 1) as int) 1, 1) set @ i = @ i 1 end return @reend
Zero Zibo Luo Lu Yu --- This is a spare, it is impossible to use this format.
--transfer
SELECT DBO.F_NUM_STR (12345789)
--return:
One two three four five seven eight nine