<?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 Split data from one table to two tables in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520747#M4080</link>
    <description>&lt;P&gt;Hi I was hoping someone can help me,&lt;/P&gt;&lt;P&gt;I have 1 table with multiple columns, one of the columns is called read_type which is either a 1,2,3 or a 4.&lt;/P&gt;&lt;P&gt;I would like to put all the 1 and 2 in one table and the 3 and 4 in another table. What is the best way to do this?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Dec 2018 11:22:44 GMT</pubDate>
    <dc:creator>dassuz</dc:creator>
    <dc:date>2018-12-12T11:22:44Z</dc:date>
    <item>
      <title>Split data from one table to two tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520747#M4080</link>
      <description>&lt;P&gt;Hi I was hoping someone can help me,&lt;/P&gt;&lt;P&gt;I have 1 table with multiple columns, one of the columns is called read_type which is either a 1,2,3 or a 4.&lt;/P&gt;&lt;P&gt;I would like to put all the 1 and 2 in one table and the 3 and 4 in another table. What is the best way to do this?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 11:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520747#M4080</guid>
      <dc:creator>dassuz</dc:creator>
      <dc:date>2018-12-12T11:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Split data from one table to two tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520748#M4081</link>
      <description>&lt;PRE&gt;data want1 want2;
  set have;
  if read_type in (1,2) output want1;
  else output want2;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Dec 2018 11:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520748#M4081</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-12-12T11:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Split data from one table to two tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520754#M4084</link>
      <description>&lt;P&gt;This should do the trick.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want12;
 set have;
 where read_type&amp;lt;3;
run;
data want34;
 set have;
 where read_type&amp;gt;2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Dec 2018 11:32:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520754#M4084</guid>
      <dc:creator>MRB3855</dc:creator>
      <dc:date>2018-12-12T11:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Split data from one table to two tables</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520765#M4088</link>
      <description>&lt;P&gt;In such cases I very much prefer to use a select statement:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data
  want1
  want2
;
set have;
select (read_type);
  when (1,2) output want1;
  when (3,4) output want2;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If a value outside the given range 1-4 is encountered, the step will fail, alerting you to the unexpected value.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 11:54:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520765#M4088</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-12-12T11:54:39Z</dc:date>
    </item>
    <item>
      <title>Split 1 table to 2 Outputs</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520768#M4090</link>
      <description>&lt;P&gt;Hi I was hoping someone can help me, I have a table with many columns, One of the columns is called Read_Type, This column has millions of lines of data which consists of either a 01, 02, 03 or a zero 4. I would like to transfer all the data with a read type of 01 and 02 into&amp;nbsp;Table_A&amp;nbsp;and the remainder into Table_B, what is the best way to do this&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 12:10:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520768#M4090</guid>
      <dc:creator>dassuz</dc:creator>
      <dc:date>2018-12-12T12:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Split 1 table to 2 Outputs</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520769#M4091</link>
      <description>&lt;P&gt;Do like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Table_A Table_B;
   set have;
   if Read_Type in ('01', '02') then output Table_A;
   else output Table_B;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Dec 2018 12:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520769#M4091</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-12-12T12:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Split 1 table to 2 Outputs</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520771#M4092</link>
      <description>&lt;P&gt;Why not start by following the guidance on posting a question.&amp;nbsp; Post test data in the form of a datastep:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Show what you want the output to be.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You say in the first post you have 1,2,3,4.&amp;nbsp; In this you say you have 01, 02, 03, 04 or 0, so is that a character variable?&lt;/P&gt;
&lt;P&gt;Second, what is wrong with the code examples you have been given so far?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 12:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520771#M4092</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-12-12T12:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Split 1 table to 2 Outputs</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520776#M4093</link>
      <description>Thanks</description>
      <pubDate>Wed, 12 Dec 2018 12:28:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520776#M4093</guid>
      <dc:creator>dassuz</dc:creator>
      <dc:date>2018-12-12T12:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Split 1 table to 2 Outputs</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520780#M4094</link>
      <description>&lt;P&gt;Just replace the values in my when-branches with the correct character values.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/152343"&gt;@dassuz&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi I was hoping someone can help me, I have a table with many columns, One of the columns is called Read_Type, This column has millions of lines of data which consists of either a 01, 02, 03 or a zero 4. I would like to transfer all the data with a read type of 01 and 02 into&amp;nbsp;Table_A&amp;nbsp;and the remainder into Table_B, what is the best way to do this&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Dec 2018 12:34:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Split-data-from-one-table-to-two-tables/m-p/520780#M4094</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-12-12T12:34:47Z</dc:date>
    </item>
  </channel>
</rss>

