<?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: In operator does not work in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912659#M40866</link>
    <description>&lt;P&gt;Incorrect answer. You have proved to us that the join fails; but we still don't know why.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The answer is that we need to know what is in these two data sets, so we can see why the merge is failing. Please show us portions of these two data sets. Please, we have discussed this before, I am going to insist now that you follow &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;&amp;nbsp;and run the DATA2DATASTEP macro there, and not provide portions of the data sets via other methods. Repeating: I insist that you provide the data using the&amp;nbsp;DATA2DATASTEP at&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;. I do not ask this to be annoying; I ask this so that you will provide all the necessary information we need to figure out what the problem is. You will get faster and better answers by doing this. Using this macro helps you as well as us.&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jan 2024 12:56:54 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-01-23T12:56:54Z</dc:date>
    <item>
      <title>In operator does not work</title>
      <link>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912651#M40863</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to find data which has month value as&amp;nbsp;202311, 202310, 202309, 202308 using the IN operator but when I use it, it does not produce any data whereas when I remove the where clause, it does shows me data which include&amp;nbsp;202311, 202310, 202309, 202308 in the month column. Here is the sample dataset:&lt;BR /&gt;Data Test; &lt;BR /&gt;infile cards expandtabs; &lt;BR /&gt;input ACCOUNT_ID FINREP_CURR_SEGMENT$ FINREP_CURR_SEGMENT_REASON$ DPD DRAWN_EXPOSURE MONTH;&lt;BR /&gt;datalines; &lt;BR /&gt;523668093 PERFORMING MEETREQUIREMENTS 0 21216.12 202309&lt;BR /&gt;592534742 PERFORMING MEETREQUIREMENTS 0 8281.46 202309&lt;BR /&gt;592596089 PERFORMING MEETREQUIREMENTS 0 11241.67 202309&lt;BR /&gt;523321583 PERFORMING MEETREQUIREMENTS 0 21188.56 202310&lt;BR /&gt;523355337 PERFORMING MEETREQUIREMENTS 0 14315.05 202310&lt;BR /&gt;; &lt;BR /&gt;run;&lt;BR /&gt;The month is in&amp;nbsp;YYMMN6. format.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql;
create table Test as 
select a.ACCOUNT_ID,
a.FINREP_CURR_SEGMENT,
a.FINREP_CURR_SEGMENT_REASON,
a.DPD,
a.DRAWN_EXPOSURE,
b.Month
from Aug_Nov_check as a
inner join FSFINREP.FINREP_LM_AF_DET as b on a.ACCOUNT_ID = b.ACCOUNT_ID
/*where b.Month in (202311, 202310, 202309, 202308)*/;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;My code runs without any error when I remove the Month but when I add it, it does not produce any data. Could you please help?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 12:19:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912651#M40863</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2024-01-23T12:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: In operator does not work</title>
      <link>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912655#M40864</link>
      <description>&lt;P&gt;Please think this through. If your code is joining data sets&amp;nbsp;Aug_Nov_check and&amp;nbsp;FSFINREP.FINREP_LM_AF_DET, and it is not working, then what information would we need to help you figure out why it is not working?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 12:36:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912655#M40864</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-01-23T12:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: In operator does not work</title>
      <link>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912657#M40865</link>
      <description>&lt;P&gt;Here is the log when I include the where clause ( which does not produce any data):&lt;/P&gt;
&lt;P&gt;NOTE: Writing HTML5(EGHTML) Body file: EGHTML&lt;BR /&gt;27 &lt;BR /&gt;28 Proc sql;&lt;BR /&gt;29 create table Test as&lt;BR /&gt;30 select a.ACCOUNT_ID,&lt;BR /&gt;31 a.FINREP_CURR_SEGMENT,&lt;BR /&gt;32 a.FINREP_CURR_SEGMENT_REASON,&lt;BR /&gt;33 a.DPD,&lt;BR /&gt;34 a.DRAWN_EXPOSURE,&lt;BR /&gt;35 b.Month&lt;BR /&gt;36 from Aug_Nov_check as a&lt;BR /&gt;37 inner join FSFINREP.FINREP_LM_AF_DET as b on a.ACCOUNT_ID = b.ACCOUNT_ID&lt;BR /&gt;38 where b.Month in (202311, 202310, 202309, 202308);&lt;BR /&gt;NOTE: Table WORK.TEST created, with 0 rows and 6 columns.&lt;/P&gt;
&lt;P&gt;39 quit;&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 3.40 seconds&lt;BR /&gt;user cpu time 0.02 seconds&lt;BR /&gt;system cpu time 0.02 seconds&lt;BR /&gt;memory 5298.21k&lt;BR /&gt;OS Memory 40624.00k&lt;BR /&gt;Timestamp 01/23/2024 12:43:19 PM&lt;BR /&gt;Step Count 48 Switch Count 8&lt;BR /&gt;Page Faults 4&lt;BR /&gt;Page Reclaims 105&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 121&lt;BR /&gt;Involuntary Context Switches 1&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 0&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 12:44:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912657#M40865</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2024-01-23T12:44:24Z</dc:date>
    </item>
    <item>
      <title>Re: In operator does not work</title>
      <link>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912659#M40866</link>
      <description>&lt;P&gt;Incorrect answer. You have proved to us that the join fails; but we still don't know why.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The answer is that we need to know what is in these two data sets, so we can see why the merge is failing. Please show us portions of these two data sets. Please, we have discussed this before, I am going to insist now that you follow &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;&amp;nbsp;and run the DATA2DATASTEP macro there, and not provide portions of the data sets via other methods. Repeating: I insist that you provide the data using the&amp;nbsp;DATA2DATASTEP at&amp;nbsp;&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt;. I do not ask this to be annoying; I ask this so that you will provide all the necessary information we need to figure out what the problem is. You will get faster and better answers by doing this. Using this macro helps you as well as us.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 12:56:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912659#M40866</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-01-23T12:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: In operator does not work</title>
      <link>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912660#M40867</link>
      <description>&lt;P&gt;Are you sure your month values are stored like this, and not as real SAS dates? What does PROC CONTENTS say about the variable?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 12:51:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912660#M40867</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-01-23T12:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: In operator does not work</title>
      <link>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912662#M40868</link>
      <description>Hi, Proc contents shows:&lt;BR /&gt;Variable = Month,&lt;BR /&gt;Type = Num,&lt;BR /&gt; Len = 8,&lt;BR /&gt;format = YYMMN6.,&lt;BR /&gt;Informat = Blank&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Jan 2024 12:56:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912662#M40868</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2024-01-23T12:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: In operator does not work</title>
      <link>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912670#M40869</link>
      <description>&lt;P&gt;Which means the values are&amp;nbsp;&lt;U&gt;counts of days starting at 1960-01-01&lt;/U&gt;, so your values in the IN list cannot work.&lt;/P&gt;
&lt;P&gt;Usually, such values would be set to the first of the month, so a literal of&lt;/P&gt;
&lt;PRE&gt;'01sep3023'd&lt;/PRE&gt;
&lt;P&gt;would work. Or you convert to a string with the same format:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where put(b.month,yymmn6.) in ("202311","202310","202309","202308")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jan 2024 13:03:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912670#M40869</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-01-23T13:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: In operator does not work</title>
      <link>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912679#M40870</link>
      <description>Thanks, that worked!!</description>
      <pubDate>Tue, 23 Jan 2024 13:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/In-operator-does-not-work/m-p/912679#M40870</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2024-01-23T13:17:46Z</dc:date>
    </item>
  </channel>
</rss>

