BookmarkSubscribeRSS Feed
tekish
Quartz | Level 8

Dear Experts,

 

I don't have any idea where to start .Here is the situation, I have three different environemnt(development,Testing and Production).

How do I copy the data from developement to production and testing to production.moreover i want to compare the data are the same in all environments.

 

first i have to copy the data from development  database 2016  into developement database 2017.

 

%macro Env(server);

proc sql stimer;

connect to oledb as test2016 (provider = sqloledb

datasource = "&server"

user = "User Id"

password = "password"

properties = ('INITIAL CATALOG'=database2016)

dbmax_text = 30000);

 

connect to oledb as test2017 (provider = sqloledb

datasource = "&server"

user = "User Id"

password = "password"

properties = ('INITIAL CATALOG'=database2017)

dbmax_text = 30000);

 

select * from connection to test2016

(copy developemnt data to testing data

);

disconnect from test2016;

disconnect from test2017;

quit;

 

proc compare base=development compare=testing;run;

 

 

%mend ENV;

 

%ENV(Development);

%ENV(Testing);

%ENV(Production);

 

thanks

 

 

1 REPLY 1
ChrisBrooks
Ammonite | Level 13

It seems to me that you have your data in a SQL Server database and want to replicate that. I'm not any sort of SQL Server expert but to be honest I think you're better off using a native tool for that rather than using SAS to copy the data over. The likelihood is that you'll have issues with data type conversion and precision if you try to do it with SAS.

 

You might find the Microsoft Developer Network Pages helpful particularly https://msdn.microsoft.com/en-us/library/hh272696(v=vs.103).aspx

 

 

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
  • 1 reply
  • 916 views
  • 1 like
  • 2 in conversation