<?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: Update multiple table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Update-multiple-table/m-p/574563#M162377</link>
    <description>&lt;P&gt;Your query is being pushed into the remote database. So the data references need to point to data in that database.&lt;/P&gt;
&lt;P&gt;Teradata is not going to recognize any SAS librefs or SAS datasets.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2019 13:43:59 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-07-18T13:43:59Z</dc:date>
    <item>
      <title>Update multiple table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-multiple-table/m-p/574561#M162376</link>
      <description>Hi,&lt;BR /&gt;I have the below proc sql query where c_accnt table&lt;BR /&gt;has columns present in attached excel(under updt_col_nm variable).where there are 5columns for c_accnt table.and 1 column each for remaining table.i have to do the same process of updating table in a efficient way. Which should be a dynamic way to do it.can we do this in single query?I have 20 table and their corresponding columns.&lt;BR /&gt;Pls note:&lt;BR /&gt;"Updt_col_nm"(varaible name in attached excel) is derived from "thr_pt_acct_nr_col_nm".&lt;BR /&gt;&lt;BR /&gt;I have used below query to update single table-&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Proc sql,&lt;BR /&gt;Connect to teradata as tera(server="&amp;amp;eiwdb" authdomain="&amp;amp;segkc" mode=teradata);&lt;BR /&gt;Execute(&lt;BR /&gt;Update hst&lt;BR /&gt;From libname.c_accnt hst,&lt;BR /&gt;Libname.tb_rflkup lkp&lt;BR /&gt;Set&lt;BR /&gt;C_account_no=substr(lkp.new_thr_pt_acct_nr,7,23),&lt;BR /&gt;C_account_no_cl=substr(lkp.new_thr_pt_acct_nr,7,23),&lt;BR /&gt;C_company_id=substr(lkp.new_thr_pt_acct_nr,1,3),&lt;BR /&gt;C_prd_cd=substr(lkp.new_thr_pt_acct_nr,4,3),&lt;BR /&gt;Account_number=lkp.new_thr_pt_acct_nr&lt;BR /&gt;Where hst.account_number=lkp.old_thr_pt_acct_nr;&lt;BR /&gt;)by tera;&lt;BR /&gt;Disconnect from tera;&lt;BR /&gt;Quit;&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Jul 2019 13:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-multiple-table/m-p/574561#M162376</guid>
      <dc:creator>nid197</dc:creator>
      <dc:date>2019-07-18T13:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Update multiple table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-multiple-table/m-p/574563#M162377</link>
      <description>&lt;P&gt;Your query is being pushed into the remote database. So the data references need to point to data in that database.&lt;/P&gt;
&lt;P&gt;Teradata is not going to recognize any SAS librefs or SAS datasets.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 13:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-multiple-table/m-p/574563#M162377</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-18T13:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Update multiple table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-multiple-table/m-p/574566#M162379</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Here ips the excel sheet i have mentioned in above que.i had to type the table contents here.first row is the variable name.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;tbl_nm thr_pt_acct_nr_col_nm updt_col_nm&lt;BR /&gt;wire_sm account_number account_number&lt;BR /&gt;pfa_histry ent_nbr ent_nbr&lt;BR /&gt;c_accnt account_number c_account_no&lt;BR /&gt;c_accnt account_number c_account_no_cl&lt;BR /&gt;c_accnt account_number c_company_id&lt;BR /&gt;c_accnt account_number c_prd_code&lt;BR /&gt;c_accnt account_number account_number&lt;BR /&gt;pfa_agg account_nbr ent_nbr&lt;BR /&gt;pfa_agg account_nbr account_nbr&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It would be great if anyone could help me out.really couldnt find a solution to this&lt;BR /&gt;Thanks:)</description>
      <pubDate>Thu, 18 Jul 2019 13:47:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-multiple-table/m-p/574566#M162379</guid>
      <dc:creator>nid197</dc:creator>
      <dc:date>2019-07-18T13:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Update multiple table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-multiple-table/m-p/574574#M162383</link>
      <description>Hi Tom,&lt;BR /&gt;Yes the above query gave me the results but i am just looking an efficient and less time consuming way to do it..i have to write the same query for all the other tables.this makes the program quite lengthy.can i do it using macros or so any loops.i believe we cant update multiple teradata tables at the same time.and even if we can the variables to be updated in those tables are not same they are different.some tables have 5 variable to be updated some just have 1.&lt;BR /&gt;I hope you get my question now.</description>
      <pubDate>Thu, 18 Jul 2019 13:55:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-multiple-table/m-p/574574#M162383</guid>
      <dc:creator>nid197</dc:creator>
      <dc:date>2019-07-18T13:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Update multiple table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-multiple-table/m-p/574613#M162403</link>
      <description>&lt;P&gt;Tutorial on turning a program into a macro&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md" target="_blank"&gt;https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/132373"&gt;@nid197&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi Tom,&lt;BR /&gt;Yes the above query gave me the results but i am just looking an efficient and less time consuming way to do it..i have to write the same query for all the other tables.this makes the program quite lengthy.can i do it using macros or so any loops.i believe we cant update multiple teradata tables at the same time.and even if we can the variables to be updated in those tables are not same they are different.some tables have 5 variable to be updated some just have 1.&lt;BR /&gt;I hope you get my question now.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 14:59:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-multiple-table/m-p/574613#M162403</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-18T14:59:31Z</dc:date>
    </item>
  </channel>
</rss>

