BookmarkSubscribeRSS Feed
jayasubbareddy
Calcite | Level 5

how to get sql server  schema data into sas for automation purpose

 

 

9 REPLIES 9
Patrick
Opal | Level 21

@jayasubbareddy 

SAS provides access modules to interface with data bases (like SAS Access to SQL Server or SAS Access to ODBC). If you've got one of these access modules licensed and installed then it's just a question of configuration to access a SQL Server database.

Can you provide a bit more detail? Where are you at right now? Do you have the required SAS modules licensed? Do you already have a working connection to the database? Can you "see" any of the tables?

andreas_lds
Jade | Level 19

What exactly do you want to automate?

 

Are the tables registered in sas metadata? If yes, you can query sashelp.vcolumns to get the tables metadata.

jayasubbareddy
Calcite | Level 5

libname cdm odbc uid= pwd= dsn=cdm schema=dbo

in this i have access but i have data in another schemas like payments_aru  and resposnsys,

 

 

 

Patrick
Opal | Level 21

@jayasubbareddy 

Then define another libname with this schema.

Reeza
Super User
It would help if you post significantly more details. We don't have enough information to help you otherwise. For starters, show the code you're trying and the error you're getting.
Patrick
Opal | Level 21

@andreas_lds 

You don't need to register the tables in SAS Metadata unless you use the META engine in the libname statement.

andreas_lds
Jade | Level 19

@Patrick wrote:

@andreas_lds 

You don't need to register the tables in SAS Metadata unless you use the META engine in the libname statement.


Of course not, but it makes using data (and the metadata) somewhat easier, while new to sas.

Patrick
Opal | Level 21

@andreas_lds 

Let's agree to disagree. I tend to think that the concept of SAS Metadata is for "Base SAS users" 2nd level and most of the time only of importance for BI/DIS applications - or if using Metadata security. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 9 replies
  • 1343 views
  • 0 likes
  • 4 in conversation