How to represent numerical values in words?
I have a report for purchase order where in the order value to be reprented in words.Hope someone can give me the right method of doing it.
Thanks
Jay
Hi,
Please refer Re: Installation requires too many services to stop I think the given link has code for both - a function as well as a procedure - should solve your problem
Thanks,
Puvan.
Similar Messages
-
Numeric value in words (for Cheque printing)
Hi All,
To convert numeric value in words (for Cheque printing), I created two functions in Forms and reports 6i.
1) FUNCTION Spell (val number) RETURN CHAR IS
sp varchar2(100);
BEGIN
if val > 0 then
return(initcap(to_char(to_date(val, 'SSSSS'), 'SSSSSSP')));
else
return('');
end if;
END;
2) function SPELLED_AMOUNTFormula return Char is
cents number;
c_str varchar2(80);
val number;
begin
val := :p_instr_amt;
cents := (val mod 1) * 100;
if cents > 0 then --creates string for cents
c_str := ' and ' || spell(TO_CHAR(cents)) || ' fils Only';
else
c_str := ' Only';
end if;
if val < 1000 and val > 1 then
return (initcap(spell(floor(val))) || c_str);
elsif val > 1000 then
return(initcap(spell(floor(val/1000))) || ' Thousand ' ||
spell(floor(val mod 1000)) || c_str);
else
return('Zero'||c_str);
end if;
end;
This convert value up to thousands. How to convert the value more than 1 lac. please configure this code.
Thanks in advanceHi,
To spell integers as high as 5,373,484, use 'Jsp' instead of 'ssssssp'.
TO_CHAR ( TO_DATE ( n -- n = integer to be spelled
, 'J'
, 'Jsp' -- Case-sensitive
)5373484 is the Julian date of December 31, 9999, the latest DATE value in Oracle. In Oracle 10.2, you can actually spell numbers a little bit higher using the expression above, but I'm not sure why, and I wouldn't count on being able to do so in future versions.
There's no need for INITCAP here. If the 2nd argument to TO_CHAR is initcapped (as above), then the output will be, too.
To spell even larger numbers, see this page by Tom Kyte, which also includes languages other than English, and lakh-crore-arab-kharab wording.
Edited by: Frank Kulash on Oct 13, 2012 7:21 AM -
How to copy NCLOB value(Contains Word Document) into file system
How to copy NCLOB value(Contains Word Document) into file system or display in sqlplus
The UTL_FILE package will write it only to text file not(NCLOB Value[containts images as well as text])
-
Get numeric values of word spacing displayed?
while there are two ways to influence the word spacing (by setting the minimum, desired, and maximum values in the Justification settings, and by using the keyboard short cut increasing or decreasing word spacing), I cannot find where the resulting word spaces are displayed as numeric values. Since kerning values are easily looked into, I presume there must be a way to have the word spacing values displayed, too. But how?
It's not a known item in Javascript -- it would need to be a private property of the Line class, as each single line has its own word spacing adjustment.
But using two javascripts you can find out how much the space on each line is stretched or compressed.
First, you need to know the width of a regular space in the font and size (and other parameters as well, such as tracking and horizontal scaling!). Select one single space in Left Aligned text and run this script:
alert ( app.selection[0].insertionPoints[1].horizontalOffset - app.selection[0].insertionPoints[0].horizontalOffset);
It will show a popup with a ridiculous exact number. Myriad Pro at 8 pts, for example, gives "0.59828389485676". Now press Ctrl+C to copy this text (I'm not sure if the Mac can do this as well!). Go to another script and paste just the number in there:
regularWordSpace = 0.59828389485676;
alert ( 100*(app.selection[0].insertionPoints[1].horizontalOffset - app.selection[0].insertionPoints[0].horizontalOffset)/regularWordSpace);
If you select any justified space (again, using the same font, size, tracking, whatnot), it'll display a fairly reliable percentage, yeah, unto the seventh generation of exactitude and more. -
How 2 convert numeric value to character value?
Hi friends,
I want to convert numeric value to the character value.
Is there any FM available?
Points rewared soon.
Regards
RonnREPORT ZSPELL.
TABLES SPELL.
DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '1234510'.
SY-TITLE = 'SPELLING NUMBER'.
PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
FORM SPELL_AMOUNT USING PWRBTR PWAERS.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
AMOUNT = PAMOUNT
CURRENCY = PWAERS
FILLER = SPACE
LANGUAGE = 'E'
IMPORTING
IN_WORDS = T_SPELL
EXCEPTIONS
NOT_FOUND = 1
TOO_LARGE = 2
OTHERS = 3.
ENDFORM. " SPELL_AMOUNT -
How to convert from value to word ?
Hi all,
I intend to convert from value into words such as 234.50 will be two hundred and thirty four and cents fifty. How should I code or any function will able to produce this ?
Please advise.
Rgds
LimLim
The SP format modifier spells out part of a date - so does YEAR:
SQL> select to_char(sysdate,'YEAR') from dual
2 /
TO_CHAR(SYSDATE,'YEAR')
TWO THOUSAND EIGHT
SQL> To spell out a money amount, you have to take a decimal number and break it into dollars and cents (both integers):
SQL> r
1 declare
2 amount number(10,2) := 12345.67;
3 dollars integer;
4 cents integer;
5 begin
6 dollars := floor(amount);
7 cents := (amount - dollars) * 100;
8 dbms_output.put_line(to_char(to_date(dollars,'J'), 'JSP') || ' dollars a
nd ' ||
9 to_char(to_date(cents,'J'),'JSP') || ' cents');
10* end;
TWELVE THOUSAND THREE HUNDRED FORTY-FIVE dollars and SIXTY-SEVEN cents
PL/SQL procedure successfully completed.
SQL>Note that the spelling out is rather american (in UK we wouldn't add the hyphen and we would say twelve thousand three hundred AND forty five).
Using JSP means we are spelling out a Julian date (ie a number of days, which is allowed to get pretty large. But watch out - there is a limit (somwhere between 1 and 10 million) - ie the number of days between minimum date (4172 BC) and max date (around 31/12/9999).
HTH
Regards Nigel -
How can change numeric value to date format? example value 1070131(CYYMMDD)
in the datatable can i change numeric value to date format . in database date value is like 1070131 (CYYMMDD). I want to see 31/01/07(DD/MM/YY) or 31 Jan 07 . Is it possible?
Thanks,Did you solve your problem?
-
I need to filter out certain numeric values from a column.
The column has mix values of 1, 02, MA, sentences, A, 500.00,
2059678974, 006702.
I used IsNumeric() to filter out non-numeric values like A or
sntences, MA, etc. But I also need to filter out 1, 2 and 3 digits
numbers and floating typed number (234.00 or 324,345)
Can anyone tell me what function can I use to get a pure 4 to
6 digits number?A much better way to do this is:
<CFIF REFind ("^[0-9]{4,6}$", yourString)>
<!--- It's good. --->
<CFELSE>
<!--- It's bad. --->
</CFIF>
However, the BEST way is to select these columns right in the
query.
Most RDBM's can easily do this. Syntax depends on which RDBMS
you are using. -
How to represent multiple values in one column
Hi,
I need some help in designing a schema for this problem.
I have :
- 4 domains
- In each domain there will be many groups
- users belong to multiple groups in multiple domains
Eg.
user1 might be in groups g1, g2 and g3 in domains d1, d2
In a text file I represent it like this:
user1 | d1 | g1,g2,g3
user2 | d2 | g1, g2
etc.,
How do design a schema for this. I don't like the idea of having comma
separated values in columns.
Thanks.Good instincts. You don't want to have comma-separated values in a column, that violates basic normalization rules.
You would probably want something like this
CREATE TABLE usr (
user_pk
user_id
CREATE TABLE grp (
group_pk
group_id
CREATE TABLE domain (
domain_pk,
domain_name
CREATE TABLE domain_group (
domain_pk,
group_pk
CREATE TABLE user_group (
user_pk,
group_pk
)where you create separate tables that map different things to each other. domain_group shows which groups are associated with a particular domain, user_group shows which users are associated with a particular group.
Justin -
How to represent negative values in SSRS textbox
hi all,
In my report i need to show values with -(minus) symbol.
in sp i took abs(col1)-abs(col2)-----------where col2>col1
result is correct but value is not showing with minus symbol
for eg: if col1 value is 9 and col2 is 19 result i'm getting is 10..but i need as -10
how can i do in SP level or can i do it in rdl with any function.
i used abs() but no use..
pls help
thanks in advance..
luckySelect the field then properties
Andy Tauber
Data Architect
The Vancouver Clinic
Website | LinkedIn
This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
"Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread. -
How to reperesent numeric values in Flex charts according to French format?
Hi All,
I need to convert existing Flex application from English to French. I want to know if there is a way to handle the numbers in French format when using in charts. For instance, if in English the number is represented as: 123.45 in French it will be: 123,45 (note the comma being used in place of decimal point).
Please suggest a solution as to how to handle this.I Think There May Be Concept Of Locale Attribute in compiler Setting In Project Properties.
-
How to get numerical value for every button
Hi,
Currently I am using a case structure to determine which graph i want to display. For example, each case( i have 7 cases), there is a frequency,amplitude dial which user can change it. So basically there are 7 of those. Let say the user want to change case 1 and display those. I've plan to place a button PLAY beside the frequency dial so that it will activate the case 1. But the problem is how can i do that as the input for the case structure is numerical (0-6) to select the case. How can i activate case 1 for an example, when i click the button PLAY beside the first dial? Is it possible to change the configuration of the button PLAY, so that when its activated, it will give out numeric 1 and i wire to the case structure input? Thanks guys.Maybe you want to use a single radiobutton control with seven items?
Here's a quick example.
(Also, see what happens if you wire the radiobutton control to a case structure. )
LabVIEW Champion . Do more with less code and in less time .
Attachments:
SelectWithRadio.vi 22 KB -
How to remove numeric value in the fields of a table
Environment: SQL Server 2008R2
Tools: MSMS
Code:
a. Table Definition
USE [DLPT_CMS1_RESTORE]
CREATE TABLE [dbo].[Mocha]
[id] [int] IDENTITY(80,1) NOT NULL,
[Login_ID] [char](10) NULL,
[PE4] [varchar](8000) NULL,
[PE9] [varchar](8000) NULL,
[PE11] [varchar](8000) NULL,
[PE15] [varchar](8000) NULL,
[PE17] [varchar](8000) NULL,
[PE20] [varchar](8000) NULL,
[PE22] [varchar](8000) NULL,
[PE25] [varchar](8000) NULL,
[PE28] [varchar](8000) NULL,
[PE29] [varchar](8000) NULL,
[PE27] [varchar](8000) NULL
b. data
Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
Values (293595,293595,293737,293737,293737,293737,293737,293737,'I dont think 12 week program is hard',293737,293737,'antiinflamatory- this helps to fight free radicals and ward off disease.')
Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
Values (293841,293841,293841,293841,'293841 I feel that the product should be more holistic'
,'293841 I would like for the customer support to give more immediate feedback'
,'293841 Fends off alzeimer disease and dementia. It has been proven to destroy the amaloid plaques that are believed to be a cause of dementia and memory loss',
293841,293841,293841,293841,293841,293841)
Challenge:
1. Delete / Remove login_ids from a string found in one or more of the fields in Mocha table
Example: the following string contains login_id '293841 I would like for the customer support to give more immediate feedback' , remove the login_id in the narrative field which could be PE4, PE22. or PE28
2. Count the response or narrative field for each column after the deletion is completed
My script and still working progress
SELECT * FROM MOCHA
WHERE ISNUMERIC(PE4) = 1 and [PE4] like '%[0-9]%'
Thanks for the supportI added a new data which shows inaccurate results using your last updated code. The mistake appears in the 3rd row culomn name PE25 is null but counts it as 1
CREATE TABLE [dbo].[Mocha]
[id] [int] IDENTITY(80,1) NOT NULL,
[Login_ID] [char](10) NULL,
[PE4] [varchar](8000) NULL,
[PE9] [varchar](8000) NULL,
[PE11] [varchar](8000) NULL,
[PE15] [varchar](8000) NULL,
[PE17] [varchar](8000) NULL,
[PE20] [varchar](8000) NULL,
[PE22] [varchar](8000) NULL,
[PE25] [varchar](8000) NULL,
[PE28] [varchar](8000) NULL,
[PE29] [varchar](8000) NULL,
[PE27] [varchar](8000) NULL
Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
Values (293737,293737,293737,293737,NULL,293737,NULL,293737,'I dont think 12 week program is hard',293737,293737,'antiinflamatory- this helps to fight free radicals and ward off disease.')
Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],
[PE15],[PE17]
,[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
Values (293841,293841,293841,293841
,'293841 I feel that the product should be more holistic'
,'%%293841%% I would like for the customer support to give more immediate feedback'
,'%%293841%% Fends off alzeimer disease and dementia. It has been proven to destroy the amaloid plaques that are believed to be a cause of dementia and memory loss'
,293841,NULL,NULL,293841,293841)
Insert into Mocha (Login_ID,[PE4],[PE9] ,[PE11],[PE15],[PE17],[PE20],[PE22],[PE25],[PE28], [PE29],[PE27])
Values (293735,'293735 my name',NULL,NULL,NULL,NULL,NULL,NULL,'%%293735%%I dont think',293735,293735,'this helps to fight free radicals and ward off disease')
select
Replace(Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE4
,Replace(Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE9
,Replace(Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE11
,Replace(Replace([PE15],RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE15
,Replace(Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','')PE17
,Replace(Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE20
,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE22
,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE25
,Replace(Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE28
,Replace(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''),'%','') PE29
,(case when len(PE4)-Len(Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe4] is null or Replace(PE4,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP4
,(case when len(PE9)-Len(Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe9] is null or Replace(PE9,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP9
,(case when len(PE9)-Len(Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe11] is null or Replace(PE11,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP11
,(case when len(PE15)-Len(Replace(PE15,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe15] is null or Replace(PE15,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP15
,(case when len(PE17)-Len(Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe17] is null or Replace(PE17,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP17
,(case when len(PE20)-Len(Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe20] is null or Replace(PE20,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP20
,(case when len(PE22)-Len(Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe22] is null or Replace(PE22,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP22
,(case when len(PE25)-Len(Replace(PE25,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe25] is null or Replace(PE25,RTRIM(Cast(Login_ID as varchar(10))), '') ='' Then 0 Else 1 End) cntP25
,(case when len(PE28)-Len(Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe28] is null or Replace(PE28,RTRIM(Cast(Login_ID as varchar(10))), '') =''Then 0 Else 1 End) cntP28
,(case when len(PE29)-Len(Replace(PE29,RTRIM(Cast(Login_ID as varchar(10))), ''))=0 or [pe29] is null or Replace(PE29,RTRIM(Cast(Login_ID as varchar(10))), '') =''Then 0 Else 1 End) cntP29
from mocha -
How to Change Numeric Value into Character Value in Reports at run-time?
Hi,
I am creating some reports, in which i am facing a problem.
i have an AMOUNT field of "NUMBER" data type in a table, I want to show the AMOUNT value in Character at run-rime.
For example, if AMOUNT is 12000 then it should be converted into Character like "Twelve Thosand".
Please help me to make it clear.
Thanking you in advance.u can get decimal points through this function
FUNCTION amt_2_word(amt varchar2) RETURN Char IS
BEGIN
declare
--TYPE v_arr IS VARRAY(6) of varchar2(3);
len number;
i number;
t_amt varchar2(100);
t_word varchar2(20000);
last_3rd varchar2(1);
main varchar2(1000); -- number in format main.sub
--v_main v_arr := v_arr('00','0','00','00','000');
v_main1 varchar2(3) := '00';
v_main2 varchar2(3) := '0';
v_main3 varchar2(3) := '00';
v_main4 varchar2(3) := '00';
v_main5 varchar2(3) := '000';
sub varchar2(1000);
res_1 varchar2(32000);
res_2 varchar2(32000);
res_3 varchar2(32000);
res_4 varchar2(32000);
res_5 varchar2(32000);
res varchar2(32000);
begin
t_amt := lpad(amt, 10, '0');
len := length(amt);
i := instr(amt, '.');
if i = 0 then
main := lpad(amt, 10, '0');
sub := '';
else
main := lpad(left(amt, instr(amt, '.')-1), 10, '0');
sub := rpad(right(amt, len - instr(amt, '.')), 2, '0');
end if;
v_main1 := right(main, 2);
v_main2 := left(right(main, 3), 1);
v_main3 := left(right(main, 5), 2);
v_main4 := left(right(main, 7), 2);
v_main5 := left(main, 3);
if v_main1 <> '00' then
res_1 :=getTwo(v_main1);
end if;
if v_main2 <> '0' then
res_2 := getOne(v_main2) || ' Hundred ';
end if;
if v_main3 <> '00' then
res_3 := getTwo(v_main3) || ' Thousand ';
end if;
if v_main4 <> '00' then
res_4 := getTwo(v_main4) || ' Lac ';
end if;
if v_main5 <> '000' then
last_3rd := left(right(v_main5, 3), 1);
if last_3rd <> '0' then
res_5 := getOne(last_3rd) || ' Hundred ';
end if;
res_5 := res_5 || getTwo(right(v_main5, 2)) || ' Crore ';
end if;
res := 'Rupees ' || res_5 || res_4 || res_3 || res_2 || res_1 || ' ';
if sub is null then
res := res || 'Only';
else
res_1 := getTwo(sub);
res := res || 'and Paise ' || res_1 || ' Only';
end if;
return res;
end;
END;
u write this PL SQL in ur databse and u can use this function and get amount to word -
How to represent a -1 numeric value with text?
Hi All,
Question: How do I get the value of negative one (-1) in a numeric column to display as "all"?
Background: For our lottery players, they are able to opt in to various automated alerts. One column is an integer value representing one of five different thresholds for sending an alert: 10,000, 50,000, 100,000, 500,000, and -1. The -1 value
actually represents all of the other 4 values, or simply "all thresholds," meaning "send me an alert at every one of these thresholds."
What is the best way to represent the -1 value in the cube? A user won't understand that -1 is equivalent to "all choices". I could change the view so that the column is a string instead of an integer, but I assume this is going to
affect the cube in a negative way, such as unexpected sorting, etc.
I asked our resident SSAS guy if a numeric value could be displayed (not read) as "all values" while actually storing the -1 value, but all he could suggest was changing the data type and using a case statement to replace -1 with "all values."
This does not seem like a fix to me.
Is there a way to make SSAS display a negative one value as "all choices" without changing the data type of the source column itself?
Thanks,
Eric BNormally you would have a lookup on the number and a text value for the result displayed to users in the cube.
KeyValue
DisplayValue
10000
$10,000
50000
$50,000
100000
$100,000
500000
$500,000
-1
All Values
Maybe you are looking for
-
Has anyone done an interface to the document management system "Doc View"? We have a need to synchronously look up documents in Doc View and return the status back to SAP. We want to know if the doc was found (Y or N) and in another interface actuall
-
Error Installing 8i in UNIX Open Server 5.0.5
Dear Friends, When I installing Oralce8i in Unix open Server 5.0.5 box,I am getting this error. relocation error: symbol not found:real path. I copied the entire oracle 8i disk to location /orasoft and from there I am running the ./runInstaller Insta
-
Can't write to external disk after cloning startup disk to it
After cloning my PowerBook Pro's startup disk to an external Thunderbolt drive, and temporarily using that drive to boot-up, the Thunderbolt drive is locked into Read Only mode. How do I enable it to write again? The INFO pane says the following: Sy
-
Desktop Software installation won't start
I downloaded version 4.7 Desktop Software w/o media manager for XP SP3. When I run it, it extracts the file, and the installshield starts up in the lower-right corner of the screen. When it gets to 100%, it disappears... and then nothing else happe
-
Error occurred while loading 0cust_sales hierarchy
Hi, Could you please help me in resolving the below error occurred while loading hierarchy data to 0CUST_SALES hierarchy, please see the below screen shots: Regards, Anusha