<?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: Error in sql query in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-in-sql-query/m-p/433859#M107609</link>
    <description>&lt;P&gt;Post your full code and log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're using SQL Pass Thru then you need to be using Teradata functions, where MONTH() may not be a Teradata function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/191140"&gt;@maverick123&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;SELECT&lt;BR /&gt;&amp;nbsp;a.*,&amp;nbsp;&amp;nbsp;b.*&lt;BR /&gt;&amp;nbsp;FROM&amp;nbsp;table1&amp;nbsp;a&lt;BR /&gt;&amp;nbsp;INNER JOIN&amp;nbsp;table2 b&lt;BR /&gt;&amp;nbsp;ON a.client = b.client and month(b.trans_dt) = month(a.cycle_dt)&lt;BR /&gt;&lt;BR /&gt;ERROR: Teradata prepare: Syntax error: expected something between the 'and' keyword and the 'month' keyword.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 03 Feb 2018 20:42:54 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-02-03T20:42:54Z</dc:date>
    <item>
      <title>Error in sql query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-in-sql-query/m-p/433769#M107572</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm getting following error:&amp;nbsp;Syntax error: expected something between the 'and' keyword and the 'month' keyword.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;select a.*, b.* from table1 a inner join table2 b&amp;nbsp;&lt;/P&gt;&lt;P&gt;on a.client = b.client AND month(a.date1) = month(b.date2);&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2018 08:32:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-in-sql-query/m-p/433769#M107572</guid>
      <dc:creator>maverick123</dc:creator>
      <dc:date>2018-02-03T08:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error in sql query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-in-sql-query/m-p/433771#M107574</link>
      <description>&lt;P&gt;Please share the full log.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2018 09:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-in-sql-query/m-p/433771#M107574</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-02-03T09:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error in sql query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-in-sql-query/m-p/433818#M107586</link>
      <description>&lt;P&gt;&amp;nbsp;SELECT&lt;BR /&gt;&amp;nbsp;a.*,&amp;nbsp;&amp;nbsp;b.*&lt;BR /&gt;&amp;nbsp;FROM&amp;nbsp;table1&amp;nbsp;a&lt;BR /&gt;&amp;nbsp;INNER JOIN&amp;nbsp;table2 b&lt;BR /&gt;&amp;nbsp;ON a.client = b.client and month(b.trans_dt) = month(a.cycle_dt)&lt;BR /&gt;&lt;BR /&gt;ERROR: Teradata prepare: Syntax error: expected something between the 'and' keyword and the 'month' keyword.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2018 17:29:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-in-sql-query/m-p/433818#M107586</guid>
      <dc:creator>maverick123</dc:creator>
      <dc:date>2018-02-03T17:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error in sql query</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-in-sql-query/m-p/433859#M107609</link>
      <description>&lt;P&gt;Post your full code and log.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're using SQL Pass Thru then you need to be using Teradata functions, where MONTH() may not be a Teradata function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/191140"&gt;@maverick123&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;SELECT&lt;BR /&gt;&amp;nbsp;a.*,&amp;nbsp;&amp;nbsp;b.*&lt;BR /&gt;&amp;nbsp;FROM&amp;nbsp;table1&amp;nbsp;a&lt;BR /&gt;&amp;nbsp;INNER JOIN&amp;nbsp;table2 b&lt;BR /&gt;&amp;nbsp;ON a.client = b.client and month(b.trans_dt) = month(a.cycle_dt)&lt;BR /&gt;&lt;BR /&gt;ERROR: Teradata prepare: Syntax error: expected something between the 'and' keyword and the 'month' keyword.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2018 20:42:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-in-sql-query/m-p/433859#M107609</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-03T20:42:54Z</dc:date>
    </item>
  </channel>
</rss>

