BookmarkSubscribeRSS Feed
Babloo
Rhodochrosite | Level 12
I have table in SQL server and I have one SAS WORK data set. Both are similar structure with same data type.

Now I would like to know the different ways to insert SAS dataset observation in SQL table from SAS.

Is below code the right way to insert records in SQL server table?

e.g.

Proc append data=sqllibrary.table data=sas_work_dataset force;
Run;
2 REPLIES 2
SASKiwi
PROC Star

PROC APPEND is the easiest way to insert new rows into an external database table. Have you tried it?

Reeza
Super User

PROC APPEND is one of the fastest because it's just a proc to move data, a data step or SQL procedure can also be used to transform data so it copies data line by line. APPEND copies data in blocks.

I'm assuming you have the bulkload option set up as well on your server connection.

 


@Babloo wrote:
I have table in SQL server and I have one SAS WORK data set. Both are similar structure with same data type.

Now I would like to know the different ways to insert SAS dataset observation in SQL table from SAS.

Is below code the right way to insert records in SQL server table?

e.g.

Proc append data=sqllibrary.table data=sas_work_dataset force;
Run;

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 2 replies
  • 856 views
  • 2 likes
  • 3 in conversation