<?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: Insert using SQL Pass Through in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-using-SQL-Pass-Through/m-p/800906#M20274</link>
    <description>&lt;P&gt;Thank you Kurt and Tom.&lt;/P&gt;
&lt;P&gt;"Execute" is what I missed. It works fine now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you both again.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Mar 2022 16:58:05 GMT</pubDate>
    <dc:creator>prad001</dc:creator>
    <dc:date>2022-03-08T16:58:05Z</dc:date>
    <item>
      <title>Insert using SQL Pass Through</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-using-SQL-Pass-Through/m-p/800870#M20271</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to insert rows in SQL Server DB using SAS SQL Pass through facility.&lt;/P&gt;
&lt;P&gt;The below code works fine in SQL but I am not sure what I am missing while I am incorporating it in SAS. Could you please tell me the appropriate changes to be made in SAS.&lt;/P&gt;
&lt;PRE&gt;USE [SDMS]
GO


INSERT INTO [sur].[FactSurveyTotal]
([SurveySK]
,[TotalTypeNm]
,[TotalSubTypeNm]
,[DOSTotalCnt]
,[EDWTotalCnt]
,[WithNAPct]
,[WithoutNAPct]
)
VALUES (
(SELECT SurveySK FROM sur.DimSurvey where SurveyYearNum='2020' AND SurveyTypeNm='Physician')
,'Test Type'
, 'Test SubType'
,1
,2
,3
,4
)
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
connect to odbc(dsn="XXXXXX" user=XXXX password="XXXXX" );
(
ABOVE SQL CODE
);
QUIT;

&lt;/PRE&gt;
&lt;P&gt;Am I missing anything or should I modify the sql code in any way ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Prad&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 15:38:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Insert-using-SQL-Pass-Through/m-p/800870#M20271</guid>
      <dc:creator>prad001</dc:creator>
      <dc:date>2022-03-08T15:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Insert using SQL Pass Through</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-using-SQL-Pass-Through/m-p/800872#M20272</link>
      <description>&lt;P&gt;For a pure pass-through command, you need the SAS SQL &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/sqlproc/n0tpd3yaqvep53n1g8wahav3hgco.htm" target="_blank" rel="noopener"&gt;EXECUTE&lt;/A&gt; statement.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 15:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Insert-using-SQL-Pass-Through/m-p/800872#M20272</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-03-08T15:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Insert using SQL Pass Through</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-using-SQL-Pass-Through/m-p/800905#M20273</link>
      <description>&lt;P&gt;You need to tell SAS that you want to run the command on the remote.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;execute by ODBC 
(
ABOVE SQL CODE
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Mar 2022 16:55:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Insert-using-SQL-Pass-Through/m-p/800905#M20273</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-08T16:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Insert using SQL Pass Through</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Insert-using-SQL-Pass-Through/m-p/800906#M20274</link>
      <description>&lt;P&gt;Thank you Kurt and Tom.&lt;/P&gt;
&lt;P&gt;"Execute" is what I missed. It works fine now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you both again.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 16:58:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Insert-using-SQL-Pass-Through/m-p/800906#M20274</guid>
      <dc:creator>prad001</dc:creator>
      <dc:date>2022-03-08T16:58:05Z</dc:date>
    </item>
  </channel>
</rss>

