Currency to number function

Hi all
Please can anybody tell me is there a function i can use(already exists) which converts a number into string. For example select '125 EUR' from dualresult: 125 EUR and we want to show them as
one hundred and twenty-five euroVersion: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
PL/SQL Release 11.1.0.7.0 - Production
"CORE     11.1.0.7.0     Production"
TNS for Linux: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - ProductionThanks in advance,
Bahchevanov.

Hi ,
Thanks for reply, it's a solution for me. But i wanna ask you if you know how to achieve this:
select spell_number(123.12) from dual;result: one hundred twenty-threeexpected output: one hundred twenty-three point twelvethis is the function:create or replace function spell_number( p_number in number)
return varchar2
as
  type myArray is table of varchar2(255);
  l_str  myArray := myArray ('',
                            ' thousand ', ' million ', ' billion ', ' trillion ',
                            ' quadrillion ', ' quintillion ', ' sextillion ',
                            ' septillion ', ' octillion ', ' nonillion ', ' decillion ',
                            ' undecillion ', 'duodecillion ');
  l_num varchar2(50) default trunc( p_number );
  l_return varchar2(4000);
begin
  for i in 1..l_str.count
  loop
    exit when l_num is null;
    if ( substr(l_num, length(l_num)-2, 3) <>0 )
    then
      l_return := to_char(to_date(substr(l_num, length(l_num)-2, 3), 'J'), 'JSP') ||
                  l_str(i) || l_return;
    end if;
    l_num := substr( l_num, 1, length(l_num)-3 );
  end loop;
  return lower(l_return);
end;Thanks in advance,
Bahchevanov.

