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

which features do you use to check the data validations and errors? : Sas-administrator

0 Answers  


How do you convert basic cube to transaction cube and transaction cube to basic cube?

0 Answers  


What techniques and/or PROCs do you use for tables?

4 Answers   Oracle,


what is AE onset date and what is RDS?

4 Answers   Accenture,


What is the pound sign used for in the data_null_ ?

1 Answers  






Explain what is data step?

0 Answers  


how to read character value without using substr function in sas ?

3 Answers  


For clinical entire study how many tables will create approx?

0 Answers   TCS,


hi i am nipun can anybody tell me that if a clinical sas programmer write the code and after successfull execution where do they store it. how they submit tables to TL how work is assigned to programmers either both code, log, output to be submitted. can any one tell me the process

2 Answers   HSBC,


what is the Population you used in your project, is it ITT or PP?

0 Answers   Accenture, Quintiles,


What happens in the following code, if u type 8 instead of *? proc sql noprint; create table abc as select 8 from lib.abc; quit;

3 Answers  


What SAS statements would you code to read an external raw data file to a DATA step?

6 Answers   Accenture,


Categories