<?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: Separating data from a table into 2 separate tables in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Separating-data-from-a-table-into-2-separate-tables/m-p/706886#M26398</link>
    <description>How many digits in 1.234567?&lt;BR /&gt;How about -12345678?</description>
    <pubDate>Fri, 18 Dec 2020 06:14:23 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2020-12-18T06:14:23Z</dc:date>
    <item>
      <title>Separating data from a table into 2 separate tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Separating-data-from-a-table-into-2-separate-tables/m-p/706875#M26391</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table that has a column that contains numeric variables. I want to create 2 separate tables based on the length of the number. If the number has more than 6 digits it should go in 1 table and all the rest into another. Is that possible? Any assistance would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 04:12:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Separating-data-from-a-table-into-2-separate-tables/m-p/706875#M26391</guid>
      <dc:creator>wheddingsjr</dc:creator>
      <dc:date>2020-12-18T04:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Separating data from a table into 2 separate tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Separating-data-from-a-table-into-2-separate-tables/m-p/706876#M26392</link>
      <description>I should have probably posted this as well. This is the query that is used to create the table. The MRN column is the column that I want to separate.&lt;BR /&gt;``PROC SQL;&lt;BR /&gt;CREATE TABLE ed.mrn_cohort_a AS&lt;BR /&gt;SELECT DISTINCT a.*&lt;BR /&gt;, C.MRN AS mrn&lt;BR /&gt;FROM work.datapull_1 a&lt;BR /&gt;LEFT JOIN EPICFIN.COVERAGE b&lt;BR /&gt;ON a.member_id= b.SUBSCRIBERID&lt;BR /&gt;LEFT JOIN EPICPAT.PATIENT C&lt;BR /&gt;ON B.SubscriberPatientID=C.PATIENTID&lt;BR /&gt;AND a.member_id ne ''&lt;BR /&gt;;QUIT;``</description>
      <pubDate>Fri, 18 Dec 2020 04:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Separating-data-from-a-table-into-2-separate-tables/m-p/706876#M26392</guid>
      <dc:creator>wheddingsjr</dc:creator>
      <dc:date>2020-12-18T04:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Separating data from a table into 2 separate tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Separating-data-from-a-table-into-2-separate-tables/m-p/706882#M26394</link>
      <description>&lt;P&gt;If you want to check the number of digits, you have to convert the number into a string, then you could use the length-function. But since a number with more than six digits is larger than 999999 you should just check the value. Separating data is only necessary in some very rare cases, so you may want to explain the steps to follow-up so that maybe better solutions can be found.&lt;/P&gt;
&lt;P&gt;If you have to separate the data, try the following data-step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.SmallNumbers work.LargerNumbers;
  set have;
  if MRN &amp;lt;= 999999 then output work.SmallNumbers;
  else output work.LargerNumbers;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Dec 2020 05:51:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Separating-data-from-a-table-into-2-separate-tables/m-p/706882#M26394</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-12-18T05:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Separating data from a table into 2 separate tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Separating-data-from-a-table-into-2-separate-tables/m-p/706886#M26398</link>
      <description>How many digits in 1.234567?&lt;BR /&gt;How about -12345678?</description>
      <pubDate>Fri, 18 Dec 2020 06:14:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Separating-data-from-a-table-into-2-separate-tables/m-p/706886#M26398</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-12-18T06:14:23Z</dc:date>
    </item>
  </channel>
</rss>

