Sentry Page Protection
Programming Tips 1
Before we continue, there are two things about the SQL procedure that you need to know.
(1) The order of the clauses matters in the SELECT statement.
In our previous example, listing the FROM clause before the SELECT clause will result in an error.
Example
Correct
Proc sql;
select name
from school;
quit;
Incorrect
Proc sql;
from school
select name;
quit;
Proc sql;
select name
from school;
quit;
Incorrect
Proc sql;
from school
select name;
quit;
(2) There is no semi-colon or comma separating the clauses.
Placing a comma or semi-colon between the clauses will also result in an error.
Correct
Proc sql;
select name
from school;
quit;
Incorrect
Proc sql;
select name,
from school;
quit;
Incorrect
Proc sql;
select name;
from school;
quit;
Proc sql;
select name
from school;
quit;
Incorrect
Proc sql;
select name,
from school;
quit;
Incorrect
Proc sql;
select name;
from school;
quit;