<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Querying historical data in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978839#M46253</link>
    <description>&lt;P&gt;More in details, what I need to do is to run the SAS script today and five days ago and to check if the result of the SQL query gives the same results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO count_classic_prop_edpplatform(CIE);

/********** UAT environment *****************/
 
LIBNAME CNTPDMU SASIOSNF  
DATABASE=CONTRACTPL_UAT_DB_GLD  
SERVER=
SCHEMA=CONTRACTPL_DM
AuthDomain="SNOWFLAKE_CONTRACTPL_DM_UAT";
run;



/****** The SQL Query ******************/

PROC SQL;
	CREATE TABLE temp.inforce_prop_contact_&amp;amp;suffix. As
	SELECT
           contractVer.POL_NBR          as policy,
           contractVerOriginal.TRM_NBR,
           contractVerOriginal.TRM_VER_NBR,
           riskVer_RE.REF_NBR AS RSK_REF_NBR,

           contractVer.CNTRCT_EFF_DT,
           contractVer.CNTRCT_EXPRY_DT,
           contractVerOriginal.TRX_EFF_DT,
           contractVer.TRX_TYP_CD,
           factPremium.OFFSET_IND,
           factPremium.TRM_PREM_AMT     as FTPREM,
           contractVer.MAIN_INSRR_CO_NBR,
           contractVer.CTRLG_PROV_ID    as province,
           contractVer.BRNCH_REF_NBR,
           contractVer.DSTRBTR_NBR,
           contractVer.ORIG_EFF_DT,
           contractVer.PREFRD_CNTRCT_LOLTY_DT,
           contractVer.MHA_ELGBLTY_IND,
           contractVer.MRKT_TRTRY_REF_NBR,
           roleVer_INSRD.PR_INSRR_CD,
           contractVer.INTRO_CD ,
           riskVer_RE.LOB_CD,
           contractVer.CNTRCT_TYP_CD,
           contractVerOriginal.AUTHRSTN_DT,
           Temptbl.DIM_PL_CNTRCT_VER_KEY,
	   Temptbl.LKP_PROGRAM_KEY,
	   Temptbl.DIM_PL_ROLE_VER_INSRD_KEY,
	   Temptbl.PROG_NM_CD,
	   Temptbl.PROG_CAT_CD,
	   coalesce(Temptbl.Affinity_Ind,'N') as Affinity_Ind
