BookmarkSubscribeRSS Feed
chaitalip
Fluorite | Level 6

Hi,

I am using SAS University Edition and am connecting to the SQL database using PCFiles as described in below link.

 

https://communities.sas.com/t5/SAS-Analytics-U/Connect-to-SQL-Server-Oracle-Database-by-SAS-Universi...

 

Now I want to push the data from SAS to SQL Table. Pl. suggest an appropriate way to achieve this.

 

 

Thanks in Advance.

 

 

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

So what have you done from that post, as it gives you the answer.  Create a libname to the database, then datastep set your new data with and existing one:

data <database_libname>.<database_table_name>;

  set <database_libname>.<database_table_name> <your_new_data>;

run;

Reeza
Super User

It's not officially supported. 

Ksharp
Super User

 I don't know if it could work, I never test it before.

 

1) libnanme z .........  /* NO   access=readonly   option*/

 data SQL_lib.want;

  set SAS_lib.want;

 run;

 

OR

proc copy in=SAS_lib out=SQL_lib;

 select want;

run;

 

OR SQL

proc sql;

insert into SQL_lib.want 

 select * from SAS_lib.want;

quit;

 

 

2)PROC DBLOAD .

 

3)Pass-through 

proc sql;

connect to pcfiles();

execute( inset into ......... ) 

by pcfiles;

quit;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 867 views
  • 0 likes
  • 4 in conversation