<?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 Upadting row value in sas dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Upadting-row-value-in-sas-dataset/m-p/520504#M141146</link>
    <description>&lt;P&gt;I have a table as below sample:I wanted to update UDF_value of the matching CASE_RK when udf_nm='x_case_prd' .so I wanted to see 2016q3 to change 2016q4 for all x_case_prd when maching case_rk.Can I do that in just few steps. I can use substr and concatenate with write period but Need to know if there is another quick solution to this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="543"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="59"&gt;CASE_RK&lt;/TD&gt;
&lt;TD width="153"&gt;VALID_FROM_DTTM&lt;/TD&gt;
&lt;TD width="106"&gt;UDF_TABLE_NM&lt;/TD&gt;
&lt;TD width="83"&gt;UDF_NM&lt;/TD&gt;
&lt;TD width="64"&gt;ROW_NO&lt;/TD&gt;
&lt;TD width="78"&gt;UDF_VALUE&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3837195&lt;/TD&gt;
&lt;TD&gt;xx&lt;/TD&gt;
&lt;TD&gt;CASE&lt;/TD&gt;
&lt;TD&gt;X_CASE_PRD&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;2016Q3&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
    <pubDate>Tue, 11 Dec 2018 20:04:12 GMT</pubDate>
    <dc:creator>shuchidxt_gmail_com</dc:creator>
    <dc:date>2018-12-11T20:04:12Z</dc:date>
    <item>
      <title>Upadting row value in sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upadting-row-value-in-sas-dataset/m-p/520504#M141146</link>
      <description>&lt;P&gt;I have a table as below sample:I wanted to update UDF_value of the matching CASE_RK when udf_nm='x_case_prd' .so I wanted to see 2016q3 to change 2016q4 for all x_case_prd when maching case_rk.Can I do that in just few steps. I can use substr and concatenate with write period but Need to know if there is another quick solution to this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="543"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="59"&gt;CASE_RK&lt;/TD&gt;
&lt;TD width="153"&gt;VALID_FROM_DTTM&lt;/TD&gt;
&lt;TD width="106"&gt;UDF_TABLE_NM&lt;/TD&gt;
&lt;TD width="83"&gt;UDF_NM&lt;/TD&gt;
&lt;TD width="64"&gt;ROW_NO&lt;/TD&gt;
&lt;TD width="78"&gt;UDF_VALUE&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;3837195&lt;/TD&gt;
&lt;TD&gt;xx&lt;/TD&gt;
&lt;TD&gt;CASE&lt;/TD&gt;
&lt;TD&gt;X_CASE_PRD&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;
&lt;P&gt;&lt;FONT color="#ff6600"&gt;2016Q3&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 11 Dec 2018 20:04:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upadting-row-value-in-sas-dataset/m-p/520504#M141146</guid>
      <dc:creator>shuchidxt_gmail_com</dc:creator>
      <dc:date>2018-12-11T20:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Upadting row value in sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upadting-row-value-in-sas-dataset/m-p/520516#M141149</link>
      <description>&lt;P&gt;I could not understand what you wanted to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Typically, you can update datasets via proc sql:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to update the new column to a null value if it can't find a match, then you might use something like this:&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;update work.have as t1&lt;/P&gt;
&lt;P&gt;set t1.udf_value=(select new_value from some_data_set where col=t1.col)&lt;/P&gt;
&lt;P&gt;where t1.udf_nm='X_CASE_PRD' ;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to update the new column only when there is a match, you can add to the criteria:&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;update work.have as t1&lt;/P&gt;
&lt;P&gt;set t1.udf_value=(select new_value from some_data_set where col=t1.col)&lt;/P&gt;
&lt;P&gt;where t1.udf_nm='X_CASE_PRD'&amp;nbsp; and exists (select new_value from some_data_set where col=t1.col);&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 19:59:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upadting-row-value-in-sas-dataset/m-p/520516#M141149</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2018-12-11T19:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Upadting row value in sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upadting-row-value-in-sas-dataset/m-p/520523#M141151</link>
      <description>&lt;P&gt;I am trying to update UDF_VALUE COLUMN from 2016q3 to 2016q4(so need to change the suffix quarter from q3 to q4)&amp;nbsp; where udf_name="X_CASE_PRD" .&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 20:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upadting-row-value-in-sas-dataset/m-p/520523#M141151</guid>
      <dc:creator>shuchidxt_gmail_com</dc:creator>
      <dc:date>2018-12-11T20:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Upadting row value in sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upadting-row-value-in-sas-dataset/m-p/520594#M141192</link>
      <description>&lt;P&gt;Sounds pretty straight-forward....&lt;/P&gt;
&lt;P&gt;proc sql;&lt;/P&gt;
&lt;P&gt;update work.have&lt;/P&gt;
&lt;P&gt;set udf_value = '2016q4'&lt;/P&gt;
&lt;P&gt;where udf_nm='X_CASE_PRD' ;&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 21:49:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upadting-row-value-in-sas-dataset/m-p/520594#M141192</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2018-12-11T21:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Upadting row value in sas dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upadting-row-value-in-sas-dataset/m-p/520597#M141194</link>
      <description>&lt;P&gt;Yes, I twisted the query above and it worked for me. Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 22:04:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upadting-row-value-in-sas-dataset/m-p/520597#M141194</guid>
      <dc:creator>shuchidxt_gmail_com</dc:creator>
      <dc:date>2018-12-11T22:04:40Z</dc:date>
    </item>
  </channel>
</rss>