FROM cntrctDM.FCT_PL_COV_DRVR_PREM factPremium

          JOIN cntrctDM.DIM_PL_CNTRCT_VER contractVer
            ON factPremium.DIM_PL_CNTRCT_VER_KEY = contractVer.DIM_PL_CNTRCT_VER_KEY
          JOIN cntrctDM.DIM_PL_CNTRCT_VER contractVerOriginal
            ON factPremium.ORGNL_DIM_PL_CNTRCT_VER_KEY = contractVerOriginal.DIM_PL_CNTRCT_VER_KEY

          JOIN cntrctDM.DIM_PL_RSK_VER_RE riskVer_RE
            ON factPremium.DIM_PL_RSK_VER_RE_KEY = riskVer_RE.DIM_PL_RSK_VER_RE_KEY

	   JOIN cntrctDM.DIM_PL_COV_VER covVer_PRMRY
	     ON factPremium.PRMRY_DIM_PL_COV_VER_KEY = covVer_PRMRY.DIM_PL_COV_VER_KEY

          JOIN cntrctDM.DIM_PL_ROLE_VER_INSRD roleVer_INSRD
            ON factPremium.DIM_PL_ROLE_VER_INSRD_KEY = roleVer_INSRD.DIM_PL_ROLE_VER_INSRD_KEY

 	  LEFT JOIN Temptbl 
	  ON (Temptbl.DIM_PL_CNTRCT_VER_KEY=contractVer.DIM_PL_CNTRCT_VER_KEY)
     WHERE
           contractVer.CNTRCT_TYP_CD not in ('4','5') and
           factPremium.DIM_PL_RSK_VER_RE_KEY &amp;gt; -1 AND
		   /* Eliminating shell transactions */
		   contractVer.TRX_TYP_CD NE "SHL" AND

		   /* Selecting policies possibly in force based on CNTRCT_EFF_DT,CNTRCT_EXPRY_DT, and 
		      (INTNX("MONTH", MDY(&amp;amp;mm., 1, &amp;amp;yyyy.), 1)-1)*/
 
		   contractVer.CNTRCT_EFF_DT      &amp;lt;= (INTNX("MONTH", MDY(&amp;amp;mm., 1, &amp;amp;yyyy.), 1)-1) AND
           contractVer.CNTRCT_EXPRY_DT     &amp;gt; (INTNX("MONTH", MDY(&amp;amp;mm., 1, &amp;amp;yyyy.), 1)-1) AND
           contractVerOriginal.TRX_EFF_DT &amp;lt;= (INTNX("MONTH", MDY(&amp;amp;mm., 1, &amp;amp;yyyy.), 1)-1) AND

           /*contractVer.POL_NBR in (&amp;amp;prop_policy_list.) and*/

		   /*** risk when the policy is renewed that should not be considered inforce CHG74888 ****/

		   
			   (Not(covVer_PRMRY.MODIF_CD = 'S' And factPremium.WPRM_AMT = 0) And 
				Not(contractVerOriginal.TRX_TYP_CD = 'RWL' And factPremium.OFFSET_IND='Y')
			   ) AND


           /* Filtering condition to obtain only the transactions from Belair */

           %if &amp;amp;cie=be %then 
	       %do;
               contractVer.MAIN_INSRR_CO_NBR = "010"
           %end;           
        
         /* Filtering conditions to obtain only the transactions from Intact Quebec */

	     	%else %if &amp;amp;cie=gc %then 
	          %do;
		       		contractVer.MAIN_INSRR_CO_NBR = "001" and
               	 	contractVer.CTRLG_PROV_ID="QC"
	     	  %end;

     ORDER BY
           contractVer.MAIN_INSRR_CO_NBR, contractVer.CTRLG_PROV_ID, policy,
           riskVer_RE.REF_NBR, contractVer.TRM_NBR, contractVer.TRM_VER_NBR, factPremium.OFFSET_IND DESC
       ;
   QUIT;

%put ===================== End of count_classic_prop_edpplatform ==== Company =&amp;amp;cie. =================================================== ;

%exit:
%MEND count_classic_prop_edpplatform;
%count_classic_prop_edpplatform(gc);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;by using the time travel on a Snow Flake database but in SAS&lt;/P&gt;
&lt;P&gt;How do we do that ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Provide an example because up to now we are using a libname to connect to the good data base not a pass through connection&lt;/P&gt;</description>
    <pubDate>Thu, 13 Nov 2025 22:47:51 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2025-11-13T22:47:51Z</dc:date>
    <item>
      <title>Querying historical data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978819#M46250</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am executing a SQL query in SAS while using a Snow Flake connector.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in Snow Flake the Query will be like that (omitting the SAS connector in this example):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sql;
SELECT * 
FROM my_table AT(TIMESTAMP =&amp;gt; 'Wed, 26 Jun 2024 09:20:00 -0700'::timestamp_tz);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I have tried this example in SAS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data my_table;
set sashelp.class;
run;

