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.
Calling all data scientists and open-source enthusiasts! Want to solve real problems that impact your company or the world? Register to hack by August 31st!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.