<?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: SQL Pass-Through Multiple Connections in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SQL-Pass-Through-Multiple-Connections/m-p/28993#M5434</link>
    <description>The easiest way is to use LIBNAMEs to the Oracle databases, and then just join them in a simple proc sql. Most preferable would be to have the join performed within Oracle, but I know too little about Oracle to tell how this could be enforced.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
    <pubDate>Fri, 08 May 2009 09:27:14 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2009-05-08T09:27:14Z</dc:date>
    <item>
      <title>SQL Pass-Through Multiple Connections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Pass-Through-Multiple-Connections/m-p/28992#M5433</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I'm new to pass-through and am trying to connect across two databases using an alias for each connection.  This is probably a simple solution, but how can I join the below query by CUST_ID across the two connections?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL OUTOBS=20;&lt;BR /&gt;
   CONNECT TO ORACLE AS CON1 (USER=UID PASSWORD=PASS PATH=DB1 CONNECTION=GLOBAL);&lt;BR /&gt;
   CONNECT TO ORACLE AS CON2 (USER=UID PASSWORD=PASS PATH=DB2 CONNECTION=GLOBAL);&lt;BR /&gt;
   CREATE TABLE WORK.TEST AS&lt;BR /&gt;
   SELECT * FROM CONNECTION TO CON1 (SELECT CUST_ID FROM CUSTOMERS);&lt;BR /&gt;
   SELECT * FROM CONNECTION TO CON2 (SELECT CUST_ID,CUST_NAME FROM CUSTOMER_DETAIL);&lt;BR /&gt;
   DISCONNECT FROM CON1;&lt;BR /&gt;
   DISCONNECT FROM CON2;&lt;BR /&gt;
QUIT;</description>
      <pubDate>Thu, 07 May 2009 14:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Pass-Through-Multiple-Connections/m-p/28992#M5433</guid>
      <dc:creator>mdavidson</dc:creator>
      <dc:date>2009-05-07T14:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Pass-Through Multiple Connections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Pass-Through-Multiple-Connections/m-p/28993#M5434</link>
      <description>The easiest way is to use LIBNAMEs to the Oracle databases, and then just join them in a simple proc sql. Most preferable would be to have the join performed within Oracle, but I know too little about Oracle to tell how this could be enforced.&lt;BR /&gt;
&lt;BR /&gt;
/Linus</description>
      <pubDate>Fri, 08 May 2009 09:27:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Pass-Through-Multiple-Connections/m-p/28993#M5434</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2009-05-08T09:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Pass-Through Multiple Connections</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SQL-Pass-Through-Multiple-Connections/m-p/28994#M5435</link>
      <description>I believe Oracle supports sql into multiple db's at once.  Off memory you reference it via @&lt;SID&gt; against the table.  That should allow you to reference two db's from the one connection.  A Google Search should give you the exact syntax.&lt;/SID&gt;</description>
      <pubDate>Sat, 09 May 2009 00:20:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SQL-Pass-Through-Multiple-Connections/m-p/28994#M5435</guid>
      <dc:creator>CameronLawson</dc:creator>
      <dc:date>2009-05-09T00:20:22Z</dc:date>
    </item>
  </channel>
</rss>

