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


Create 12 columns for months by writing single case statement?



Create 12 columns for months by writing single case statement? ..

Answer / naresh

To create 12 columns for months by single case statement :-

Step-1: Create one derived column and name it as 'months'.

Step-2:In Derived Expression use the below case statement and click on ok -

case
when extract(month,DATE_Column)=1 then 'JAN'
when extract(month,DATE_Column)=2 then 'FEB'
when extract(month,DATE_Column)=3 then 'MAR'
when extract(month,DATE_Column)=4 then 'APR'
when extract(month,DATE_Column)=5 then 'MAY'
when extract(month,DATE_Column)=6 then 'JUN'
when extract(month,DATE_Column)=7 then 'JUL'
when extract(month,DATE_Column)=8 then 'AUG'
when extract(month,DATE_Column)=9 then 'SEP'
when extract(month,DATE_Column)=10 then 'OCT'
when extract(month,DATE_Column)=11 then 'NOV'
when extract(month,DATE_Column)=12 then 'DEC'

end

Step-3: Click on derived Column 'Months' and go to 'Structure' tab in File Menu and then click and 'Pivot list to Cross tab '

Step-4: Run and check the report.
Thats it ..

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Cognos Interview Questions

What is the use of report studio?

0 Answers  


how to create average on totals of different departments employees salary...? consider we have 3 dept and in each dept 10-15 workers i need to get the totals separately for each dept and average of there totals..help me pls

2 Answers   Patni,


what r the filters in fwm and report studio

6 Answers   TCS,


hi guys, i think this would be a simple question but i was asked. what is total time taken to develop a report from getting requirement document from the client? dont reply as it depends,i am expecting something else.

2 Answers   WNS,


how u migrate the reports from impromptu to reportnet???

3 Answers   Wipro,


How can you improve performance in report studio level? What is the difference between Cognos sql and Native sql? How can you create cubes in framework manager?

7 Answers   Genpact, iFlex, TCS,


Hi i want know mean and difference b/w render variable,conditional block and style variable please reply about them please be kind towards me

3 Answers  


What is a Framework manager?

0 Answers  


Hi, I'm planning to write COG-132 exam so looking out for dumps. If anybody is having then please e-mail me at afrinshaikh86@gmail.com. your help would be appreciated. -Regards Afrin

0 Answers  


How can we do the unit testing?

3 Answers   Logica CMG,


What is meant by alternate drill down with ex?

0 Answers  


In Report page i have three types like (List,Cross tab,Chart), using Conditional Block i need only type of Report (Chart)at run time.How to do this I need The Complete Steps to do this?

1 Answers  


Categories