<?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: Insert default row into tables in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410498#M12545</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/165823"&gt;@amorts&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Assuming the target table exists and is never empty: Just use the target table also as source table, select only 1 record (if it's a SAS table then use obs=1) and then use the expressions to set the columns to the values of your choosing before loading into the target table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the APPEND transformation for all of this.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Nov 2017 23:11:56 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2017-11-03T23:11:56Z</dc:date>
    <item>
      <title>Insert default row into tables</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410146#M12540</link>
      <description>&lt;P&gt;I have quite a basic requirement to insert a record into a table and based on a hard coded sql statement using SAS DI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Initially I thought I could use a insert row transform but this requires a source table. So what is the best way of doing this?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 10:15:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410146#M12540</guid>
      <dc:creator>amorts</dc:creator>
      <dc:date>2017-11-03T10:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Insert default row into tables</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410149#M12541</link>
      <description>&lt;P&gt;&lt;STRONG&gt;?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps providing some information, examples about your question would be helpful.&lt;/P&gt;
&lt;P&gt;At a guess, SQL needs at least one source record to insert a record in a dataset, so&amp;nbsp;just choose one of the sashlpe datasets which you can identify the one record from and use that with a where - or alternatively, create a dataset with one row and use that.&amp;nbsp; Without any other info not sure what to say.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 10:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410149#M12541</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-11-03T10:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Insert default row into tables</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410166#M12542</link>
      <description>If it helps I'll be more specific. I have a bunch of empty dimension table following an initial deployment. I need to insert a default unknown record in each of them. As an example:&lt;BR /&gt;-1, 'Unknown'&lt;BR /&gt;This will be hardcoded as a sql statement so there is no source table.&lt;BR /&gt;Let me know what you need I'll provide additional information.&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Nov 2017 11:08:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410166#M12542</guid>
      <dc:creator>amorts</dc:creator>
      <dc:date>2017-11-03T11:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Insert default row into tables</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410171#M12543</link>
      <description>&lt;P&gt;Its advisable to show specific examples, I can't see your process.&amp;nbsp; I also don't know what "&lt;SPAN&gt;This will be hardcoded as a sql statement so there is no source table." means.&amp;nbsp; At a guess, and I show a specific example to show what I have taken from your text:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;data have;
  length a b $50;
  output;
  output;
run;

proc sql;
  update have
  set a="1-Unknown",
      b="1-Unknown";
quit;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Nov 2017 11:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410171#M12543</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-11-03T11:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Insert default row into tables</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410498#M12545</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/165823"&gt;@amorts&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Assuming the target table exists and is never empty: Just use the target table also as source table, select only 1 record (if it's a SAS table then use obs=1) and then use the expressions to set the columns to the values of your choosing before loading into the target table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the APPEND transformation for all of this.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2017 23:11:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410498#M12545</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-11-03T23:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Insert default row into tables</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410515#M12547</link>
      <description>Thanks both for your help! I will give that a go.&lt;BR /&gt;</description>
      <pubDate>Sat, 04 Nov 2017 07:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Insert-default-row-into-tables/m-p/410515#M12547</guid>
      <dc:creator>amorts</dc:creator>
      <dc:date>2017-11-04T07:24:11Z</dc:date>
    </item>
  </channel>
</rss>