Similar Messages

  • How to spell currency from number to words

    how to spell currency from number to words?
    Is there a built in function in oracle?
    Can anybody give me the code?
    thanks
    sharath

    ok, rewritten to work with nulls and numbers from -5373484.99$ to +5373484.99$
    SQL> set null "<NULL>"
    SQL> select
    to_char(comm, '$999999.99'),
    decode(comm, null, null,
      decode(sign(trunc(comm)),
        0, to_char(to_date(to_char(trunc(comm)),'SSSSS'),'ssssssp'),
        1, to_char(to_date('1','J')+(trunc(comm)-1),'jsp'),
       -1, 'minus '||to_char(to_date('1','J')+(trunc(comm)-1),'jsp')
      ) || ' dollars and '||
      to_char(to_date(to_char(mod(comm,1)*100),'SSSSS'),'ssssssp')||
      ' cents'
    from emp;
    TO_CHAR(COM DECODE(COMM,NULL,NULL,DECODE(SIGN(TRUNC(COMM)),0,TO_CHAR(TO_DATE(TO_CHAR(TRUNC(COMM)),'SSSSS'),'SSSSSSP'),1,TO_CHAR(TO_DATE('1','J')+(TRUNC(COMM)-1),'JSP
    <NULL>      <NULL>
        $300.00 three hundred dollars and zero cents
        $500.00 five hundred dollars and zero cents
    <NULL>      <NULL>
       $1400.00 one thousand four hundred dollars and zero cents
    <NULL>      <NULL>
    <NULL>      <NULL>
    <NULL>      <NULL>
    <NULL>      <NULL>
           $.00 zero dollars and zero cents
    <NULL>      <NULL>
    <NULL>      <NULL>
    <NULL>      <NULL>
    <NULL>      <NULL>

  • Is there a ¿ is number function ? in the  link editor

    Good afternoon all,
    I would like to test if a character is a number or a string .  ¿ How can I do it ? .  I can not find any function in the link editor .
    Thanks in advance,

    If you use the number() function here are the results you will get:
    number("300") returns 300
    number("abcde") returns error
    number("301abcde100") returns 301
    number("abde300") returns error
    a better way to test for a number only vs an alphanumeric string is to use the format function like this:
    format(300,"#") returns 300
    format("300","#") returns 300
    format("abcde","#") returns error
    format("301abcde100") returns error
    format("abde300") returns error
    regards, Steve

  • Paying Foreign Currency Invoice with Functional Currency

    Hi,
    Can anyone advise if I am able to pay a foreign currency invoice
    using functional currency in AP? Eg. if my functional currency
    is USD and invoice is in GBP, how can I pay in USD against the
    GBP invoice? Thank you and God bless you.

    Most versions of Oracle Financial system, allows the payment of
    Foreign Currency invoices in functional currency. If you tried
    to pay the Foreign Currency invoices in functional currency, and
    if you got error it could be due to of different reasons.
    One very common reason, is the lack of (refer currency
    conversion rate set up if you are not familiar) of a conversion
    rate in the date range of the invoice.

  • Problem using number function

    Hi!
    I used Publisher Desktop to design RTF template for FSG report.
    I had to make comparison between two values in XML I got from FSG and based on their values show or hide a field in the report.
    I used following commands to get values in variables:
    <?variable:prihod?><?translate( /MasterReport/fsg:RptDef/fsg:RptLine[@LinCnt='l100090']/fsg:RptCell[@ColCnt='c1004'],’,’,’’)?><?end variable?>
    <?variable:rashod?> <?translate(/MasterReport/fsg:RptDef/fsg:RptLine[@LinCnt='l100091']/fsg:RptCell[@ColCnt='c1004'],’,’,’’)?><?end variable?>
    then I used following choose to decide wether to show or not the values:
    <?choose: ?>
    <?when: @LinCnt='l100090'?><?end when?>
    <?when: @LinCnt='l100091'?><?end when?>
    <?when: @LinCnt=’l100092’?><?if: boolean(number($prihod) >= number($rashod))?><?fsg:RptCell[2]?><?end if?><?end when?>
    <?when: @LinCnt=’l100096’?><?if: boolean(number($prihod) < number($rashod))?><?fsg:RptCell[2]?><?end if?><?end when?>
    <?otherwise: ?><?fsg:RptCell[2]?><?end otherwise?>
    <?end choose?>
    It worked just as I planned but then I uploaded it to EBS.
    I generated XML from FSG.
    Then I invoked XML Report Publisher for that XML.
    But it ended with error with following message:
    Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert 0.00 to number.
    The value I'm checking with number function is 0.00.
    Now I don't understand where is the problem.
    My computer is set to Croatia-Croatian, whole text in word is set to Croatian.
    I uploaded the template with Croatia-Croatian.
    When invoking XML Report Publisher I choosed Croatia-Croatian.
    And locally it works and on the server it's not.
    Any ideas?

    I also tried now one trick but it didn't help and I ended even more confused.
    Originally number is in xml in following format:
    First I removed all the comas from the number because I read that group separators tend to confuse the xslt number function.
    Now I went one step further and I changed remaining decimal divider from dot to coma.
    Uploaded new template to EBS.
    Repeated the procedure and only difference is that now error says:
    Caused by: oracle.xdo.parser.v2.XPathException: Cannot convert 0,00 to number.
    I was sure that decimal separator was cause of the problems but now I'm not so sure anymore.
    Any ideas?

  • Is the XSLT format-number function supported by XMLType.transform()

    I am trying to use the XSLT format-number function in a stylesheet via myXMLType.transform(myXSL) without any luck. For example, <xsl:value-of select="format-number($myNum,'#,###.00')/>. This works ok under the java based XSLT engine.
    Is format-number supported by XML DB?
    I am running 9.2.0.5.
    Cheers
    Anthony

    I have upgraded to 10g and found that this now works.
    Cheers
    Anthony

  • Currency and Number Formats

    Hi Guys
    Is anybody aware of an equivalent of ISO 8601 that deals with Currency and Number formats?
    Thanks

    Thanks John
    My original question was a little ambiguous. What I'm really asking is whether, as with 8601, there is an agreed standard way of expressing numbers, (including currency). For instance, is there an 'approved' sign for indicating the start of the decimal portion, ('.' or ',')?
    The application already makes use of the various formatting utilities and ResourceBundles but I've been asked to investigate if there is an ISO specification that we should default to, (rather than just UK English). As I'm sure anybody who has used their site will appreciate, it is not overly simple to establish the existence and contents of a standard ;->
    Thanks in advance
    J

  • (V7.X) PRIME NUMBER 를 생성해 주는 FUNCTION

    제품 : SQL*PLUS
    작성날짜 : 1998-09-22
    (V7.X) PRIME NUMBER 를 생성해 주는 FUNCTION
    다음은 input value x 보다 크면서, 가장 작은 prime number 를 return 해 주는 function 입니다.
    create or replace function lprime (x in number) return number is
    w number;
    i number;
    begin
         w := x;
         if w <= 2
         then
              w :=3;
              return w;
         end if;
         if mod(w,2) = 0
         then
         w := w +1;
         end if;
         loop
         i:=3;
         loop
              if (i*i) > w
              then
              return w;
              end if;
              if mod(w,i) = 0
              then
              exit;
              end if;
              i := i + 2;
         end loop;
         w := w + 2;
         end loop;
    end;
    실행의 예
    SQL> select lprime(10000) from dual;
    LPRIME(10000)
    10007

  • Vendor-Customer balances in group currency-table/structure/function module?

    Hi All,
    Which table/structure/function module can be used to get balances for vendors and customers in group currency? We just wnat to extract balances in group currency so FBL1N and FBL5N are not options. Is there any SAP report which can provide these balances for both vendors and customers?
    Thanks and regards,
    Pinky

    Hi Pinky,
    I came across one report S_ALR_87012079 - Transaction Figures: Account Balance, Program RFSRRCUA, which extracts Account Balances of Vendor. Once the report is executed, you can do Currency Translation from one currency to different currencies. In the output screen, in the Top Menu, select 'Settings -> Currency' and you can convert to another currency. I am not sure, if this helps you. If this helps, kindly update your comments here.
    Thank you.
    Suresh Jayanthi.

  • Format Number Function

    Hello All,
    I am facing a problem in Message Mapping. In the Arithmatic Category we have used the function Format Number. The Number Format  is 0.0
    Decimal Separator is (BLANK)
    In this case If I input any value say 8 or 8.0 then the output should be 8.0. However, I am getting 8,0(COMMA Separator) as the output. This causes the Mapping to Fail.
    This problem occurs on one landscape where as on the other landscape it works fine and gives the output as expected.
    Can anybody help me on that?? Am I missing anything in configuration or are there some special settings for it??
    Kindly help.
    Regards,
    Rohit K

    Hi
    if you put the decimal separator as blank then it will use the . as a decimal separator.
    and when you use the ny other symbol in the decimal separator then it will use that sysmob as decimal separator.
    so please check in ur format number properties what u ahve given.
    Thanks
    Rinku

  • Time stamp to number function

    The Conversion VIs and Functions palette has a function that converts the number of seconds elapsed to a time stamp (To Time Stamp Function).  I need to go in the other direction, from a time stamp to a double (number of seconds elapsed since 12:00 a.m., Friday, January 1, 1904 Universal Time).  Does anyone have a function to do this?  I've tried to type cast with no success.
    Steve Hall
    [email protected]
    Solved!
    Go to Solution.

    Just use the To Double Precision Float function. It's polymorphic and it will accept a timestamp to return the number of seconds since the LabVIEW "zero-time".

  • Calculate single value as ranked number function does not apply in CR

    Hi everybody,
    I built up a query with the SAP BEx Query designer. For one key figure I enabled the function "Calculate single values" as ranked list. So the query has the following result.
    Instead of...
    Score
    1220
    2032
    2390
    2389
    ...I got...
    Score
    1
    2
    4
    3
    Unfortunately when importing the query to Crystal Reports Crystal is just importing the key figure itself - the ranked list does not exist... so the output is the same as in the first example.
    I tried to rebuild the formula with crystal means using the Rank function but I failed...
    Can anybody provide a workaround for me?
    Is there another way as using the formula workbench?
    Best regards,
    Sebastian

    Hi Ingo and everybody,
    I used now the following function using the Nth largest function:
    If nthlargest(1, {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]})
       = {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]} then "1"
    else if nthlargest(2, {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]})
       = {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]} then "2"
    else if nthlargest(3, {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]})
       = {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]} then "3"
    else if nthlargest(4, {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]})
       = {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]} then "4"
    else if nthlargest(20, {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]})
       = {TECHNAME_OF_QUERY.[Measures]-[9XU9YT56S6PRL7DR80I3DK9RA]} then "20"
    The formula is not very handsome and will fail, if the number of records exceeds...
    Are there any alternatives?
    And: Is there a possibility to change the field name, because those clumsy field names cause that the whole formula is almost unreadable. Or is the only way to build subreports?
    Regards,
    Sebastian

  • Production Order Serial Number Function Module

    Hi All,
    How can I get Production order Serial Numbers. Any function Module is there.
    I can get from the Delivery by using FM 'GET_SERNOS_OF_DOCUMENT'. But the delivery not yet done. I need to get
    the serial number from Production Order.
    Please advise.
    Pranitha

    Hi,
    Try giving the relevant fields in SER05 table (Like PPAUFNR-Order Number, PPPOSNR-Order Item Number, PPAUTYP-Order category, PPAUFART-Order Type, PPWERK-Plant etc).
    Now provide all the selected SER05-OBKNR into OBJK table and fetch the serial numbers form OBJK-SERNR field.
    i.e. SER05-OBKNR = OBJK-OBKNR and fetch OBJK-SERNR value.
    Regards,
    Harish

  • Format Number function in PI 7.10 SPS 7

    Hi,
    for those of you who used the FormatNumber function inside the Message Mapping, there is a quite strange change.
    You must enter a decimal delimiter. Inside release 7.00 this was not a must. The error message you will receive from the mapping is a little, well, unusefull:
    Check result for Message Mapping: MM_OSRBG_PP_SFC_TECO_RFC_REQUEST | http://osram-os.com/rbg/pp/sfc/teco/xi013:
    Target field mapping '/ns0:MT_OSRBG_PP_SFC_TECO_RFC/ROW/ORDERID' incomplete; reason: char should be not empty
    Well on my side the lead to several problems, because I had to assign fixed number length (without decimal digits).
    The only solution I had on this is to build an own user function in java doing the same.
    These are the two parameters given to the function:
    numberString
    numberFormat
    You have to import this:
    import java.text.*;
    And that's the code:
    int numberInteger = Integer.parseInt(numberString.trim());
    DecimalFormat piNumberFormat = new DecimalFormat(numberFormat);
    return piNumberFormat.format(numberInteger);
    BR Markus

    Hi Jan,
    Thanks for updating the forum with your finding. But uncheck the box "Mark this thread as a question" so that i does not look like a question.
    VJ

  • Customizing page number function wanted

    Dear all,
    Is it possible to have a more user-friendly 'Number pages'  function to  customize page number in the next update? The current 'Number pages'  function is very limited. It would be great to have options like  printing options, e.g., reverse the page order, select odds or even  pages etc. After renumbering, realign the renumbered pages in a  ascending or descending order. This could be done by printing the pdf to  a new pdf but if there are pages with different size in one pdf file,  it would be another chaos. Anybody, including developers, have a  solution please? Thank you in advance!
    Sincerely yours,
    liy_ggm

    But it's not a word processor - it's a text editor and they're not the same thing. It exists as some sort of bridge between the traditional unix editors (try opening a Terminal and then type "emacs" or if you're really feeling hot "vi" to see what those are like) and a word processor. It's close enough in appearance to a word processor that I can see how you'd expect w.p. features, but they just aren't there. For real word processing functionality use a word processor; Appleworks or somehting else.

