Select @v_LowerStr = LTRIM (RTRIM (STR (@n_LowerMoney, 20,2))--rounded to the specified precision and delete the left and right spaces
Select @i_I = 1
Select @v_UpperStr = '
while (@i_I <= len (@v_LowerStr))
Begin
Select @v_UpperPart = Case substring (@v_LowerStr, Len (@v_LowerStr)-@i_I + 1,1)
When '. ' THEN ' Yuan '
When ' 0 ' THEN ' 0 '
When ' 1 ' THEN '
When ' 2 ' THEN '
When ' 3 ' THEN ' three '
When ' 4 ' THEN ' Restaurant '
When ' 5 ' THEN ' Wu '
When ' 6 ' THEN ' land '
When ' 7 ' THEN ' qi '
When ' 8 ' THEN ' BA '
When ' 9 ' THEN ' nine '
End
+
Case @i_I
When 1 THEN ' min '
When 2 THEN ' Corner '
When 3 THEN '
When 4 THEN '
When 5 THEN ' pick '
When 6 THEN ' Bai '
When 7 THEN ' thousand '
When 8 THEN ' million '
When 9 THEN ' pick '
When ten THEN ' Bai '
When one THEN ' thousand '
When THEN ' billion '
When THEN ' picks '
When THEN ' Bai '
When THEN ' thousand '
When THEN ' million '
ELSE ' "
End
Select @v_UpperStr = @v_UpperPart + @v_UpperStr
Select @i_I = @i_I + 1
End
--the treatment of the amount below one yuan
if (substring (@v_UpperStr, 1, 1) = ' Yuan ')
Begin
Select @v_UpperStr = substring (@v_UpperStr, 2, (Len (@v_UpperStr)-1)
End
if (substring (@v_UpperStr, 1, 1) = ' 0 ')
Begin
Select @v_UpperStr = substring (@v_UpperStr, 2, (Len (@v_UpperStr)-1)
End
if (substring (@v_UpperStr, 1, 1) = ' Corner ')
Begin
Select @v_UpperStr = substring (@v_UpperStr, 2, (Len (@v_UpperStr)-1)
End
if (substring (@v_UpperStr, 1, 1) = ' min ')
Begin
Select @v_UpperStr = substring (@v_UpperStr, 2, (Len (@v_UpperStr)-1)
End
if (substring (@v_UpperStr, 1, 1) = ' whole ')
Begin
Select @v_UpperStr = ' 0 yuan int '
End
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.