BookmarkSubscribeRSS Feed
alepage
Barite | Level 11

Hello,

 

I have used the following code as usual to find in which dataset a variable may exist in a library.

The problem, it seems that this code is not working with a DataMart.

 

Does someone may have an idea how to do that?

 

3 REPLIES 3
ballardw
Super User

@alepage wrote:

Hello,

 

I have used the following code as usual to find in which dataset a variable may exist in a library.

The problem, it seems that this code is not working with a DataMart.

 

Does someone may have an idea how to do that?

 


What code?

 

If the data mart is not SAS data then SAS would likely have to connect to the mart and query the tools used by that data source to find things from the meta data.

alepage
Barite | Level 11

Sorry, I have forgotten to incluce the code

 

proc sql;
select name,memname
from dictionary.columns
where libname EQ 'MYLIBRARY' and UPCASE(name) EQ 'CUSTOMERNUMBER' ;
quit;
run;

SASKiwi
PROC Star

What do you mean by a datamart? What database is this running on and how are you connecting to it? Please bear in mind that the DICTIONARY tables are optimised for use with SAS data libraries and may not work so well with external databases. If you are dealing with an external database like Oracle or SQL Server it would be preferable to query the database's dictionary tables directly.  

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 827 views
  • 0 likes
  • 3 in conversation