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 / ankit kansal
One way of doing it is simple using aggregate function.
select year,sum(case when quarter='first' then amount end) as q1_amount
,sum(case when quarter='second' then amount end) as q2_amount
,sum(case when quarter='third' then amount end) as q3_amount
,sum(case when quarter='fourth' then amount end) as q4_amount from test group by year;
http://deepinopensource.blogspot.in/
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Whats there in global repository
Implementation methodology
Explain the shared cache and re-cache?
Explain transaction control transformation in informatica
What is an expression transformation in informatica?
Can we create a Integration service without a Repository service and vice versa?
How to handle decimal places while importing a flatfile into informatica?
What is expression transformation?
Scheduling properties,whats the default (sequential)
what is the size ur source like(file system or database)? how many record daily come u r banking project?
Differences between version 7.x and 8.x.
How to load data in informatica ?
what is INFORMATICA TESTING process
What are the new features of informatica 9.x in developer level?
What do you understand by a term domain?