<?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 How to execute multiple statements in SQL pass through Netezza in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-multiple-statements-in-SQL-pass-through-Netezza/m-p/520900#M141287</link>
    <description>&lt;P&gt;I have an SQL pass through written in SAS that basically returns a limit of 100 records from a table stored in Netezza. I would like to also return 100 records from another table in Netezza without having to re-connect. Here's what I got:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
connect to odbc as odbcCon 
(noprompt='Driver={NetezzaSQL}; server=xxxxxx; port=xxxxx; database=xxx; username=xxxx; password=xxxxx;'); 
select * from connection to odbcCon 
(SELECT *
  FROM SCHEMA.table1
 LIMIT 100;); 
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How can I select from table2 within the same connection? I tried doing this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
connect to odbc as odbcCon 
(noprompt='Driver={NetezzaSQL}; server=xxxxxx; port=xxxxx; database=xxx; username=xxxx; password=xxxxx;'); 
select * from connection to odbcCon 
(SELECT *
  FROM SCHEMA.table1
 LIMIT 100;),
(SELECT *
  FROM SCHEMA.table2
 LIMIT 100;); 
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But I get a syntax error. Any help would be great!&lt;/P&gt;</description>
    <pubDate>Wed, 12 Dec 2018 16:46:00 GMT</pubDate>
    <dc:creator>jim_toby</dc:creator>
    <dc:date>2018-12-12T16:46:00Z</dc:date>
    <item>
      <title>How to execute multiple statements in SQL pass through Netezza</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-multiple-statements-in-SQL-pass-through-Netezza/m-p/520900#M141287</link>
      <description>&lt;P&gt;I have an SQL pass through written in SAS that basically returns a limit of 100 records from a table stored in Netezza. I would like to also return 100 records from another table in Netezza without having to re-connect. Here's what I got:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
connect to odbc as odbcCon 
(noprompt='Driver={NetezzaSQL}; server=xxxxxx; port=xxxxx; database=xxx; username=xxxx; password=xxxxx;'); 
select * from connection to odbcCon 
(SELECT *
  FROM SCHEMA.table1
 LIMIT 100;); 
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How can I select from table2 within the same connection? I tried doing this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
connect to odbc as odbcCon 
(noprompt='Driver={NetezzaSQL}; server=xxxxxx; port=xxxxx; database=xxx; username=xxxx; password=xxxxx;'); 
select * from connection to odbcCon 
(SELECT *
  FROM SCHEMA.table1
 LIMIT 100;),
(SELECT *
  FROM SCHEMA.table2
 LIMIT 100;); 
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But I get a syntax error. Any help would be great!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 16:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-execute-multiple-statements-in-SQL-pass-through-Netezza/m-p/520900#M141287</guid>
      <dc:creator>jim_toby</dc:creator>
      <dc:date>2018-12-12T16:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute multiple statements in SQL pass through Netezza</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-multiple-statements-in-SQL-pass-through-Netezza/m-p/520910#M141292</link>
      <description>&lt;P&gt;First , I reckon your second query syntax would&amp;nbsp; not work in Netezza let alone sas. If your tables have anything in common try joining them&amp;nbsp;(inner, outer etc ) or use the union operator.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 17:09:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-execute-multiple-statements-in-SQL-pass-through-Netezza/m-p/520910#M141292</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2018-12-12T17:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute multiple statements in SQL pass through Netezza</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-execute-multiple-statements-in-SQL-pass-through-Netezza/m-p/520982#M141323</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql; 
connect to odbc as odbcCon 
(noprompt='Driver={NetezzaSQL}; server=xxxxxx; port=xxxxx; database=xxx; username=xxxx; password=xxxxx;'); 
select * from connection to odbcCon 
(SELECT *
  FROM SCHEMA.table1
 LIMIT 100;); 
select * from connection to odbcCon 
(SELECT *
  FROM SCHEMA.table2
 LIMIT 100;); 
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Dec 2018 20:24:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-execute-multiple-statements-in-SQL-pass-through-Netezza/m-p/520982#M141323</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-12-12T20:24:32Z</dc:date>
    </item>
  </channel>
</rss>

