I have this proc sql below ...can you not use the select into statement? the error I get is below that
proc sql;
select memname as sas,name as vgroups into uompc.SAStoVGroups from work.vgroups
quit;
3042 proc sql;
3043 select memname as sas,name as vgroups into uompc.SAStoVGroups from work.vgroups
-----
79
76
ERROR 79-322: Expecting a :.
ERROR 76-322: Syntax error, statement will be ignored.
3044 quit;
Use the documented syntax. SELECT INTO is for giving values to SAS macro variables.INSERT INTO is for adding observations to an existing table. To create a table, use CREATE TABLE:
proc sql;
create table uompc.SAStoVGroups as
select
memname as sas,
name as vgroups
from work.vgroups;
quit;
No, that's not SAS SQL.
In SAS you use a CREATE TABLE statement instead.
proc sql;
create table uompc.SAStoVGroups as
select ..
from
...
Probably easiest to scan through the examples:
Use the documented syntax. SELECT INTO is for giving values to SAS macro variables.INSERT INTO is for adding observations to an existing table. To create a table, use CREATE TABLE:
proc sql;
create table uompc.SAStoVGroups as
select
memname as sas,
name as vgroups
from work.vgroups;
quit;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.