There are some problems with the original in SQL 2000. Fix the error and run through in SQL 2000.
/********************************************************
Author: (wleii165@yahoo.com)
Version: 1.0
Creation Time: 20020227
Modification Time:
Function: Lowercase amount converted to uppercase
Parameter: N_lowermoney lowercase amount
V_transtype Type--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 ($) output
)
As
Declare @v_LowerStr VARCHAR (200)-Lowercase amount
Declare @v_UpperPart VARCHAR (200)
Declare @v_UpperStr VARCHAR (200)--capitalization amount
Declare @i_I int
SET NOCOUNT ON
Select @v_LowerStr = LTRIM (RTRIM (STR (@n_LowerMoney, 20,2))--rounded to the specified precision and deleted data 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
When '. ' Then ' Yuan '
When ' 0 ' then ' 0 '
When ' 1 ' then ' one '
When ' 2 ' Then ' Ii. '
When ' 3 ' then ' three '
When the ' 4 ' then ' the restaurant '
When ' 5 ' Then ' ng '
When ' 6 ' Then ' land '
When ' 7 ' Then ' QI '
When ' 8 ' Then ' BA '
When ' 9 ' Then ' JIU '
END
Case @i_I
When 1 Then ' minutes '
When 2 Then ' Corner '
When 3 Then '
When 4 Then '
When 5 Then ' pick '
http://www.bkjia.com/PHPjc/631137.html www.bkjia.com true http://www.bkjia.com/PHPjc/631137.html techarticle There are some problems with the original in SQL 2000. Fix the error and run through in SQL 2000. /******************************************************** Author: (wleii165@yahoo.com) version: 1 ...