i have source data like

id name sal
1 a 65020
2 b 78250
3 c 58264

but how to get target like this

id name sal
1 a Sixty five thousand twenty
2 b Seventy thousand two fify
3 c Fifty eight thousand two sixty four

Answer Posted / rahul singh

We can use a simple function (TO_CHAR(TO_DATE(1234567,'J'),
'JSP')) this will return you ONE MILLION TWO HUNDRED
THIRTY-FOUR THOUSAND FIVE HUNDRED SIXTY-SEVEN . But this has
limitation to be used only for numbers between 1 and 5373484
.For numbers larger than that use following function and
call it in informatica through external function
transformation .

create or replace
2 function spell_number( p_number in number )
3 return varchar2
4 as
5 type myArray is table of varchar2(255);
6 l_str myArray := myArray( '',
7 ' thousand ', ' million ',
8 ' billion ', ' trillion ',
9 ' quadrillion ', '
quintillion ',
10 ' sextillion ', ' septillion ',
11 ' octillion ', ' nonillion ',
12 ' decillion ', ' undecillion ',
13 ' duodecillion ' );
14
15 l_num varchar2(50) default trunc( p_number );
16 l_return varchar2(4000);
17 begin
18 for i in 1 .. l_str.count
19 loop
20 exit when l_num is null;
21
22 if ( substr(l_num, length(l_num)-2, 3) <> 0 )
23 then
24 l_return := to_char(
25 to_date(
26 substr(l_num,
length(l_num)-2, 3),
27 'J' ),
28 'Jsp' ) || l_str(i) || l_return;
29 end if;
30 l_num := substr( l_num, 1, length(l_num)-3 );
31 end loop;
32
33 return l_return;
34 end;

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use procedural logic inside infromatica?

636


Explain how to import oracle sequence into informatica?

590


What happen when you enable grid option avilable at session level ? (Ans found: Scalabily . A single session Parallelization) But how can one session is sharable among different nodes at the same time while running ?

1897


What do think which one is the better joiner or look up?

726


What is the Process to creating lookup transformation in informatica

585






can any one explain me what i have to tell about insurance project in interview,,,,when he asked to tell about ur project

2135


What happens to map if we alter the datatypes between source and its corresponding source qualifier?

603


What do you mean by blocking transformation?

585


permutations of mapplet

2038


Can informatica load heterogeneous targets from heterogeneous sources?

695


what is degenerated dimension?

3152


I am new to informatica and learning it,can anybody please tell me how we receive source as flat file in informatica,from where we get this flat file?

1320


How to create Target definition for flat files?

754


Some flat files are there, out of these having some duplicate. How do you eliminate duplicate files while loading into targets?

1322


How to Create a folder using pmrep command?

624