SQL functions for converting sum to number in words
Replenishment date: 20.02.2012
Content: numtostr_sql.rar (2.55 KB)
️Automatic issue of goods ✔️
️Automatic issue of goods ✔️
Sales:
0
Refunds:
0
Reviews:
0
Views:
421
Seller discounts
for all goods
for all goods
The goods are given a discount for regular customers.
If the total amount of purchases from a VSbest seller is more than:
If the total amount of purchases from a VSbest seller is more than:
the discount is: 3%
Description
SQL scripts are implemented as 2 functions:
1.translation of any integer number into a number in words
2.transferring the amount of money in words
Maximum integer value for translation: 999 999 999 999 999 (999 trillion, etc.)
When transferring funds, it is added in the required form (ruble / ruble / rubles and kopeck / kopecks / kopecks).
Examples of using:
1) ten million four hundred and eighty-one thousand ninety-three
2) nine hundred ninety nine trillion nine hundred ninety nine billion nine hundred ninety nine million nine hundred ninety nine thousand nine hundred ninety nine
3) nine thousand one hundred twenty three rubles one kopeck
4) nine thousand one hundred twenty-three rubles twenty-three kopecks
The code does not use any new SQL chips, so the functions will work in Microsoft SQL Server with version 2000 or higher.
Since the script code is open source, if necessary, you can make any changes (for example, change rubles to euros or dollars) or change for support in other DBMS.
1.translation of any integer number into a number in words
2.transferring the amount of money in words
Maximum integer value for translation: 999 999 999 999 999 (999 trillion, etc.)
When transferring funds, it is added in the required form (ruble / ruble / rubles and kopeck / kopecks / kopecks).
Examples of using:
1) ten million four hundred and eighty-one thousand ninety-three
2) nine hundred ninety nine trillion nine hundred ninety nine billion nine hundred ninety nine million nine hundred ninety nine thousand nine hundred ninety nine
3) nine thousand one hundred twenty three rubles one kopeck
4) nine thousand one hundred twenty-three rubles twenty-three kopecks
The code does not use any new SQL chips, so the functions will work in Microsoft SQL Server with version 2000 or higher.
Since the script code is open source, if necessary, you can make any changes (for example, change rubles to euros or dollars) or change for support in other DBMS.
Additional Information
There are 2 files with functions in the archive: each file contains an SQL function.