You are on page 1of 2

Main Queries on SAS in Realtime

/*Data cleaning*/

proc sql;
create table clientdetails4a as
select distinct *
from clientdetails4;
run;
/*Data extraction from external source*/

proc import
datafile='D:\SAS PROJECT\dss\client details.xls'
out=clientdetails
dbms=excel replace;
run;
/*Changing the datatype from Text to Number & Number to
text*/
data s;
x='1000';
y = 2000;
run;
proc print;
run;
data s2;
set s ;
x2 = input(x, 8.);
y2 = put(y,8.);
run;
proc print;

footnote;
ru
/*deleting blank rows and columns*/
Data example (drop=i j);
Set emp;
array ex(*)_numeric_;
array ex2(*) _char_;
do i=1 to dim(ex);
if ex(i)=. then delete;
end;
do j=1 to dim(ex2);
if ex2(j)='' then delete;
end;
run;

You might also like