<?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 on comparing two columns together in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/error-on-comparing-two-columns-together/m-p/154558#M40608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a syntax style that teradata supports but sas does not.&lt;/P&gt;&lt;P&gt;you could concatenate the columns OFFRG_N and CRT_TS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Aug 2014 21:50:58 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2014-08-08T21:50:58Z</dc:date>
    <item>
      <title>error on comparing two columns together</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-on-comparing-two-columns-together/m-p/154557#M40607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to compare two columns together using the highlighted syntax but SAS is not allowing me to do that. Is there an alternative for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select distinct A.OFFRG_N, &lt;/P&gt;&lt;P&gt;A.CRT_TS, &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;case when (A.OFFRG_N, A.CRT_TS) in&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(select OFFRG_N, CRT_TS from CSTST231_PMRINSD &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where BUSN_TY_SEG_C = 'New' or BURN_TY_SEG_C = 'Renl')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;then A.PMR_BK_D&lt;/P&gt;&lt;P&gt;else NULL&lt;/P&gt;&lt;P&gt;end as PMR_BK_D&lt;/P&gt;&lt;P&gt;from CSTST231_PMRINSD A, CCTRP101_OFF_TERM B&lt;/P&gt;&lt;P&gt;where A.OFFRG_N = B.OFFRG_N&lt;/P&gt;&lt;P&gt;and A.CRT_TS = put(B.OFFRG_TM_CRT_TS,datetime26.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;log -&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;108 rsubmit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Remote submit to MYNODE commencing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;969 proc sql;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;970 create table TEST_RESULT as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;971 select distinct A.OFFRG_N,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;972 A.CRT_TS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;973 case when (A.OFFRG_N, A.CRT_TS) in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;76&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: !, !!, &amp;amp;, ), *, **, +, -, /, &amp;lt;, &amp;lt;=,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;gt;, =, &amp;gt;, &amp;gt;=, ?, AND, BETWEEN, CONTAINS, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET, LIKE, LT, LTT, NE, NET, NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;974 (select OFFRG_N, CRT_TS from CSTST231_PMRINSD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;975 where BUSN_TY_SEG_C = 'New' or BURN_TY_SEG_C = 'Renl')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;976 then A.PMR_BK_D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;977 else NULL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;978 end as PMR_BK_D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;979 from CSTST231_PMRINSD A, CCTRP101_OFF_TERM B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;980 where A.OFFRG_N = B.OFFRG_N&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;981 and A.CRT_TS = put(B.OFFRG_TM_CRT_TS,datetime26.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Remote submit to MYNODE complete.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 18:37:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-on-comparing-two-columns-together/m-p/154557#M40607</guid>
      <dc:creator>nikhilbajaj</dc:creator>
      <dc:date>2014-08-08T18:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: error on comparing two columns together</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-on-comparing-two-columns-together/m-p/154558#M40608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is a syntax style that teradata supports but sas does not.&lt;/P&gt;&lt;P&gt;you could concatenate the columns OFFRG_N and CRT_TS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2014 21:50:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-on-comparing-two-columns-together/m-p/154558#M40608</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-08-08T21:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: error on comparing two columns together</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/error-on-comparing-two-columns-together/m-p/154559#M40609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;case when &lt;/STRONG&gt;&lt;EM&gt;CATS(A.OFFRG_N, A.CRT_TS)&lt;/EM&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt; in &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;(select &lt;/STRONG&gt;&lt;EM&gt;CATS(OFFRG_N, CRT_TS)&lt;/EM&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt; from CSTST231_PMRINSD&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;where BUSN_TY_SEG_C = 'New' or BURN_TY_SEG_C = 'Renl')&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Aug 2014 14:14:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/error-on-comparing-two-columns-together/m-p/154559#M40609</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-08-09T14:14:33Z</dc:date>
    </item>
  </channel>
</rss>

