🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How do I view multiple schema tables in the Server Explorer?

User: "Nico Chart_21517"
Altair Employee
Updated by Nico Chart_21517

When a LIBNAME statement makes a connection to an external database there is a default schema setup to read tables conforming to that schema. In the SQL server case this default schema name is dbo. So only database tables conforming to schema dbo will appear in the Server Explorer tab of the workbench.
The schema= option to the LIBNAME statement explicitly defines which schema in the database SLC should look for. To view tables from more than one schema you will need to define separate LIBNAME statment for each one. Something like:

Libname sch1 sqlsrv server=<SERVER> database=<DATABASE> schema=dbo;
Libname sch2 sqlsrv server=<SERVER> database=<DATABASE> schema=schema2;

 

Find more posts tagged with

Comments

No comments on this post.