<?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: Expression using IN has components that are of different data types… in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832378#M328995</link>
    <description>&lt;P&gt;If Overall_Rating is numeric then you have your answer since '1' and '2' are character literals?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   select * from sashelp.class
   where age in ('14', '15')
   ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;28         proc sql;
29            select * from sashelp.class
30            where age in ('14', '15')
31            ;
&lt;FONT color="#FF0000"&gt;ERROR: Expression using IN has components that are of different data types.&lt;/FONT&gt;
NOTE: The IN referred to may have been transformed from an OR to an IN at some point during PROC SQL WHERE clause optimization.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
32         quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;</description>
    <pubDate>Thu, 08 Sep 2022 18:20:48 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2022-09-08T18:20:48Z</dc:date>
    <item>
      <title>Expression using IN has components that are of different data types…</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832372#M328991</link>
      <description>This used to work fine and now I keep getting the Expression using IN has components that are of different data types. I ran proc contents and confirmed Overall Rating and Begin date are both numeric. Not sure why I’m getting this error.&lt;BR /&gt;&lt;BR /&gt;Proc sql;&lt;BR /&gt;Select Owner_name, count(distinct(varnum)) as number_low&lt;BR /&gt;From sheet1&lt;BR /&gt;Where Begin_date &amp;gt; input(‘10/28/2018’, mmddyy10.) and Overall_rating IN (‘1’, ‘2’, ‘’)&lt;BR /&gt;Group by owner_Name;</description>
      <pubDate>Thu, 08 Sep 2022 18:10:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832372#M328991</guid>
      <dc:creator>GiMaAsh</dc:creator>
      <dc:date>2022-09-08T18:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Expression using IN has components that are of different data types…</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832378#M328995</link>
      <description>&lt;P&gt;If Overall_Rating is numeric then you have your answer since '1' and '2' are character literals?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
   select * from sashelp.class
   where age in ('14', '15')
   ;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;28         proc sql;
29            select * from sashelp.class
30            where age in ('14', '15')
31            ;
&lt;FONT color="#FF0000"&gt;ERROR: Expression using IN has components that are of different data types.&lt;/FONT&gt;
NOTE: The IN referred to may have been transformed from an OR to an IN at some point during PROC SQL WHERE clause optimization.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
32         quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Sep 2022 18:20:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832378#M328995</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-09-08T18:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Expression using IN has components that are of different data types…</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832383#M328999</link>
      <description>&lt;P&gt;Show us the &lt;FONT color="#FF0000"&gt;ENTIRE&lt;/FONT&gt; log for this PROC SQL. Showing us an error detached from the code doesn't usually help.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 18:29:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832383#M328999</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-08T18:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Expression using IN has components that are of different data types…</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832384#M329000</link>
      <description>So how would I just pull 0, 1, or 2 so it can be numeric?</description>
      <pubDate>Thu, 08 Sep 2022 18:30:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832384#M329000</guid>
      <dc:creator>GiMaAsh</dc:creator>
      <dc:date>2022-09-08T18:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Expression using IN has components that are of different data types…</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832385#M329001</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Show us the &lt;FONT color="#FF0000"&gt;ENTIRE&lt;/FONT&gt; log for this PROC SQL. Showing us an error detached from the code doesn't usually help.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Any bets that this new data was created with Proc Import and the result is one or more of the variables changing type.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 18:31:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832385#M329001</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-09-08T18:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Expression using IN has components that are of different data types…</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832391#M329005</link>
      <description>Thank you for this! I finally got it</description>
      <pubDate>Thu, 08 Sep 2022 19:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Expression-using-IN-has-components-that-are-of-different-data/m-p/832391#M329005</guid>
      <dc:creator>GiMaAsh</dc:creator>
      <dc:date>2022-09-08T19:00:35Z</dc:date>
    </item>
  </channel>
</rss>

