<?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: Inserting data from 1 Lib to another in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483285#M71705</link>
    <description>&lt;P&gt;I merged the posts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use proc append:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc append
  data=staging.invoice
  base=cleaning.invoice
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 02 Aug 2018 05:46:13 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-08-02T05:46:13Z</dc:date>
    <item>
      <title>Inserting data from 1 Lib to another</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483277#M71701</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to insert the data from 1 lib to another using the below SAS code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
INSERT INTO Cleaning.Invoice 
SELECT * FROM Staging.Invoice;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am getting the below error message&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ERROR: You cannot reopen CLEANING.INVOICE.DATA for update access with member-level control because CLEANING.INVOICE.DATA is in use 
 by you in resource environment SQL (2).

 ERROR: PROC SQL could not undo this statement if an ERROR were to happen as it could not obtain exclusive access to the data set. 
        This statement will not execute as the SQL option UNDO_POLICY=REQUIRED is in effect.&lt;/PRE&gt;&lt;P&gt;Metadata for both Invoice is same&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 05:27:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483277#M71701</guid>
      <dc:creator>shahsn11</dc:creator>
      <dc:date>2018-08-02T05:27:49Z</dc:date>
    </item>
    <item>
      <title>Inserting data from one library to another</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483282#M71703</link>
      <description>&lt;P&gt;I am trying to insert the data from 1 lib to another using the below SAS code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC SQL;
INSERT INTO Cleaning.Invoice 
SELECT * FROM Staging.Invoice;
quit;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;I am getting the below error message&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ERROR: You cannot reopen CLEANING.INVOICE.DATA for update access with member-level control because CLEANING.INVOICE.DATA is in use 
by you in resource environment SQL (2).

ERROR: PROC SQL could not undo this statement if an ERROR were to happen as it could not obtain exclusive access to the data set. 
This statement will not execute as the SQL option UNDO_POLICY=REQUIRED is in effect.&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Metadata for both Invoice is same&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 05:39:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483282#M71703</guid>
      <dc:creator>shahsn11</dc:creator>
      <dc:date>2018-08-02T05:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from 1 Lib to another</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483285#M71705</link>
      <description>&lt;P&gt;I merged the posts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use proc append:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc append
  data=staging.invoice
  base=cleaning.invoice
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Aug 2018 05:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483285#M71705</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-02T05:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from 1 Lib to another</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483288#M71706</link>
      <description>&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;PROC&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;SQL&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token keyword"&gt;INSERT&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;INTO&lt;/SPAN&gt; Cleaning&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Invoice(&lt;SPAN class="token statement"&gt;SELECT&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;*&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;FROM&lt;/SPAN&gt; Staging&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;Invoice) &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; &lt;BR /&gt;&lt;SPAN class="token procnames"&gt;quit&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Aug 2018 06:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483288#M71706</guid>
      <dc:creator>AnilKumar_vDoIT</dc:creator>
      <dc:date>2018-08-02T06:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from 1 Lib to another</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483497#M71728</link>
      <description>&lt;P&gt;Thanks Kurt and Anil for the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anil unfortunately the solution propose by you is not working for me. It is giving error message like below. I see that there is no scope to improve the syntax error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ERROR 22-322: Syntax error, expecting one of the following: ), ','. &lt;/PRE&gt;&lt;P&gt;Kurt yours solution is working fine but i need to apply a where condition on staging.invoice which i cannot apply using proc append. I am looking for something like&lt;/P&gt;&lt;PRE&gt;PROC SQL;
INSERT INTO Cleaning.Invoice(SELECT * FROM Staging.Invoice where billto in (select billto from Cleaning.invoice)) ; 
quit;&lt;/PRE&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 17:40:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483497#M71728</guid>
      <dc:creator>shahsn11</dc:creator>
      <dc:date>2018-08-02T17:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting data from 1 Lib to another</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483500#M71730</link>
      <description>&lt;P&gt;create a lookup table for the billto variable:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort
  data=cleaning.invoice (keep=billto)
  out=lookup
  nodupkey
;
by billto;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then prepare the dataset for appending by joining with that.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Aug 2018 17:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Inserting-data-from-1-Lib-to-another/m-p/483500#M71730</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-08-02T17:50:06Z</dc:date>
    </item>
  </channel>
</rss>

