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


how to shift the rows to cols?
eg:
i have like
field1 field2 field3
10 20 20
this should be displayed as
field1 10
field2 20
field3 30
(without the obs col)

how do this?can i use transpose or tell me suitable way to
do this?

Answers were Sorted based on User's Feedback



how to shift the rows to cols? eg: i have like field1 field2 field3 10 20 20 this sh..

Answer / luclyl

proc transpose data=hyd out=mum (drop=_NAME_);
var a b c;
run;

Is This Answer Correct ?    7 Yes 2 No

how to shift the rows to cols? eg: i have like field1 field2 field3 10 20 20 this sh..

Answer / haritha

by using proc transpose procedure


ur data should be like this

data hyd;
input a$ b$ c$;
datalines;
field1 field2 field3
10 20 30
;
run;

solution will be like this:
proc tranpose data=hyd out=mum;
var a b c;
run;
proc print data=mum noobs;
run;

Is This Answer Correct ?    5 Yes 2 No

how to shift the rows to cols? eg: i have like field1 field2 field3 10 20 20 this sh..

Answer / guest

you can also use arrays to shift rows into columns.

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More SAS Interview Questions

How would you code the criteria to restrict the output to be produced?

6 Answers   Accenture,


How would you code a merge that will keep only the observations that have matches from both sets.

5 Answers   Accenture, Bank Of America,


How to get part of string form the source string without using sub string function in SAS?

3 Answers  


How to write duplicate records into a separate dataset using sort?

4 Answers   HSBC,


What will calendar procedure do?

0 Answers  


What are the data types that sas contain?

0 Answers  


How do you put a giraffe into the refrigerator?

3 Answers   Oracle,


Have you used macros? For what purpose you have used? : sas-macro

0 Answers  


How do i read multiple spaces in datasets?

4 Answers   Quintiles,


What are the different servers in sas? : sas-grid-administration

0 Answers  


How would you include common or reuse code to be processed along with your statements?

5 Answers   PSCI,


How would you define the end of a macro?

0 Answers  


Categories