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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.