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 following source
region sales
1 1000
2 2000
i want the output ?please give solution
1 2
1000 2000

Answer Posted / ankit kansal

Hi All,
As Question says Write a sequel query..


select sum(1),sum(2) from (
select case when region=1 then salary else 0 end as 1,
case when region=2 then salary else 0 end as 2
from table_name )test;

http://deepinopensource.blogspot.com/

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

According to his methodology what all you need before you build a datawarehouse

1720


How will the document be delivered to me?

1033


What are the tasks that can be performed using sq?

1043


What is the need of an ETL tool?

1046


Explain dynamic target flat file name generation in informatica

1021


can any one give some examples for pre sql and post sql(Except dropping and creating index).

4059


State the limitations where we cannot use joiner in the mapping pipeline?

1016


What is option by which we can run all the sessions in a batch simultaneously?

1095


Explain what is informatica metadata and where is it stored?

1008


Informatica Server and Client are in different machines. You run a session from the server manager by specifying the source and target databases. It displays an error. You are confident that everything is correct. Then why it is displaying the error?

1998


Which means the first record should come as last record and last record should come as first record and load into the target file?

1039


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

1595


How to load the data from people soft hrm to people soft erm using informatica?

963


Hi, I saw one mapping implemented by my seniors . In Expression transformation they implemented following logic. That is iif(is_date(in_UC_DATINV,'YYYYMMDD'),to_date(in_UC_DATINV,'Y YYYMMDD'),'Inventory Date is either invalid or null') Inventory_Date is validated only for is_date() But not validated for notisnull() . But error says “ either invalid or null “ why? Whether is_date() also check for not isnull() ? or in this logic something is different ? Please answer me . Advance thanks

1822


Explain the pipeline partition with real time example?

1096