Help using Base SAS procedures

Select * from PROC SQL?

Accepted Solution Solved
Reply
Super Contributor
Posts: 297
Accepted Solution

Select * from PROC SQL?

Hello:

 

I have a syntax error code show below.   I would like to select all of the previous variables from the old table 1 to create a new one table 2, with condition TH=1.  I don't know why it didn't work?

 

504 proc sql;
505 create table two
506 select *
------
73
ERROR 73-322: Expecting an AS.

507 from work.one
508 where TH=1
509 order by B;
510 quit;


Accepted Solutions
Solution
‎02-09-2017 11:11 AM
Contributor
Posts: 33

Re: Select * from PROC SQL?

Put "as" after your create table two.

504 proc sql;
505 create table two AS
506 select *
507 from work.one
508 where TH=1
509 order by B;
510 quit;

View solution in original post


All Replies
Solution
‎02-09-2017 11:11 AM
Contributor
Posts: 33

Re: Select * from PROC SQL?

Put "as" after your create table two.

504 proc sql;
505 create table two AS
506 select *
507 from work.one
508 where TH=1
509 order by B;
510 quit;
Super Contributor
Posts: 297

Re: Select * from PROC SQL?

Thanks. it works

☑ This topic is SOLVED.

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

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