Lowercase to uppercase amount _php tutorial

Source: Internet
Author: User
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 ...

  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.