Hi.
The links are not available anymore (it is an old queistion). Could you provide more detailed?
In particular I am interested in solving the following problem.
I am able to create a SAS library per schema in SQL Server with LIBNAME ODBC...Statements like this:
LIBNAME SchemaA
ODBC
schema="SchemaA"
noprompt="xxx";
LIBNAME SchemaB
ODBC
shema="SchemaB"
noprompt="xxx";
My idea is then to concatinate the created libriries in a SAS library named "database" as follows:
libname database (SchemaA SchemaB);
However, I have there a problem: Tables with the same names (but different contents) exist in both schemas.
How can I solve this issue?
PROC DATASET CHANGE is not an option, as I am not allowed to change table names on the SQL server.
As the SAS system will always use the first appearance of a name in a concatenated library, this won't work. You need to concatenate the tables(datasets) from the separate libraries whenever you use them.
You could write a program that searches for such tables and automatically creates views that do the concatenation.
@niki_02468 - It is common practice and certainly simpler to define separate SAS libraries for each external database schema.
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!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.