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;
I suggest you query the Teradata equivalent of DICTIONARY.TABLES in explicit pass-through.
So you recommend query it inside Tera and not in SAS?
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.
@Ronein wrote:
So you recommend query it inside Tera and not in SAS?
From SAS, using Teradata code in explicit pass-through.
@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 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.