<?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: Multiple Update in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700293#M214300</link>
    <description>&lt;P&gt;hi ballardw&lt;/P&gt;&lt;P&gt;was wondering if you were able to try a similar multiple update query on your end. what is the best way to deal with this one?&lt;/P&gt;</description>
    <pubDate>Thu, 19 Nov 2020 18:42:48 GMT</pubDate>
    <dc:creator>Santha</dc:creator>
    <dc:date>2020-11-19T18:42:48Z</dc:date>
    <item>
      <title>Multiple Update</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700001#M214174</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using CAS and trying to do a simple update query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;updating multiple columns of a table with some values. But i am not successful at it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is the best way?&lt;/P&gt;&lt;P&gt;i tried proc sql, proc fedsql with no success.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 21:32:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700001#M214174</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2020-11-18T21:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Update</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700004#M214176</link>
      <description>&lt;P&gt;"Unsuccessful" is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the &amp;lt;&amp;gt; to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a single key (one or more variables) to match the records on or are you attempting to update multiple records from one update record? Or multiple transactions to apply to a single record?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 21:38:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700004#M214176</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-18T21:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Update</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700013#M214180</link>
      <description>&lt;P&gt;Hi Ballardw&lt;/P&gt;&lt;P&gt;thank you.&amp;nbsp; here is the error &lt;SPAN&gt;ERROR: Update access is not supported for file CASUSER.MSD.DATA.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;my code below&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
update CASUSER.MSD
set RateIncludeOcean='YES',
RateExcludeReason='XXXX'
;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is my fedsql&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fedsql sessref=casauto;
update CASUSER.MSD
set 
{
RateIncludeOcean='YES',
RateExcludeReason='XXXX'
}
;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Here is the error for FEDSQL:&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;ERROR: Unsupported SQL statement.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;ERROR: The action stopped due to errors.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: The FedSQL action was not successful.&lt;/DIV&gt;&lt;PRE class="sasLog"&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 22:10:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700013#M214180</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2020-11-18T22:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Update</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700021#M214186</link>
      <description>&lt;P&gt;The Fedsql should be&lt;/P&gt;
&lt;PRE&gt;proc fedsql sessref=casauto;
update CASUSER.MSD
{
set 
RateIncludeOcean='YES',
RateExcludeReason='XXXX'
}
;&lt;/PRE&gt;
&lt;P&gt;from the Fedsql documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One suspects there may be more going on with your CASUSER library.&lt;/P&gt;
&lt;P&gt;From Proc sql documentation:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV class="xis-eDocBody"&gt;
&lt;DIV class="xis-refProc"&gt;
&lt;DIV class="xis-procStatement"&gt;
&lt;TABLE class="xis-procSummary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="xis-restriction"&gt;Restriction:&lt;/TD&gt;
&lt;TD class="xis-summaryValue"&gt;You cannot use &lt;FONT style="background-color: #fcdec0;"&gt;UPDATE&lt;/FONT&gt; on a table that is accessed by an engine that does not support &lt;FONT style="background-color: #fcdec0;"&gt;UPDATE&lt;/FONT&gt; processing.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="xis-summarySee"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So your CASUSER library may be on one of those engines or is for some reason read-only for you.&lt;/P&gt;
&lt;P&gt;Or something else entirely.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 22:34:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700021#M214186</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-18T22:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Update</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700032#M214193</link>
      <description>&lt;P&gt;hi ballardw&lt;/P&gt;&lt;P&gt;when i did the code. this is what i got&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
75    
76    proc fedsql sessref=casauto;
77    update CASUSER.MSD
78    {
79    set
80    RateIncludeOcean='YES',
81    RateExcludeReason='XXXX'
82    }
83    ;
ERROR: Unsupported SQL statement.
ERROR: The action stopped due to errors.
ERROR: The FedSQL action was not successful.
NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements.
84    &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Nov 2020 23:04:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700032#M214193</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2020-11-18T23:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Update</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700037#M214197</link>
      <description>&lt;P&gt;I am trying to get the SAS way of doing the following SQL code which is super simple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;UPDATE CASUSER.MSD&lt;/P&gt;&lt;P&gt;SET RateIncludeOcean = 'YES', RateExcludeReasonOcean = 'XXXX'&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 23:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700037#M214197</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2020-11-18T23:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Update</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700293#M214300</link>
      <description>&lt;P&gt;hi ballardw&lt;/P&gt;&lt;P&gt;was wondering if you were able to try a similar multiple update query on your end. what is the best way to deal with this one?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 18:42:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700293#M214300</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2020-11-19T18:42:48Z</dc:date>
    </item>
    <item>
      <title>Multiple Update in a table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700297#M214338</link>
      <description>&lt;P&gt;Hi I am working in CAS environment (SAS Viya).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get the SAS way of doing the following SQL code which is super simple. What is the best and easiest way to get this done?&lt;/P&gt;&lt;P&gt;Update CASUSER.MSD&lt;/P&gt;&lt;P&gt;Set RateIncludeOcean = 'YES', RateExcludeReasonOcean = 'XXXX'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my FedSQL way but not successful&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
75 
76 proc fedsql sessref=casauto;
77 update CASUSER.MSD
78 {
79 set
80 RateIncludeOcean='YES',
81 RateExcludeReason='XXXX'
82 }
83 ;
ERROR: Unsupported SQL statement.
ERROR: The action stopped due to errors.
ERROR: The FedSQL action was not successful.
NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements.
84&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is my proc sql way&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
update CASUSER.MSD
set RateIncludeOcean='YES',
RateExcludeReason='XXXX'
; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and here is the error for proc sql way ERROR: Update access is not supported for file CASUSER.MSD.DATA.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2020 18:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700297#M214338</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2020-11-19T18:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Update in a table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700397#M214339</link>
      <description>&lt;P&gt;The&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=casfedsql&amp;amp;docsetTarget=titlepage.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;FEDSQL Reference for CAS&lt;/A&gt;&amp;nbsp;lists only three statements: CREATE TABLE, DROP TABLE and SELECT, while the "standard" reference for SAS 9.4 lists practically all statements available in PROC SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a non-CAS environment, the curly brackets are also not needed, as this worked for me in University Edition:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
x1 = "XXX";
x2 = "YYYY";
run;

proc fedsql;
update test
  set
    x1 = 'AAA',
    x2 = 'ZZZZ'
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Nov 2020 05:37:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700397#M214339</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-20T05:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Update in a table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700578#M214412</link>
      <description>&lt;P&gt;ok i get that fedsql in CAS environment does not apply to UPDATE statement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How about proc sql? have you tried it in a CAS environment?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 18:15:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700578#M214412</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2020-11-20T18:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Update in a table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700581#M214413</link>
      <description>&lt;P&gt;I do not have a CAS installation, I only read the docs &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try it.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Nov 2020 18:19:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Multiple-Update/m-p/700581#M214413</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-20T18:19:44Z</dc:date>
    </item>
  </channel>
</rss>

