I have a library and I want just the tables and not the views in the library. Thank you!
I've never done it, but documentation from PROC DATASETS appears you can set MEMTYPE to view. I don't have time to test it either, so someone else may know better.
Next question would be what you want to do with it. Delete? Move?
I would like dbms_memtype not the memtype data. I would just like the library changed to just include those tables. Thank you!
A SAS libref points to a location that stores stuff (tables, views, catalogs, etc.) That location could be a folder on Windows, a directory on linux, a database schema, or many other types of locations.
So if your libref is pointing to, say, a directory, and you have both tables and views in that directory, then the library will have tables and views in it. If you don't want views to be in the library, you would need to move them from that location.
That said, your goal isn't really clear to me. It might help if you describe your current situation. What OS are you using? Where are the tables and views stored? How did you create the libref that points to the library (can you show the LIBNAME statement)? Why don't you want the views to be in the library?
@kyle234 wrote:
I would like dbms_memtype not the memtype data. I would just like the library changed to just include those tables. Thank you!
What is the DBMS? You might try adding the DB_OBJECTS=TABLES option to your LIBNAME statement that defines the "library".
DB_OBJECTS=TABLES | VIEWS | SYNONYMS | PUBLIC_SYNONYMS | ALL
Specifies which database objects to return with PROC DATASETS or in SAS Explorer.
Product: SAS/ACCESS for Relational Databases
Document: SAS/ACCESS for Relational Databases: Reference
|
I have a library that I want to subset to only include tables that are dbms_memtype='table'. Thank you!
@kyle234 wrote:
I have a library and I want just the tables and not the views in the library. Thank you!
What do you mean by "want"?
Do you want to make a list of the table names?
Do you want to delete the views?
Do you want the views to somehow disappear from the GUI list of tables but not actually be deleted? Why? What GUI tool are you using? SAS/Studio? Something else?
Is the libref pointing at actual SAS datasets and SAS views? You can check DICTIONARY.MEMBERS to tell what type of file each member in the library is.
Or is the libref pointing at an external database like Oracle? If the later then how you can tell if a "table" in the library is actually a view would probably depend on what database you are using.
There is a library is SAS currently with table want the library to only have view tables. Not sure if that means copy into new library. Thanks
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.