– Library – Databases –
1 Permanent – it is a place where we store our permanent tables.
2. Temporary – it is a place where we store our temporary tables.
how many data types we have in SAS?
cntrl + ? – comment
1. Numeric
2. Character
3. Date
x = 123;
x1 = ‘123’;
name = ‘Rahul’ ;
> what rules we have to follow while giving a table name
1. table name cannot starts with numeric
12emplyee employee12
2. no space should be given between table name
3. no special characters @ # $ %
first code
creating a table with one variable, name as x
; – end of the statement
SAS is not a case sensitive language
observation is equals to row
dataset is nothing but table
Code
sashelp.cars
cards/datalines – helping us to give the values
DATA sashelp.customer;
x = 12;
y = ‘abc’;
run;
new1 is dataset
entire query from Data to run is called datastep
data new1;
input name$ city$ age;
datalines;
Rahul Pune 29
Anjali Pune 24
Arun Delhi 28
Priyanka Delhi 26
;
run;
connect to oracle (username = ‘abc123’, password = ‘abc#23’, path = ‘db2’)
customer
1st block – _____________
2nd block – __________
data new1;
input name$ 13. city$ age;
datalines;
Rahul_Verma Pune 29
AnjaliGupta Pune 24
ArunChauhan Delhi 28
Priyanka Delhi 26;
run;
The default length of character variable is 8