<?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: Expression using greater than or equal (&amp;gt;=) has components that are of different data in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582716#M34529</link>
    <description>&lt;P&gt;One of the variables in your Where Clause is compared to values that are of a different type. You treat ED as a character variable and InserDate as numeric.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Aug 2019 10:42:37 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-08-21T10:42:37Z</dc:date>
    <item>
      <title>ERROR: Expression using greater than or equal (&gt;=) has components that are of different data types.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582715#M34528</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote a proc sql create table step and I'm bringing in a field called ED and only want the blank fields and the Insertdate must be today's date. below is my my code but I'm getting errors.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc sql; create table ELA as select&lt;BR /&gt;&amp;nbsp;a. *&lt;BR /&gt;,b. ED&lt;/P&gt;&lt;P&gt;From ELA_1 a left outer join COLD.Off b on a.Account_number=b.ACCOUNT_NUMBER;&lt;BR /&gt;Where ED=('Paying','DA2','HP','NOM') and InsertDate = input('2019-08-21',yymmdd8.) then delete;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 10:33:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582715#M34528</guid>
      <dc:creator>Ela_84</dc:creator>
      <dc:date>2019-08-21T10:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using greater than or equal (&gt;=) has components that are of different data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582716#M34529</link>
      <description>&lt;P&gt;One of the variables in your Where Clause is compared to values that are of a different type. You treat ED as a character variable and InserDate as numeric.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 10:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582716#M34529</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-08-21T10:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using greater than or equal (&gt;=) has components that are of different data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582717#M34530</link>
      <description>So I would need to format the numeric to character then?&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Aug 2019 10:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582717#M34530</guid>
      <dc:creator>Ela_84</dc:creator>
      <dc:date>2019-08-21T10:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using greater than or equal (&gt;=) has components that are of different data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582720#M34532</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223624"&gt;@Ela_84&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;So I would need to format the numeric to character then?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depends on the type of "InsertDate". You can use proc contents to get an overview of the variable and how they are defined.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 11:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582720#M34532</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-08-21T11:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using greater than or equal (&gt;=) has components that are of different data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582723#M34534</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223624"&gt;@Ela_84&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wrote a proc sql create table step and I'm bringing in a field called ED and only want the blank fields and the Insertdate must be today's date. below is my my code but I'm getting errors.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc sql; create table ELA as select&lt;BR /&gt;&amp;nbsp;a. *&lt;BR /&gt;,b. ED&lt;/P&gt;
&lt;P&gt;From ELA_1 a left outer join COLD.Off b on a.Account_number=b.ACCOUNT_NUMBER&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Where&lt;/FONT&gt;&lt;/STRONG&gt; ED&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;=&lt;/FONT&gt;&lt;/STRONG&gt;('Paying','DA2','HP','NOM') and InsertDate = input('2019-08-21',yymmdd8.) &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;then delete&lt;/FONT&gt;&lt;/STRONG&gt;;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The code you've posted here is not valid SQL. I've made the obviously wrong parts above bold red.&lt;/P&gt;
&lt;P&gt;The &lt;EM&gt;then delete&lt;/EM&gt;&amp;nbsp;makes me question what your desired result actually might be so I'm not trying to fix the syntax without further information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The easiest way to help you would be if you also post sample data (like working SAS data steps which create the source tables) and then tell/show us how the desired result should look like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 11:11:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582723#M34534</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-08-21T11:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using greater than or equal (&gt;=) has components that are of different data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582724#M34535</link>
      <description>InsertDate is Character and ED is Character&lt;BR /&gt;&lt;BR /&gt;I'm matching the tables using the accountnumbers which are numeric.&lt;BR /&gt;&lt;BR /&gt;I'm very new to SAS, have no idea how to write a proc contents</description>
      <pubDate>Wed, 21 Aug 2019 11:10:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582724#M34535</guid>
      <dc:creator>Ela_84</dc:creator>
      <dc:date>2019-08-21T11:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using greater than or equal (&gt;=) has components that are of different data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582725#M34536</link>
      <description>I'll get that sample now</description>
      <pubDate>Wed, 21 Aug 2019 11:11:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582725#M34536</guid>
      <dc:creator>Ela_84</dc:creator>
      <dc:date>2019-08-21T11:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using greater than or equal (&gt;=) has components that are of different data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582730#M34537</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223624"&gt;@Ela_84&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;InsertDate is Character&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;accountnumbers which are numeric.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Just the opposite from what it should be. Dates should be stored as SAS dates (numeric, with a date forma, count of days from 1960-01-01), while accountnumbers, which are never used for calculation, should be stored as character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start by making your data intelligent, then your coding will become much easier. See Maxim 33.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And take heed of Maxim 12. Your code is nigh unreadable because of the ugly, inconsistent non-formatting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And fix ERRORs from the top. Your first ERROR is here&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql; create table ELA as select
 a. *&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;caused by the blank between the dot and asterisk.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 11:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582730#M34537</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-21T11:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Expression using greater than or equal (&gt;=) has components that are of different data</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582739#M34538</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223624"&gt;@Ela_84&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I'm very new to SAS, have no idea how to write a proc contents&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Very easy. Read the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=p06aw5wr49vg04n1n0iqzalvqss0.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; (Maxim 1), and write the code. It's especially easy with proc contents:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc contents data=/* insert your dataset here */;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Aug 2019 12:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ERROR-Expression-using-greater-than-or-equal-gt-has-components/m-p/582739#M34538</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-21T12:02:57Z</dc:date>
    </item>
  </channel>
</rss>

