Programming the statistical procedures from SAS

proc sql query

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 14
Accepted Solution

proc sql query

proc sql;

select * from shareef.emp;

where deptno='20';

quit;

I was trying to run this code on sas9.2. Both where as well as having and order by not workig. However I get all departments in the output. Also following message in the log

Any suggestions why it won't work.

Thanking you.

Mohammed Shareef

7    where deptno='20';

WARNING: This SAS global statement is not supported in PROC SQL. It has been ignored.

8    quit;

NOTE: PROCEDURE SQL used (Total process time):

      real time           0.20 seconds

      cpu time            0.14 seconds


Accepted Solutions
Solution
‎10-23-2014 11:06 AM
Super User
Super User
Posts: 7,565

Re: proc sql query

Well to start you have an additional ;

proc sql;

select * from shareef.emp;  <- remove this colon.

where deptno='20';

quit;

View solution in original post


All Replies
Solution
‎10-23-2014 11:06 AM
Super User
Super User
Posts: 7,565

Re: proc sql query

Well to start you have an additional ;

proc sql;

select * from shareef.emp;  <- remove this colon.

where deptno='20';

quit;

Occasional Contributor
Posts: 14

Re: proc sql query

proc sql;

select * from shareef.emp;  <- remove this colon.

where deptno= 20 ;

quit;

This one worked.

Thank you RW9.

Momin

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 1980 views
  • 2 likes
  • 2 in conversation