<?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 call two table from different source in SQL in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-two-table-from-different-source-in-SQL/m-p/680902#M36917</link>
    <description>&lt;P&gt;Hi. In a sql data source, I want to extract a table with 4 columns with PROC SQL. But with a constrain. this constrain is a table (name: sleutel) with one column (name: sleutel2) which is stored in my laptop. This is my code. But it does not work. could you please help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data IA_data;
set work.sleutel;
run;

PROC SQL;
select ia.sleutel2
from IA_data ia;

CONNECT TO ODBC AS mycon (datasrc=IA_P);
select *
FROM CONNECTION TO mycon
(SELECT
column1,
column2,
column3,
column4

FROM ia_treinrit trr
where
column1 = ia.sleutel2
);
run;

DISCONNECT FROM mycon;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 02 Sep 2020 09:51:14 GMT</pubDate>
    <dc:creator>BaharH</dc:creator>
    <dc:date>2020-09-02T09:51:14Z</dc:date>
    <item>
      <title>call two table from different source in SQL</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-two-table-from-different-source-in-SQL/m-p/680902#M36917</link>
      <description>&lt;P&gt;Hi. In a sql data source, I want to extract a table with 4 columns with PROC SQL. But with a constrain. this constrain is a table (name: sleutel) with one column (name: sleutel2) which is stored in my laptop. This is my code. But it does not work. could you please help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data IA_data;
set work.sleutel;
run;

PROC SQL;
select ia.sleutel2
from IA_data ia;

CONNECT TO ODBC AS mycon (datasrc=IA_P);
select *
FROM CONNECTION TO mycon
(SELECT
column1,
column2,
column3,
column4

FROM ia_treinrit trr
where
column1 = ia.sleutel2
);
run;

DISCONNECT FROM mycon;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Sep 2020 09:51:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-two-table-from-different-source-in-SQL/m-p/680902#M36917</guid>
      <dc:creator>BaharH</dc:creator>
      <dc:date>2020-09-02T09:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: call two table from different source in SQL</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-two-table-from-different-source-in-SQL/m-p/680913#M36918</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;But it does not work. could you please help me?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, we can't help you because "does not work" can mean anything. We need to see the log at least, please post it using the "insert code" function, 7th button above the textbox.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 10:27:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/call-two-table-from-different-source-in-SQL/m-p/680913#M36918</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-09-02T10:27:19Z</dc:date>
    </item>
  </channel>
</rss>

