naveen


{ City } delhi
< Country > india
* Profession * nathupur
User No # 94970
Total Questions Posted # 5
Total Answers Posted # 18

Total Answers Posted for My Questions # 15
Total Views for My Questions # 34339

Users Marked my Answers as Correct # 16
Users Marked my Answers as Wrong # 29
Answers / { naveen }

Question { 10459 }

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


Answer

data qqq;
merge aaa(in=a) bbb(in=b);
if a and b;
run;

Is This Answer Correct ?    1 Yes 0 No

Question { HCL, 12015 }

If i doest required Cumilative frequency in my table,
generated by using PROC FREQ what i had to do?


Answer

proc freq data=xxx;
tables name/out=hosp (drop=percent);
run;

Is This Answer Correct ?    0 Yes 0 No


Question { 8841 }

What is difference between sas rename and lable?


Answer

Rename= Which is change the permanently variable name in
dataset.
Label= Which is change the variable name only in output
windows.

Is This Answer Correct ?    4 Yes 1 No

Question { 5917 }

What r all the reporting procedures...?


Answer

proc print
proc report
proc summary
proc tabulate
proc means
proc freq

Is This Answer Correct ?    2 Yes 0 No

Question { Accenture, 10058 }

if i having variables named a b c d e f ,how to find total of
each variable ????give syntax...??


Answer

proc print data=qqq;
sum a b c;
or
sum _all_;
run;

Is This Answer Correct ?    1 Yes 0 No

Question { 10297 }

You have a data set of 100 observations,how can you
restrict the output so that the output has only data from
row no. 10 to row no. 20


Answer

Options Firstobs=10 obs
=20;
Proc print data = xxx;
Run;

Is This Answer Correct ?    0 Yes 0 No

Question { ABC, 35135 }

how to get second highest salary from a employee table and
how get a 5th highest salary from a employee table?


Answer

Proc sql;
Select salary
From
Where salary in (select max
(salary) from
Where salary <(select max
(salary) from
));
Quit;
For second salary
calculation

If salary is not repeted
then
Proc sort data= xxx;
By salary;
Run;
Options firstobs =5;
Proc print data = xxx;
Var salary;
Run;

Is This Answer Correct ?    4 Yes 2 No

Question { Quintiles, 20748 }

How to convert .xls file into CSV format?


Answer

in excel just go on file then press save as and then click
on save type there you will find out csv comma delimiter,

Is This Answer Correct ?    0 Yes 0 No

Question { TNS, 10860 }

How to get any kind of data in SAS? Is it possible to take
data from notepad in SAS?


Answer

Data sample_accounts;
INPUT Account 1-7 OpenDate $ 9-17 StatusCode $ 21-22
CreditLimit 25-29;
CARDS;
1234670 11-Sep-04 Z 2000
1234671 12-Sep-04 3000
1234672 13-Sep-04 Z 2500
1234673 14-Sep-04 T 3200
1234674 15-Sep-04 8000
run;

filename myfile "C:\Mydata\sample_accounts.txt";
data qqq;
infile myfile dlm=' ';
input Account OpenDate $ StatusCode $ CreditLimit;
run;

Is This Answer Correct ?    0 Yes 0 No

Question { CTS, 11473 }

i have a data set with 20 observations i want label from
8 to 15 observations ? how you create this one.


Answer

option firstobs=8 obs=20;
proc print data=c label;
label sex=sir;
run;

Is This Answer Correct ?    0 Yes 0 No

Question { 4724 }

How to get the repeated values by using sql in sas ?


Answer

proc sql;
select name count
from
group by name;
quit;

Is This Answer Correct ?    0 Yes 1 No

Question { Satyam, 5400 }

how to delete the duplicate columns permanently in SQL


Answer

data aaa;
input P_Id LastName $ FirstName $ City $;
cards;
1 Hansen Ola Sandnes
2 Svendson Tove Sandnes
3 Pettersen Kari Stavanger
;
run;
proc sql;
select distnict(city)
from aaa;
quit;

Is This Answer Correct ?    0 Yes 1 No

Question { Satyam, 12145 }

how can get the first and last observations in a dataset
using Proc SQl?


Answer

proc sql;
select first(orderprise)
from xxx;
quit;

Is This Answer Correct ?    0 Yes 1 No

Question { GSK, 4979 }

i have a dataset with var1,var2,var3; i want to upload the
titles for the variables . How can we?


Answer

proc print data=ttt;
title "abcd";
var var1 var2 var3;
run;

Is This Answer Correct ?    1 Yes 10 No

Question { 13146 }

In PROC PRINT, can you print only variables that begin with
the letter “A”?


Answer

proc print data=abc;
var name;
where name contains="A";
run;

Is This Answer Correct ?    0 Yes 8 No

 [1]   2    Next