<?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: ODBC Connection Materialized vs Table in Library in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/ODBC-Connection-Materialized-vs-Table-in-Library/m-p/631680#M18944</link>
    <description>&lt;P&gt;Is there a difference in the name of the table versus the view? If so both should show. What do you see if you run PROC CONTENTS on the library?&lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2020 19:14:56 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2020-03-12T19:14:56Z</dc:date>
    <item>
      <title>ODBC Connection Materialized vs Table in Library</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ODBC-Connection-Materialized-vs-Table-in-Library/m-p/631532#M18938</link>
      <description>&lt;P&gt;I am connecting to an Oracle DB via tan ODBC driver in SAS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME tables
ODBC
USER=USER
PASSWORD=*****
DSN="Name"
SCHEMA=SCEMA;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The Oracle database has some tables replicated as a materialized view to speed up processing for some users. When I connect with SAS does the library show a copy of the table, or the materialized view of the table? I would prefer not to use the materialized version as it updates less frequently than I need it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 12:27:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ODBC-Connection-Materialized-vs-Table-in-Library/m-p/631532#M18938</guid>
      <dc:creator>MB_Analyst</dc:creator>
      <dc:date>2020-03-12T12:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: ODBC Connection Materialized vs Table in Library</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ODBC-Connection-Materialized-vs-Table-in-Library/m-p/631680#M18944</link>
      <description>&lt;P&gt;Is there a difference in the name of the table versus the view? If so both should show. What do you see if you run PROC CONTENTS on the library?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 19:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ODBC-Connection-Materialized-vs-Table-in-Library/m-p/631680#M18944</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-03-12T19:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: ODBC Connection Materialized vs Table in Library</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ODBC-Connection-Materialized-vs-Table-in-Library/m-p/631787#M18950</link>
      <description>&lt;P&gt;Googling with keywords:&amp;nbsp;&lt;EM&gt;oracle materialized view and table with same name&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You cannot create a&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;table&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;and a&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;materialized view&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;of the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;same name&lt;/STRONG&gt;&lt;SPAN&gt;. However, when you create a&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;materialized view&lt;/STRONG&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Oracle&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;automatically creates a&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;table&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;by the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;same name&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;in the ... _objects data dictionary views. When you select from that, you are selecting from the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;materialized view&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The materialized view (which actually is a table loaded into memory) is the result of a SQL query. It will retrieve the data directly or indirectly from table(s). I guess you could execute a describe on the view to get to the table names (to which you might or might not have read access). If you've got the read access then you could use the query from the describe in your own code (not sure actually: You need eventually to use the DDL of the view to get to the query which loads the data).&lt;/P&gt;
&lt;P&gt;But... looking into Oracle docu &lt;A href="https://docs.oracle.com/cd/B28359_01/server.111/b28326/repmview.htm#i44564" target="_self"&gt;here&lt;/A&gt; if and how complicated it will get for you to query the underlying physical table(s) directly will depend on the view definition. And you'll likely also experience a big performance degradation if directly querying the underlying physical tables.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 05:53:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ODBC-Connection-Materialized-vs-Table-in-Library/m-p/631787#M18950</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-03-13T05:53:22Z</dc:date>
    </item>
  </channel>
</rss>