proc sql;
SELECT * 
FROM my_table AT(TIMESTAMP =&amp;gt; 'Wed, 26 Jun 2024 09:20:00 -0700'::timestamp_tz);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And I am getting the following error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What will be the equivalent is SAS ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;32 proc sql;&lt;BR /&gt;33 SELECT *&lt;BR /&gt;34 FROM my_table AT(TIMESTAMP =&amp;gt; 'Wed, 26 Jun 2024 09:20:00 -0700'::timestamp_tz);&lt;BR /&gt;_&lt;BR /&gt;22&lt;BR /&gt;76&lt;BR /&gt;ERROR 22-322: Syntax error, expecting one of the following: GROUP, HAVING, ORDER, WHERE.&lt;/P&gt;
&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 14:33:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978819#M46250</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2025-11-13T14:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Querying historical data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978833#M46251</link>
      <description>&lt;P&gt;Please describe in plain language what the query should do.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 19:00:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978833#M46251</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2025-11-13T19:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Querying historical data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978836#M46252</link>
      <description>&lt;P&gt;I copy/pasted your SQL into Copilot for an explanation.&amp;nbsp;&lt;BR /&gt;Copilot believes your Snowflake syntax should use to_timestamp() and look similar to below:&lt;/P&gt;
&lt;PRE&gt;SELECT *
FROM my_table AT(TIMESTAMP =&amp;gt; TO_TIMESTAMP_TZ('2024-06-26 09:20:00 -07:00'));&lt;/PRE&gt;
&lt;P&gt;This syntax is Snowflake specific without an equivalent in SAS SQL. You need to use explicit pass-through SQL out of SAS. Syntax like below should work (not tested).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mylib snowflake .......;
proc sql;
  connect using mylib;
  select *
  from connection to mylib(
    SELECT *
    FROM my_table AT(TIMESTAMP =&amp;gt; TO_TIMESTAMP_TZ('2024-06-26 09:20:00 -07:00'))
  );
quit;
  &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The way Snowflake tables maintain history and how you can query it, is afaik Snowflake specific. It's different for other databases and SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS doesn't maintain change history in tables (SAS files) per default and you would need to define an audit trail with the table to get something similar&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/lrcon/9.4/n0ndg2uekz7qkbn1caoki2hzqx8l.htm" target="_self"&gt;Understanding an Audit Trail&lt;/A&gt;&lt;BR /&gt;In my opinion: If you need such auditing on a table then better store your data in a DB like Snowflake. In my experience if there are requirements like this (i.e. regulatory reqs) then it's normally easier and more robust to implement them using existing DB functionality.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 22:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978836#M46252</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2025-11-13T22:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Querying historical data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978839#M46253</link>
      <description>&lt;P&gt;More in details, what I need to do is to run the SAS script today and five days ago and to check if the result of the SQL query gives the same results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO count_classic_prop_edpplatform(CIE);

/********** UAT environment *****************/
 
LIBNAME CNTPDMU SASIOSNF  
DATABASE=CONTRACTPL_UAT_DB_GLD  
SERVER=
SCHEMA=CONTRACTPL_DM
AuthDomain="SNOWFLAKE_CONTRACTPL_DM_UAT";
run;



/****** The SQL Query ******************/

PROC SQL;
	CREATE TABLE temp.inforce_prop_contact_&amp;amp;suffix. As
	SELECT
           contractVer.POL_NBR          as policy,
           contractVerOriginal.TRM_NBR,
           contractVerOriginal.TRM_VER_NBR,
           riskVer_RE.REF_NBR AS RSK_REF_NBR,

           contractVer.CNTRCT_EFF_DT,
           contractVer.CNTRCT_EXPRY_DT,
           contractVerOriginal.TRX_EFF_DT,
           contractVer.TRX_TYP_CD,
           factPremium.OFFSET_IND,
           factPremium.TRM_PREM_AMT     as FTPREM,
           contractVer.MAIN_INSRR_CO_NBR,
           contractVer.CTRLG_PROV_ID    as province,
           contractVer.BRNCH_REF_NBR,
           contractVer.DSTRBTR_NBR,
           contractVer.ORIG_EFF_DT,
           contractVer.PREFRD_CNTRCT_LOLTY_DT,
           contractVer.MHA_ELGBLTY_IND,
           contractVer.MRKT_TRTRY_REF_NBR,
           roleVer_INSRD.PR_INSRR_CD,
           contractVer.INTRO_CD ,
           riskVer_RE.LOB_CD,
           contractVer.CNTRCT_TYP_CD,
           contractVerOriginal.AUTHRSTN_DT,
           Temptbl.DIM_PL_CNTRCT_VER_KEY,
	   Temptbl.LKP_PROGRAM_KEY,
	   Temptbl.DIM_PL_ROLE_VER_INSRD_KEY,
	   Temptbl.PROG_NM_CD,
	   Temptbl.PROG_CAT_CD,
	   coalesce(Temptbl.Affinity_Ind,'N') as Affinity_Ind
