oracle11g - Converting integer value from a db column to text in oracle -


i have requirement in db.

1).table abc, column: check_amount number number(18,4). contains check amount eg. 3000.50 paid employee.

now cheque issued , check contains check_amount in number in text form.for eg.check have:

pay <emplyee_name> ****$3000.50**** ****three thousand dollars , fifty cents****

i have generate text using db column value , display on check.

can me out, how can achieve in oracle 11g ?

hint:i have heard of julien format, not working. suggestions appreciated.

from nalin

since julian format works whole numbers, can separate decimal parts , apply julian format trick separated numbers. here's simple demo.

declare    x   number (8, 2) := 1253.5;    y   number;    z   number; begin    y := floor (x);    z := 100 * (x - y);    dbms_output.put_line (to_char (to_date (y, 'j'), 'jsp'));     if (z > 0)          dbms_output.put_line (to_char (to_date (z, 'j'), 'jsp'));    end if; exception    when others          dbms_output.put_line ('err:' || sqlerrm); end; 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -