BookmarkSubscribeRSS Feed
Ronein
Meteorite | Level 14

Hello

I am running via SAS code to check when a table was created (And when was updated ).

This table is located in  TeraData.

What is the reason that I see No information on this information

proc contents data=tcrmseg.gal_hravot_brzel_2023;Run;

/**Other Way**/
proc datasets library=TCRMSEG;
contents data=gal_hravot_brzel_2023;
run;

 

Ronein_0-1700123807921.png

 

5 REPLIES 5
Ronein
Meteorite | Level 14

So you recommend query it inside Tera and not in SAS?

Quentin
Super User

After figuring out how to query the metadata in teradata, and getting that query working, then you can come back to SAS.

 

SAS Explicit pass-through SQL allows you to use SAS, but write native teradata SQL code that SAS will send to teradata for execution, and then return results to SAS.  See for example https://www.lexjansen.com/sesug/2017/DM-57.pdf

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
SASKiwi
PROC Star

@Ronein - First you will need to define what you mean by "last updated". Does that mean the last time rows were updated, inserted, or deleted or all three? If you Google the question then you will get answers like this: https://stackoverflow.com/questions/58404933/teradata-how-to-find-when-was-table-last-updated-not-al...

 

Once you are happy with the Teradata query, you can wrap it inside a SAS PROC SQL step:

libname teradata teradata noprompt = "<Teradata connection string>";

proc sql;
 connect using teradata;
  create table Want as 
  select * from connection to teradata
  (<-Put your Teradata query here->)
  ;
quit;

 

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

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
  • 5 replies
  • 1005 views
  • 0 likes
  • 4 in conversation