Hello,
I need to add a row of data in my table. Could someone please tell me how i can do this? I tried proc sql but it didn't work.
Then
proc sql;
insert into work.fevdata
values (., 8, ., ., ., .);
quit;
or
proc sql;
insert into fevdata
values (., 8, ., ., ., .);
quit;
sql.fevdata was telling SAS to look for the dataset fevdata in the SQL library which you obviously did not have assigned. I suspect you copied some code from some examples where all the example data was in a library named SQL. Which could be a tad confusing working in Proc SQL.
Where is the problem? Share your code please. Or check : Inserting Rows into Tables
I followed that with the following code but got an error:
*Add row with just age*;
proc sql;
insert into sql.fevdata
values (., 8, ., ., ., .);
run;
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
42 ;
43 proc sql;
44 insert into sql.fevdata
45 values (., 8, ., ., ., .);
ERROR: Libref SQL is not assigned.
ERROR: Libref SQL is not assigned.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
46 run;
NOTE: PROC SQL statements are executed immediately; The RUN statement has no effect.
47 ;
48 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
58 ;
What library is your FEVDATA dataset in?
End Proc SQL with QUIT; not RUN:
FEVdata is in the work library.
Then
proc sql;
insert into work.fevdata
values (., 8, ., ., ., .);
quit;
or
proc sql;
insert into fevdata
values (., 8, ., ., ., .);
quit;
sql.fevdata was telling SAS to look for the dataset fevdata in the SQL library which you obviously did not have assigned. I suspect you copied some code from some examples where all the example data was in a library named SQL. Which could be a tad confusing working in Proc SQL.
Thank you very much! It worked
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.