write sql query following table
amount year quarter
1000 2003 first
2000 2003 second
3000 2003 third
4000 2003 fourth
5000 2004 first
6000 2004 second
7000 2004 third
8000 2004 fourth
i want the output
year q1_amount q2_amount q3_amount q4_amount
2003 1000 2000 3000 4000
2004 5000 6000 7000 8000
can anybady help me to achieve the aboue result by using informatica.
thanks in advance.
Answer Posted / hari
select * from (select year,
max(amount,quarter='first') q1_amount,
max(amount,quarter='second') q3_amount,
max(amount,quarter='third') q4_amount,
max(amount,quarter='fourth') q4_amount
from table_name group by year );
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Hi, In source I have records like this No name address 10 manoj mum 10 manoj dilhi 20 kumar usa 20 kumar Tokyo I want records in target like shown below No name addr1 addr2 10 manoj mum dilhi 20 kumar usa Tokyo If it is reverse we can do this by using Normalizer transformation by setting occurance as 2. Somebody will say use denoralization technique. But as of my knowledge I couldn’t find any denormalization technique. Is there any concept like that? I tryid this seriously but I could find any idea to implement this. Can any one please help me ? Advance Thanks
How to convert a row into column and a column into rows? Name all DTM threads. What all threads stop when we issue STOP or ABORT? How to pass the value of a data(variable kind of) from one session ( generated in mapping) to another session in the same workflow... What are the tyoes of partitioning you know and how to apply them in real time ... Can partitioning be applied to expression transformation and how
Explain in detail scd type 2 through mapping.
How can we delete duplicate rows from flat files?
Explain about cumulative Sum or moving sum?
What is decode in informatica?
what is informatica metadata?
What is xml source qualifier transformation in informatica?
What is lookup change?
How do you convert single row from source into three rows into target?
if we have a delimiters at unwanted places in a flat file how can we over come those.
What do you mean by filter transformation?
Hi, I want to do Informatica Designer certification. Can anyone help me by providing the details on this. Thanks in advance. Regards, Arnab
Debugger what are the modules, what are the options you can specify when using debugger, can you change the expression condition dynamically when the debugger is running.
what is $$$$?