<?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 issue with explicit pass through proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/issue-with-explicit-pass-through-proc-sql/m-p/324502#M271310</link>
    <description>&lt;P&gt;I just cannot determine what's wrong with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC SQL INOBS=10;
   CONNECT TO TERADATA AS TeraDataConn
    (BULKLOAD=YES MODE=TERADATA user="bla" password="XXXX");

   CREATE TABLE WORK.Test123 AS 
   ( 
   		SELECT
        	SomeColumn 
		FROM SomeTable;
   ); 

   DISCONNECT FROM TeraDataConn;
QUIT; &lt;/PRE&gt;&lt;P&gt;It should return the TOP 10 values of SomeColumn in SomeTable.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2017 10:05:47 GMT</pubDate>
    <dc:creator>csetzkorn</dc:creator>
    <dc:date>2017-01-13T10:05:47Z</dc:date>
    <item>
      <title>issue with explicit pass through proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-with-explicit-pass-through-proc-sql/m-p/324502#M271310</link>
      <description>&lt;P&gt;I just cannot determine what's wrong with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC SQL INOBS=10;
   CONNECT TO TERADATA AS TeraDataConn
    (BULKLOAD=YES MODE=TERADATA user="bla" password="XXXX");

   CREATE TABLE WORK.Test123 AS 
   ( 
   		SELECT
        	SomeColumn 
		FROM SomeTable;
   ); 

   DISCONNECT FROM TeraDataConn;
QUIT; &lt;/PRE&gt;&lt;P&gt;It should return the TOP 10 values of SomeColumn in SomeTable.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 10:05:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-with-explicit-pass-through-proc-sql/m-p/324502#M271310</guid>
      <dc:creator>csetzkorn</dc:creator>
      <dc:date>2017-01-13T10:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: issue with explicit pass through proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-with-explicit-pass-through-proc-sql/m-p/324505#M271311</link>
      <description>&lt;P&gt;And what does it do? &amp;nbsp;You could try posting errors/warnings, examples of what is "not working" etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From what I see it looks ok, however there is nothing in the code to indicate that it should take only the top 10 responses, it is just selecting all data. &amp;nbsp;Also, what do you mean by top 10 results, do you only want 10 obs, or do you mean all obs with a value in the top 10? &amp;nbsp;Is this perhaps the cause:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/45/216.html" target="_blank"&gt;http://support.sas.com/kb/45/216.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does terradata have an Obs type function (monotonic() in SAS, rownumber in Oracle etc.), if so then order your data by value, and take only observations with rownumber &amp;lt;= 10.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 10:15:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-with-explicit-pass-through-proc-sql/m-p/324505#M271311</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-01-13T10:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: issue with explicit pass through proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-with-explicit-pass-through-proc-sql/m-p/324506#M271312</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does not work with pass through.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have to limit the sample&amp;nbsp;from within your query, which in Teradata I think is achieved like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select SomeColumn 
from SomeTable
sample 10;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Pass throught runs in the database, there wouldn't be much advantage of limiting the sample on the SAS side (INOBS) as the whole table would have to be pulled to SAS and afterward returned the first 10 rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Daniel Santos&amp;nbsp;@ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 10:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-with-explicit-pass-through-proc-sql/m-p/324506#M271312</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2017-01-13T10:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: issue with explicit pass through proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/issue-with-explicit-pass-through-proc-sql/m-p/324515#M271313</link>
      <description>&lt;P&gt;Besides of what others already wrote, if the part in bracket should execute within Teradata then you need to instruct SAS so.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently you're just connecting and disconnecting to Teradata but you're not running any code in a pass-through block.&lt;/P&gt;
&lt;PRE&gt;   CREATE TABLE WORK.Test123 AS 
   ( 
   		SELECT
        	SomeColumn 
		FROM SomeTable;
   ); &lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the top of my hat how this should look like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   CREATE TABLE WORK.Test123 AS 
   select * from connection to TeraDataCom
   ( 
   		SELECT
        	SomeColumn 
		FROM SomeTable;
   ); &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Jan 2017 10:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/issue-with-explicit-pass-through-proc-sql/m-p/324515#M271313</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-01-13T10:51:50Z</dc:date>
    </item>
  </channel>
</rss>

