Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a query row to column follwing source?

quarter sales
q1 5000
q1 9000
q1 7000
q1 6000
q2 5000
q2 4000
q2 3000
q2 1000
q3 4000
q3 3000
q3 1000
q3 2000
q4 5000
q4 400
i want the output?
q1 q2 q3 q4
sales

Answer Posted / ankit kansal

Hi All,
select sales,sum(q1),sum(q2),sum(q3),sum(q4)
from
select 'sales' as sales
,case when quarter='q1' then sales else 0 end case as q1
...q2
...q3
...q4
)temp group by sales;

http://deepinopensource.blogspot.in/

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What if the source is a flat-file?

1069


Can we get 1st record through Informatica(without sequence number).

1433


How to differentiate between the active and passive transformations?

1107


4 yrs etl devloper roles and responsibilities?any body give solutions

2108


How does the aggregator transformation handle null values?

1112


How do you convert single row from source into three rows into target?

1116


What is the difference between Active and Passive transformation?

1109


What is transformation?

1070


Name at least 5 different types of transformations used in mapping design and state the use of each.?

1112


What are different types of transformations available in informatica?

957


what are the Methods For Creating Reusable Transformations?

1127


What are the types of data warehouses?

1459


Can we create a Integration service without a Repository service and vice versa?

1191


Explain in detail scd type 2 through mapping.

1009


How to configure mapping in informatica?

1143