Maybe you are looking for

  • Older ACD USB/Firewire ports and a Thunderbolt MBA.

    I have an older Apple Cinema Display (20) and a Thunderbolt MBA.  Can I use the Firewire ports on the ACD if I use a Thunderbolt to DVI adapter? Specifically, I have an older iSight external camera (Firewire based) that I would like to use with the A

  • How to list the vendors with CIN details.

    Hi all. I will get list of vendors using MKVZ or XKVZ, but this report does not contain CIN details for vendors. how can i get vendor list with CIN details..plz help me thanks ramesh reddy

  • IPhone 5 connection to my internet

    Trying to join my OWN network.  I keep getting the message 'unable to join network'.  My iPhones 4 and 4s had no problem, but my iPhone 5 does.  I am trying to update my software to 6.1.3.  HELP

  • PSE 9 Mac-I switched to a smaller monitor and can't determine how to shrink the window.

    I recently changed monitors from a 28" Cinema display to a 23" Cinema display (Mac) and discovered that the window is still being displayed for the larger monitor which means that the pallettes that are displayed on the right cannot be seen. How do I

  • How to embed a swf video into an html page?

    I am haing trouble embedding my swf video into my html page. Here is my code: <embed height="340" width="549" src="flashvideos/test.swf" allowscriptaccess="always" allowfullscreen="true" flashvars="&MM_ComponentVersion=1&skinName=C:/Users/RogerPa1/Do