<?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 I am trying to find accounts looping in again in the same reference code. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/I-am-trying-to-find-accounts-looping-in-again-in-the-same/m-p/835567#M35957</link>
    <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I have created a table where previous account status was 133 reference code. I want to find the looping accounts in 133 reference code to know if I am dealing with same account numbers every month. Can you please the correct way to find out? I am stuck with my code as I don't know what should I add in to see if the same accounts are coming back in 133 reference code?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* accounts moved out from 133 in 2022 */
Proc sql;
create table accounts_moved_out_of_133 as
select accountnumber,
AccountStatus,
PreviousAccountStatus,
EnteredAccountStatusDate as entered_in_current_ref_code
from dwhdw.dim_account
where PreviousAccountStatus like '133' ;
quit;

/* Have they ever been in 133 more than once */
proc sql; 
create table looping_in_133 as &lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 28 Sep 2022 10:39:14 GMT</pubDate>
    <dc:creator>Sandeep77</dc:creator>
    <dc:date>2022-09-28T10:39:14Z</dc:date>
    <item>
      <title>I am trying to find accounts looping in again in the same reference code.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/I-am-trying-to-find-accounts-looping-in-again-in-the-same/m-p/835567#M35957</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I have created a table where previous account status was 133 reference code. I want to find the looping accounts in 133 reference code to know if I am dealing with same account numbers every month. Can you please the correct way to find out? I am stuck with my code as I don't know what should I add in to see if the same accounts are coming back in 133 reference code?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* accounts moved out from 133 in 2022 */
Proc sql;
create table accounts_moved_out_of_133 as
select accountnumber,
AccountStatus,
PreviousAccountStatus,
EnteredAccountStatusDate as entered_in_current_ref_code
from dwhdw.dim_account
where PreviousAccountStatus like '133' ;
quit;

/* Have they ever been in 133 more than once */
proc sql; 
create table looping_in_133 as &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Sep 2022 10:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/I-am-trying-to-find-accounts-looping-in-again-in-the-same/m-p/835567#M35957</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2022-09-28T10:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to find accounts looping in again in the same reference code.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/I-am-trying-to-find-accounts-looping-in-again-in-the-same/m-p/835573#M35958</link>
      <description>&lt;P&gt;Please show us some sample data, as &lt;FONT color="#FF0000"&gt;working&lt;/FONT&gt; SAS data step code (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;instructions&lt;/A&gt;). Please show us the desired output from this sample data.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 11:02:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/I-am-trying-to-find-accounts-looping-in-again-in-the-same/m-p/835573#M35958</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-28T11:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to find accounts looping in again in the same reference code.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/I-am-trying-to-find-accounts-looping-in-again-in-the-same/m-p/835578#M35959</link>
      <description>&lt;P&gt;Hi, The below is the example of data when I checked the accounts that moved out of 133:&lt;/P&gt;
&lt;TABLE width="534"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="106"&gt;AccountNumber&lt;/TD&gt;
&lt;TD width="93"&gt;AccountStatus&lt;/TD&gt;
&lt;TD width="146"&gt;PreviousAccountStatus&lt;/TD&gt;
&lt;TD width="189"&gt;entered_in_current_ref_code&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;318795598&lt;/TD&gt;
&lt;TD&gt;2H01&lt;/TD&gt;
&lt;TD&gt;133&lt;/TD&gt;
&lt;TD&gt;26-Sep-22&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;402274427&lt;/TD&gt;
&lt;TD&gt;005H&lt;/TD&gt;
&lt;TD&gt;133&lt;/TD&gt;
&lt;TD&gt;24-Sep-22&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;353938335&lt;/TD&gt;
&lt;TD&gt;005H&lt;/TD&gt;
&lt;TD&gt;133&lt;/TD&gt;
&lt;TD&gt;25-Sep-22&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;266264266&lt;/TD&gt;
&lt;TD&gt;005H&lt;/TD&gt;
&lt;TD&gt;133&lt;/TD&gt;
&lt;TD&gt;26-Sep-22&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;I want to find how many times the account number have moved out of 133 reference code. Is there a way to find it out? I am looking for all the accounts which are looping in 133 every month.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 11:17:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/I-am-trying-to-find-accounts-looping-in-again-in-the-same/m-p/835578#M35959</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2022-09-28T11:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to find accounts looping in again in the same reference code.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/I-am-trying-to-find-accounts-looping-in-again-in-the-same/m-p/835579#M35960</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/391779"&gt;@Sandeep77&lt;/a&gt;&amp;nbsp;we're trying to help you, but you have to help us. Please do not ignore the request to provide data in a usable form, which I wrote as: "...&amp;nbsp;&lt;SPAN&gt;as&amp;nbsp;&lt;/SPAN&gt;&lt;FONT color="#FF0000"&gt;working&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;SAS data step code (&lt;/SPAN&gt;&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self" rel="nofollow noopener noreferrer"&gt;instructions&lt;/A&gt;&lt;SPAN&gt;)".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Also, please do not ignore my request to see the desired output.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 11:26:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/I-am-trying-to-find-accounts-looping-in-again-in-the-same/m-p/835579#M35960</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-09-28T11:26:22Z</dc:date>
    </item>
  </channel>
</rss>

