<?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 Proc Sql Updates from 2 tables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605553#M175769</link>
    <description>&lt;P&gt;Stupid question but I cant seen to get to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with names and IDs (AGENT_REPORT)&lt;/P&gt;&lt;P&gt;I have another table with ID's (AGENT_TRANSFERS)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to pull over the names to my table with ID's only&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;update AGENT_TRANSFERS as A&lt;BR /&gt;set AGENT_NAME = (select AGENT_NAME from AGENT_REPORT as B&lt;BR /&gt;where A.SRC_AGNT_LAN_ID = B.SRC_AGNT_LAN_ID);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get this error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_&lt;BR /&gt;73&lt;BR /&gt;76&lt;BR /&gt;ERROR 73-322: Expecting an =.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies, I'm used to coding in Toad and utilizing that syntax but trying to adapt some of this to SAS. Thank you&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2019 22:16:52 GMT</pubDate>
    <dc:creator>Jyuen204</dc:creator>
    <dc:date>2019-11-19T22:16:52Z</dc:date>
    <item>
      <title>Proc Sql Updates from 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605553#M175769</link>
      <description>&lt;P&gt;Stupid question but I cant seen to get to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with names and IDs (AGENT_REPORT)&lt;/P&gt;&lt;P&gt;I have another table with ID's (AGENT_TRANSFERS)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to pull over the names to my table with ID's only&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;update AGENT_TRANSFERS as A&lt;BR /&gt;set AGENT_NAME = (select AGENT_NAME from AGENT_REPORT as B&lt;BR /&gt;where A.SRC_AGNT_LAN_ID = B.SRC_AGNT_LAN_ID);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get this error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_&lt;BR /&gt;73&lt;BR /&gt;76&lt;BR /&gt;ERROR 73-322: Expecting an =.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies, I'm used to coding in Toad and utilizing that syntax but trying to adapt some of this to SAS. Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 22:16:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605553#M175769</guid>
      <dc:creator>Jyuen204</dc:creator>
      <dc:date>2019-11-19T22:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql Updates from 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605566#M175771</link>
      <description>&lt;P&gt;Looks OK to me, except for the run; statement (it's quit; with SQL)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post a more complete log using the {i} button.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 22:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605566#M175771</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-11-19T22:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql Updates from 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605689#M175797</link>
      <description>&lt;P&gt;Try feedback option , if you are connecting DB try these options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;options sastrace=',,,d' sastraceloc=saslog;
proc sql feedback;
...........
quit;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Nov 2019 11:53:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605689#M175797</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-11-20T11:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql Updates from 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605808#M175832</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Tried a few options&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;proc sql;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;update AGENT_TRANSFERS as A&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set AGENT_NAME = (select AGENT_NAME from AGENT_REPORT as B&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where A.SRC_AGNT_LAN_ID = B.SRC_AGNT_LAN_ID);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 ;*';*";*/;quit;run;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='Program';&lt;BR /&gt;4 %LET _CLIENTPROJECTPATH='L:\Data_Analytics\Customer Data Insights\Deliverables\Recurring\Jason\BPI - Blueprints\Nordia&lt;BR /&gt;4 ! Package Report V6.egp';&lt;BR /&gt;5 %LET _CLIENTPROJECTNAME='Nordia Package Report V6.egp';&lt;BR /&gt;6 %LET _SASPROGRAMFILE=;&lt;BR /&gt;7&lt;BR /&gt;8 ODS _ALL_ CLOSE;&lt;BR /&gt;9 OPTIONS DEV=ACTIVEX;&lt;BR /&gt;10 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;11 FILENAME EGSR TEMP;&lt;BR /&gt;12 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;13 STYLE=HtmlBlue&lt;BR /&gt;14 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/6.1/Styles/HtmlBlue.css")&lt;BR /&gt;15 NOGTITLE&lt;BR /&gt;16 NOGFOOTNOTE&lt;BR /&gt;17 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;18 ENCODING=UTF8&lt;BR /&gt;19 options(rolap="on")&lt;BR /&gt;20 ;&lt;BR /&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;21&lt;BR /&gt;22 GOPTIONS ACCESSIBLE;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;23 proc sql;&lt;BR /&gt;24 update AGENT_TRANSFERS as A&lt;BR /&gt;25 set A.AGENT_NAME = (select B.AGENT_NAME from AGENT_TMP as B&lt;BR /&gt;_&lt;BR /&gt;73&lt;BR /&gt;76&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;ERROR 73-322: Expecting an =.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;26 where A.SRC_AGNT_LAN_ID = B.AGENT_LAN_ID);&lt;BR /&gt;NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.&lt;BR /&gt;27 quit;&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;user cpu time 0.00 seconds&lt;BR /&gt;system cpu time 0.00 seconds&lt;BR /&gt;memory 34.06k&lt;BR /&gt;OS Memory 22176.00k&lt;BR /&gt;Timestamp 11/20/2019 10:48:37 AM&lt;BR /&gt;Step Count 233 Switch Count 50&lt;BR /&gt;Page Faults 0&lt;BR /&gt;Page Reclaims 7&lt;BR /&gt;Page Swaps 0&lt;BR /&gt;Voluntary Context Switches 146&lt;BR /&gt;Involuntary Context Switches 0&lt;BR /&gt;Block Input Operations 0&lt;BR /&gt;Block Output Operations 0&lt;BR /&gt;&lt;BR /&gt;28&lt;BR /&gt;29 GOPTIONS NOACCESSIBLE;&lt;BR /&gt;2 The SAS System 10:12 Wednesday, November 20, 2019&lt;/P&gt;&lt;P&gt;30 %LET _CLIENTTASKLABEL=;&lt;BR /&gt;31 %LET _CLIENTPROJECTPATH=;&lt;BR /&gt;32 %LET _CLIENTPROJECTNAME=;&lt;BR /&gt;33 %LET _SASPROGRAMFILE=;&lt;BR /&gt;34&lt;BR /&gt;35 ;*';*";*/;quit;run;&lt;BR /&gt;36 ODS _ALL_ CLOSE;&lt;BR /&gt;37&lt;BR /&gt;38&lt;BR /&gt;39 QUIT; RUN;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 15:52:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605808#M175832</guid>
      <dc:creator>Jyuen204</dc:creator>
      <dc:date>2019-11-20T15:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql Updates from 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605811#M175835</link>
      <description>&lt;P&gt;no DB connections, just trying to bring in a value from another table&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 15:55:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605811#M175835</guid>
      <dc:creator>Jyuen204</dc:creator>
      <dc:date>2019-11-20T15:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Sql Updates from 2 tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605855#M175854</link>
      <description>&lt;P&gt;Ah i figured it out, one of the tables was using an alias and my brain was too tired to realize it.....&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 17:47:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Sql-Updates-from-2-tables/m-p/605855#M175854</guid>
      <dc:creator>Jyuen204</dc:creator>
      <dc:date>2019-11-20T17:47:41Z</dc:date>
    </item>
  </channel>
</rss>

