<?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 Join Different DB's in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865667#M341849</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Before we dive into data analysis in SAS Viya, we are currently doing data mapping. And we found that some of the data we need to merge are in different databases. For example, I need to join a table in the SAPHANA database with a table in the INCADEA database. But I can't figure out how to do this, can you help me?&lt;/P&gt;</description>
    <pubDate>Wed, 22 Mar 2023 07:08:09 GMT</pubDate>
    <dc:creator>alperebb</dc:creator>
    <dc:date>2023-03-22T07:08:09Z</dc:date>
    <item>
      <title>Join Different DB's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865667#M341849</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Before we dive into data analysis in SAS Viya, we are currently doing data mapping. And we found that some of the data we need to merge are in different databases. For example, I need to join a table in the SAPHANA database with a table in the INCADEA database. But I can't figure out how to do this, can you help me?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 07:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865667#M341849</guid>
      <dc:creator>alperebb</dc:creator>
      <dc:date>2023-03-22T07:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: Join Different DB's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865672#M341851</link>
      <description>&lt;P&gt;Use SAS. I assume that the mentioned databases are hosted on e.g. SQL Server or Oracle databases. So you can assign libnames for the databases in SAS and make the join there, e.g.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname saphana &amp;lt;odbc or oracle connect options&amp;gt;;
libname incadea &amp;lt;odbc or oracle connect options&amp;gt;;
proc sql;
  create table joined as select &amp;lt;columns&amp;gt;
    from saphana.tableX join incadea.tableY
       on &amp;lt;join conditions&amp;gt;;
            &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Mar 2023 08:56:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865672#M341851</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2023-03-22T08:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Join Different DB's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865676#M341854</link>
      <description>&lt;P&gt;If the databases involved are different external databases you may need a separate module licenses for each one such as Oracle, DB2, SQL.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may have some headaches with getting certain data types, especially date, time or datetime values, into a form that allows working with them if in different data bases.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 09:01:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865676#M341854</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-03-22T09:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Join Different DB's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865790#M341903</link>
      <description>&lt;P&gt;Are these databases in the same database product (Oracle, SQL Server etc) or not? If they are in the same database product are they on the same database server or not? If they are in different database products you will most likely have to read the required tables into SAS before doing any joining. If they are in the same database product you may be able to do joins between databases and extract the results back to SAS.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 19:56:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865790#M341903</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-03-22T19:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Join Different DB's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865848#M341936</link>
      <description>&lt;P&gt;I'm sharing a screenshot below, it's all in Data Sources. I want to go into INCADEA-PIST and take a table from there and a table from SAPHANA a few rows below and take a table from there and merge them. By the way, I took the screenshot from SAS Data Explorer. &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (10).png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81940i2E07857EC84137BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (10).png" alt="Screenshot (10).png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 06:03:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865848#M341936</guid>
      <dc:creator>alperebb</dc:creator>
      <dc:date>2023-03-23T06:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Join Different DB's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865850#M341937</link>
      <description>&lt;P&gt;I'm sharing a screenshot below, it's all in Data Sources. I want to go into INCADEA-PIST and take a table from there and a table from SAPHANA a few rows below and take a table from there and merge them. By the way, I took the screenshot from SAS Data Explorer. &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (10).png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81941i0B2A670355C7D226/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (10).png" alt="Screenshot (10).png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 06:04:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865850#M341937</guid>
      <dc:creator>alperebb</dc:creator>
      <dc:date>2023-03-23T06:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Join Different DB's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865852#M341938</link>
      <description>&lt;P&gt;I'm sharing a screenshot below, it's all in Data Sources. I want to go into INCADEA-PIST and take a table from there and a table from SAPHANA a few rows below and take a table from there and merge them. By the way, I took the screenshot from SAS Data Explorer. &lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot (10).png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81942i68C9A9DFACE6AFB0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot (10).png" alt="Screenshot (10).png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 06:06:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865852#M341938</guid>
      <dc:creator>alperebb</dc:creator>
      <dc:date>2023-03-23T06:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Join Different DB's</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865996#M341990</link>
      <description>&lt;P&gt;The screenshot indicates that&amp;nbsp;&lt;SPAN&gt;INCADEA-PIST is an SQL Server database and&amp;nbsp;SAPHANA is a SAP HANA database - no indication of the underlying database product here. I can only suggesting trying an SQL join using the SAS libraries first and see how you get on:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  create table Want as 
  select *
  from INCADEA.Table1 as A
  INNER JOIN SAPHANA.Table2 as B
  on A.column = B.column
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 20:06:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Join-Different-DB-s/m-p/865996#M341990</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-03-23T20:06:28Z</dc:date>
    </item>
  </channel>
</rss>

