<?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: DI studio question: defaulting a Sysdate into a table column in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-question-defaulting-a-Sysdate-into-a-table-column/m-p/338465#M10006</link>
    <description>&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Hi Chris,&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;If you are using the “Table Loader” transformation, it has a “Load Time Column” option on the Options tab. The option is in the Additional Loader Options group.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;If you want to use an expression try INPUT("&amp;amp;SYSDATE9",DATE9.) in the Expression field on the Mappings tab of the Table Loader properties.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Robert&lt;/P&gt;</description>
    <pubDate>Mon, 06 Mar 2017 15:24:59 GMT</pubDate>
    <dc:creator>RLigtenberg</dc:creator>
    <dc:date>2017-03-06T15:24:59Z</dc:date>
    <item>
      <title>DI studio question: defaulting a Sysdate into a table column</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-question-defaulting-a-Sysdate-into-a-table-column/m-p/337974#M9980</link>
      <description>&lt;P&gt;Ok folks, here is my problem of the day:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using DI Studio (v4.901)to pull in files, perform some minor mapping, and format changes, then output to a permanant table.&lt;/P&gt;&lt;P&gt;As I am populating the result table, I have 4 extra columns that my table loader procedure has no possible mapping for since they are not in the source table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 of them I am defaulting to 0 or blanks using a case statement to avoid null values.(they are for usage later)&lt;/P&gt;&lt;P&gt;The 4th (is actually the last column in the result table.. is a 'Last Update Date' column that I need to default the SYSDATE into as the records are written.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I haven't found an expression/process that I can use to populate this column.&lt;/P&gt;&lt;P&gt;I'm from an AS400 backround where a simple command can accomplish this.. SAS doesnt seem quite as easy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached a screen shot to give you an idea what I'm looking at.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any help would be appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Chris N.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 19:50:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-question-defaulting-a-Sysdate-into-a-table-column/m-p/337974#M9980</guid>
      <dc:creator>cnilsen</dc:creator>
      <dc:date>2017-03-03T19:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: DI studio question: defaulting a Sysdate into a table column</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-question-defaulting-a-Sysdate-into-a-table-column/m-p/338099#M9991</link>
      <description>I think that there is a Load time column option in almost all Table Loader transformations. &lt;BR /&gt;&lt;BR /&gt;As for the zeros, no need for case, just enter a 0 in the mapping expression,  it will resolve to &lt;BR /&gt;0 as column_name</description>
      <pubDate>Sat, 04 Mar 2017 07:00:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-question-defaulting-a-Sysdate-into-a-table-column/m-p/338099#M9991</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-03-04T07:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: DI studio question: defaulting a Sysdate into a table column</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-question-defaulting-a-Sysdate-into-a-table-column/m-p/338448#M10003</link>
      <description>&lt;P&gt;I tried removing the case statements and simply putting a zero into the Expression column..&lt;/P&gt;&lt;P&gt;this worked for the 3 non-date columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the LAST_UPDATE_DT column I could not find a load time option to default in the SYSDATE.&lt;/P&gt;&lt;P&gt;Adding simply 'SYSDATE' into the expression is not valid. Leaving the column unmapped/without expression also gives me a run time error. You cannot do a null value insert into the column. I also tried to use a case staement to put in SYSDATE or TIMESTAMP. &amp;nbsp;the code validator was not very happy with either idea. It says that they are not columns found in my source table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is the error I receive:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cannot insert the value NULL into column 'LAST_UPDATE_DT', table 'MDMCDISTGDB.LANDINGZONE.CUSTOMER'; column does not allow nulls. INSERT fails. : [SAS/ACCESS to SQL Server][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]The statement has been terminated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any other Ideas?&lt;/P&gt;&lt;P&gt;-Chris N.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 14:15:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-question-defaulting-a-Sysdate-into-a-table-column/m-p/338448#M10003</guid>
      <dc:creator>cnilsen</dc:creator>
      <dc:date>2017-03-06T14:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: DI studio question: defaulting a Sysdate into a table column</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-question-defaulting-a-Sysdate-into-a-table-column/m-p/338465#M10006</link>
      <description>&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Hi Chris,&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0cm 0cm 0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;If you are using the “Table Loader” transformation, it has a “Load Time Column” option on the Options tab. The option is in the Additional Loader Options group.&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="margin: 0cm 0cm 0pt;"&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;If you want to use an expression try INPUT("&amp;amp;SYSDATE9",DATE9.) in the Expression field on the Mappings tab of the Table Loader properties.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Robert&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 15:24:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-question-defaulting-a-Sysdate-into-a-table-column/m-p/338465#M10006</guid>
      <dc:creator>RLigtenberg</dc:creator>
      <dc:date>2017-03-06T15:24:59Z</dc:date>
    </item>
    <item>
      <title>Re: DI studio question: defaulting a Sysdate into a table column</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-question-defaulting-a-Sysdate-into-a-table-column/m-p/338474#M10009</link>
      <description>&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Success!!&lt;/P&gt;&lt;P&gt;Thanks for the help. I found the additional loader column and the date populated perfectly. The fast track courses I have taken probably touched on this, but it was a lot to digest in such a short time frame..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm going to test the other method as well to see what happens. Its always good to learn more than one way to do something.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again for the help! &amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Chris N.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 15:40:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/DI-studio-question-defaulting-a-Sysdate-into-a-table-column/m-p/338474#M10009</guid>
      <dc:creator>cnilsen</dc:creator>
      <dc:date>2017-03-06T15:40:41Z</dc:date>
    </item>
  </channel>
</rss>

