<?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 Two Identical Table  one at work lib  and another in sql sever in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Two-Identical-Table-one-at-work-lib-and-another-in-sql-sever/m-p/926940#M10772</link>
    <description>&lt;P&gt;Two Identical Table one at work lib and another in sql sever - One getting generated thru SAS process @ Work Library and based on that I would like to simply update the SQL Server table. What is the best way to do so ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 100+ columns in Work lib table and same in SQL server table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have library with SQL Server.&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2024 19:12:40 GMT</pubDate>
    <dc:creator>dhavalyparikh</dc:creator>
    <dc:date>2024-05-03T19:12:40Z</dc:date>
    <item>
      <title>Two Identical Table  one at work lib  and another in sql sever</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Two-Identical-Table-one-at-work-lib-and-another-in-sql-sever/m-p/926940#M10772</link>
      <description>&lt;P&gt;Two Identical Table one at work lib and another in sql sever - One getting generated thru SAS process @ Work Library and based on that I would like to simply update the SQL Server table. What is the best way to do so ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 100+ columns in Work lib table and same in SQL server table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have library with SQL Server.&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2024 19:12:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Two-Identical-Table-one-at-work-lib-and-another-in-sql-sever/m-p/926940#M10772</guid>
      <dc:creator>dhavalyparikh</dc:creator>
      <dc:date>2024-05-03T19:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Two Identical Table  one at work lib  and another in sql sever</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Two-Identical-Table-one-at-work-lib-and-another-in-sql-sever/m-p/926945#M10773</link>
      <description>&lt;P&gt;Upload table to your DB in a temp table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use an UPDATE/MODIFY (depends on DB) statement to update your table based on the temp table.&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 May 2024 20:33:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Two-Identical-Table-one-at-work-lib-and-another-in-sql-sever/m-p/926945#M10773</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2024-05-03T20:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Two Identical Table  one at work lib  and another in sql sever</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Two-Identical-Table-one-at-work-lib-and-another-in-sql-sever/m-p/927073#M10780</link>
      <description>&lt;P&gt;I assume identical means "identical in structure" and not "identical data".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your target is a database like SQL Server then you want to avoid pulling data from the DB into SAS. For this reason you first load your SAS data into the database (ideally a temporary table) and then execute the Update fully in-database (out of SAS: explicit pass-through SQL with an execute() block).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess another challenge are these 100+ columns and that you don't want to explicitly type them all in your code. Now that you're on the SQL Server side Google SQL Server forums for solutions to this challenge. If you only need an Update then &lt;A href="https://stackoverflow.com/questions/21510951/merge-to-update-all-target-table-columns" target="_self"&gt;this discussion&lt;/A&gt; might be useful for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And just another thought:&lt;/P&gt;
&lt;P&gt;There are always these challenges with floating point number precision when exchanging data between platforms (=some very small differences due to how they get stored).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not 100% sure but eventually using bulkload for loading the temp table could get you around this challenge because the data exchange is potentially textual (there are many bl_... options that let you fine tune what's happening).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 May 2024 07:19:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Two-Identical-Table-one-at-work-lib-and-another-in-sql-sever/m-p/927073#M10780</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-05-05T07:19:30Z</dc:date>
    </item>
  </channel>
</rss>