FROM cntrctDM.FCT_PL_COV_DRVR_PREM factPremium

          JOIN cntrctDM.DIM_PL_CNTRCT_VER contractVer
            ON factPremium.DIM_PL_CNTRCT_VER_KEY = contractVer.DIM_PL_CNTRCT_VER_KEY
          JOIN cntrctDM.DIM_PL_CNTRCT_VER contractVerOriginal
            ON factPremium.ORGNL_DIM_PL_CNTRCT_VER_KEY = contractVerOriginal.DIM_PL_CNTRCT_VER_KEY

          JOIN cntrctDM.DIM_PL_RSK_VER_RE riskVer_RE
            ON factPremium.DIM_PL_RSK_VER_RE_KEY = riskVer_RE.DIM_PL_RSK_VER_RE_KEY

	   JOIN cntrctDM.DIM_PL_COV_VER covVer_PRMRY
	     ON factPremium.PRMRY_DIM_PL_COV_VER_KEY = covVer_PRMRY.DIM_PL_COV_VER_KEY

          JOIN cntrctDM.DIM_PL_ROLE_VER_INSRD roleVer_INSRD
            ON factPremium.DIM_PL_ROLE_VER_INSRD_KEY = roleVer_INSRD.DIM_PL_ROLE_VER_INSRD_KEY

 	  LEFT JOIN Temptbl 
	  ON (Temptbl.DIM_PL_CNTRCT_VER_KEY=contractVer.DIM_PL_CNTRCT_VER_KEY)
     WHERE
           contractVer.CNTRCT_TYP_CD not in ('4','5') and
           factPremium.DIM_PL_RSK_VER_RE_KEY &amp;gt; -1 AND
		   /* Eliminating shell transactions */
		   contractVer.TRX_TYP_CD NE "SHL" AND

		   /* Selecting policies possibly in force based on CNTRCT_EFF_DT,CNTRCT_EXPRY_DT, and 
		      (INTNX("MONTH", MDY(&amp;amp;mm., 1, &amp;amp;yyyy.), 1)-1)*/
 
		   contractVer.CNTRCT_EFF_DT      &amp;lt;= (INTNX("MONTH", MDY(&amp;amp;mm., 1, &amp;amp;yyyy.), 1)-1) AND
           contractVer.CNTRCT_EXPRY_DT     &amp;gt; (INTNX("MONTH", MDY(&amp;amp;mm., 1, &amp;amp;yyyy.), 1)-1) AND
           contractVerOriginal.TRX_EFF_DT &amp;lt;= (INTNX("MONTH", MDY(&amp;amp;mm., 1, &amp;amp;yyyy.), 1)-1) AND

           /*contractVer.POL_NBR in (&amp;amp;prop_policy_list.) and*/

		   /*** risk when the policy is renewed that should not be considered inforce CHG74888 ****/

		   
			   (Not(covVer_PRMRY.MODIF_CD = 'S' And factPremium.WPRM_AMT = 0) And 
				Not(contractVerOriginal.TRX_TYP_CD = 'RWL' And factPremium.OFFSET_IND='Y')
			   ) AND


           /* Filtering condition to obtain only the transactions from Belair */

           %if &amp;amp;cie=be %then 
	       %do;
               contractVer.MAIN_INSRR_CO_NBR = "010"
           %end;           
        
         /* Filtering conditions to obtain only the transactions from Intact Quebec */

	     	%else %if &amp;amp;cie=gc %then 
	          %do;
		       		contractVer.MAIN_INSRR_CO_NBR = "001" and
               	 	contractVer.CTRLG_PROV_ID="QC"
	     	  %end;

     ORDER BY
           contractVer.MAIN_INSRR_CO_NBR, contractVer.CTRLG_PROV_ID, policy,
           riskVer_RE.REF_NBR, contractVer.TRM_NBR, contractVer.TRM_VER_NBR, factPremium.OFFSET_IND DESC
       ;
   QUIT;

