Converts a number to a spelling statement.

Source: Internet
Author: User

Convert a number to a spelling statement software environment Windows Server 2008 R2Oracle 11g Release 1 (11.1) Demonstrate converting a number to an English spelling SQL> select decode (sign (& num ), -1, 'negative ', 0, 'zero', NULL) | 2 decode (sign (abs (& num), + 1, to_char (to_date (abs (& num), 'J'), 'jsp ') 3 from dual; input num value: 1 original value 1: select decode (sign (& num),-1, 'negative ', 0, 'zero', NULL) | new value: 1: select decode (sign (1 ), -1, 'negative ', 0, 'zero', NULL) | input num value: 1 input num value: 1 Original Value 2: decode (sign (abs (& num), + 1, to_char (to_date (abs (& num), 'J'), 'jsp ') New Value 2: decode (sign (abs (1), + 1, to_char (to_date (abs (1), 'J'), 'jsp ')) DEC --- One SQL> select decode (sign (& num),-1, 'negative ', 0, 'zero', NULL) | 2 decode (sign (abs (& num), + 1, to_char (to_date (abs (& num), 'J'), 'jsp ')) 3 from dual; input num value: 5 original value 1: select decode (sign (& num),-1, 'negative ', 0, 'zero', NULL) | new value 1: select decode (sign (5),-1, 'negative ', 0, 'zero', NULL) | input num value: 5 Input num value: 5 original value 2: decode (sign (abs (& num), + 1, to_char (to_date (abs (& num), 'J '), 'jsp ') New Value 2: decode (sign (abs (5), + 1, to_char (to_date (abs (5), 'J '), 'jsp ') DECO ---- Five SQL> select decode (sign (& num),-1, 'negative', 0, 'zero ', NULL) | 2 decode (sign (abs (& num), + 1, to_char (to_date (abs (& num), 'J'), 'jsp ')) 3 from dual; input num value: 25 original value 1: select decode (sign (& num),-1, 'negative ', 0, 'zero', NULL) | new value 1: select decode (sign (25),-1, 'negative ', 0, 'zero', NULL) | input num value: 25 input num value: 25 Original Value 2: decode (sign (abs (& num), + 1, to_char (to_date (abs (& num), 'J '), 'jsp ') New Value 2: decode (sign (abs (25), + 1, to_char (to_date (abs (25), 'J '), 'jsp ') DECODE (SIGN ----------- Twenty-Five SQL>

Related Article

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.