Search the site...

SASCRUNCH TRAINING
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
Sentry Page Protection
Please Wait...
Picture
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;

(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;
Okay. got it!
Already a member? Go to member's area.