%put ===================== End of count_classic_prop_edpplatform ==== Company =&amp;amp;cie. =================================================== ;

%exit:
%MEND count_classic_prop_edpplatform;
%count_classic_prop_edpplatform(gc);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;by using the time travel on a Snow Flake database but in SAS&lt;/P&gt;
&lt;P&gt;How do we do that ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Provide an example because up to now we are using a libname to connect to the good data base not a pass through connection&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 22:47:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978839#M46253</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2025-11-13T22:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Querying historical data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978847#M46254</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;More in details, what I need to do is to run the SAS script today and five days ago and to check if the result of the SQL query gives the same results.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I believe what you're trying to say: You need to run the SAS script twice today, once using data as per now, and once using data as they were five days, compare the result of the two runs and determine if there are any differences.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Observations:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Libref &lt;EM&gt;CNTPDMU&lt;/EM&gt;&amp;nbsp;defined in the libname you shared doesn't match libref&amp;nbsp;&lt;EM&gt;cntrctDM&lt;/EM&gt; used in the SQL&lt;BR /&gt;
&lt;OL&gt;
&lt;LI&gt;I assume&amp;nbsp;&lt;EM&gt;cntrctDM &lt;/EM&gt;is also a libref pointing to Snowflake?&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Temptbl in the join is a SAS table.'&lt;BR /&gt;
&lt;OL&gt;
&lt;LI&gt;Where does it get created?&lt;/LI&gt;
&lt;LI&gt;Does it also use a Snowflake data source? If not could it change within your 5 days time window?&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If you can't construct Temptbl as it would have looked 5 days ago then you won't be able to get what you want at all.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the rest: As I wrote previously, you will need to pull the "5 days ago" state of your Snowflake tables via Snowflake SQL using explicit pass-through SQL and not like in your code implicit pass-through SQL that SAS then translates and sends to Snowflake for execution. And the reason for this is still: SAS SQL doesn't have a function for time travel functionality.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;Provide an example because up to now we are using a libname to connect to the good data base not a pass through connection&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The example I've shared already demonstrates how you can use a SAS libref for explicit pass-through SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Patrick_0-1763102798766.png" style="width: 678px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/111297iE68522BC77871E3E/image-dimensions/678x282?v=v2" width="678" height="282" role="button" title="Patrick_0-1763102798766.png" alt="Patrick_0-1763102798766.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2025 07:17:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978847#M46254</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2025-11-14T07:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Querying historical data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978848#M46255</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt;&amp;nbsp;showed you how to connect to Snowflake within PRO SQL.&lt;/P&gt;
&lt;P&gt;For your query (if you wish to store the result in Snowflake), you should use the&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;execute( &lt;EM&gt;your SQL-statements goes here&lt;/EM&gt; ) by snowflake;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;construct.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2025 07:21:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978848#M46255</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2025-11-14T07:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Querying historical data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978869#M46256</link>
      <description>&lt;P&gt;This snowflake time travel feature looks cool.&amp;nbsp; Agree with others, you'll likely need to use explicit pass through so that you can submit native snowflake SQL from a SAS job.&amp;nbsp; When you use implicit pass through, SAS translates that SAS SQL into Snowflake SQL for you.&amp;nbsp; But there are plenty of features in Snowflake which do not have SAS equivalents.&amp;nbsp; To access those, you need to write in Snowflake, not SAS.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Nov 2025 13:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Querying-historical-data/m-p/978869#M46256</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2025-11-14T13:41:42Z</dc:date>
    </item>
  </channel>
</rss>

