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...

wtite sql query following table are
city gender no
chennai male 40
chennai female 35
bangalore male 10
bangalore female 25
mumbai female 15
i want the output?

city male female
chennai 40 35
bangalore 10 25
mumbai null 15

Answer Posted / santosh kumar sarangi

select city,max(decode(gender,'male',no)) as male,
max(decode(gender,'female',no)) as female from table_name
group by city

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will happen if the select list columns in the custom override sql query and the output ports order in sq transformation do not match?

915


What is the command used to run a batch?

994


Briefly explain the aggregator transformation?

942


Explain what are the different types of transformation available in informatica. And what are the mostly used ones among them?

991


what is granularity,what type of granularity we will take in fact tables either lowlevel or highlevel,if two tables having same granularity that is posiable or not

2266


What is transformation?

1050


What is complex mapping?

1068


What is the main purpose of Unconnected lookup other than updating slowly changing dimensions? or In which case u use Unconnected lookup?

7314


What are the databases that informatica can connect to windows?

1001


What is the difference between informatics 7x and 8x and what is latest version?

1023


What is the sequence generator transformation in informatica?

1093


Explain the types of transformations?

1005


Is stop and abort are same in informatica?

947


Why filter transformation is an active one?

929


What is confirmed fact in dataware housing?

6801