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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / chiky
if its in oracle database,use
select id, name, (SELECT TO_CHAR (TO_DATE sal, 'j'), 'jsp')
FROM DUAL) sal from <source_table_name>
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / krish
decode(sal,65020,Sixty five thousand twenty)
decode(sal,78250,Seventy thousand two fify)
decode(sal,58264,Fifty eight thousand two sixty four)
Is This Answer Correct ? | 3 Yes | 10 No |
How will you combine 3 different sources with a single source?
How do you remove duplicate records in informatica? And how many ways are there to do it?
What is best approach to load 100 different source files (Different structure) to differet target tables ?
Hi Everybody, I have one fixed width file as source and 4 oracle tables (relational) as target. What are the Unit test cases i need to implement ? 1.Using TextPad software i tested postion of the field 2.As per specification i tested like whether it is correctly mapped or not? Is there any other test case do i need to implement. If possible can any one give me the test cases Advance Thanks
Can we use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?
What happens if the info. Server doesn't find the session parameter in the parameter file?
What is the need for an etl tool?
What are the components of the workflow manager?
Could anyone please mail me a copy of Informatica Certification Exam dumps to sandeep.nakka@gmail.com it would be appreciated if any one could help me out.
My i/p is like below 1,2,3,4,5,6,7,8,9,10....100 I want that to be populated in two o/p as below o/p-1: 10,20,30,40,50,60,70,90... o/p-2: 11,21,31,41,51,61,71,81,91.... How to do it in ingotmatica...
every DWH must have time dimension so now what is the use of the time dimension how we can calculate sales for one month,half-yr'ly,and year'ly?how we are doing this using time dimension.
What are the various types of transformation?