There are some problems with the original in SQL 2000. Fix the error and run it through in SQL 2000.
/********************************************************
Author: (wleii165@yahoo.com)
Version: 1.0
Date Created: 20020227
Modified time:
Features: Lowercase amounts are converted to uppercase
Parameters: N_lowermoney Lowercase Amount
V_transtype species--1:directly translate, 0:read it in words
Output: Uppercase Amount
********************************************************/
CREATE PROCEDURE dbo. L2u
(
@n_LowerMoney Numeric (15,2),
@v_TransType int,
@RET VARCHAR (MB) output
)
As
Declare @v_LowerStr VARCHAR (200)--Lowercase amount
Declare @v_UpperPart VARCHAR (200)
Declare @v_UpperStr VARCHAR (200)--Capital amount
Declare @i_I int
SET NOCOUNT ON
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 '
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.