<?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: Connecting SQL Table in SAS Viya in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605912#M175885</link>
    <description>&lt;P&gt;I have tried differen options like with and without semi colon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I remove the semi colon at the end of load statement i get a different error. Here is the details of it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;77 load casdata="OceanRatingQueries" incaslib="LMENG" outcaslib="STDOPT" casout="OceanRatingQueries"&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 WHERE="Category='Terminal'";&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Performing serial LoadTable action using SAS Data Connector to SQL Server.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Error occurred during Post Optimization.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: ERROR: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near the keyword 'or'.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: ERROR: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]The batch could not be analyzed because of compile&lt;/DIV&gt;&lt;DIV class="sasError"&gt;errors.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Function failed.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: The action stopped due to errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The Cloud Analytic Services server processed the request in 0.179257 seconds.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;79 promote;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Parameter 'name' is required but was not specified.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: The action stopped due to errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The Cloud Analytic Services server processed the request in 0.000972 seconds.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;80 run;&lt;/DIV&gt;</description>
    <pubDate>Wed, 20 Nov 2019 19:54:23 GMT</pubDate>
    <dc:creator>Santha</dc:creator>
    <dc:date>2019-11-20T19:54:23Z</dc:date>
    <item>
      <title>Connecting SQL Table in SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605156#M175560</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am new to SAS Viya.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a caslib called "X". I want to load a SQL table from another library into X with filters applied (meaning specific records from SQL only). I have this code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc casutil;&lt;/P&gt;&lt;P&gt;load casdata="MSD" incaslib="LMENG" outcaslib="X" casout="MSDFiltered"&lt;BR /&gt;where="MasterClientName='XXX' and mode='Ocean' and YearQuarter='FY19Q3'";&lt;BR /&gt;promote;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I get an error saying the following . Any help to fix this is appreciated. Thank you.&lt;/P&gt;&lt;P&gt;"ERROR: Error occurred during Post Optimization.&lt;/P&gt;&lt;DIV class="sasError"&gt;ERROR: ERROR: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near the keyword 'Top'.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: ERROR: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]The batch could not be analyzed because of compile&lt;/DIV&gt;&lt;DIV class="sasError"&gt;errors.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Function failed.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: The action stopped due to errors.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;DIV class="sasNote"&gt;NOTE: The Cloud Analytic Services server processed the request in 0.208456 seconds.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;81 promote;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Parameter 'name' is required but was not specified.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: The action stopped due to errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The Cloud Analytic Services server pr&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Nov 2019 19:01:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605156#M175560</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2019-11-18T19:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting SQL Table in SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605333#M175671</link>
      <description>&lt;P&gt;I would start by tracing the query. See &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/SAS-Data-Connector-SAS-Data-Connect-Accelerator-Logging/ta-p/496832" target="_self"&gt;SAS Data Connector/SAS Data Connect Accelerator Logging&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 08:19:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605333#M175671</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-11-19T08:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting SQL Table in SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605890#M175873</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I read it and i think it is a syntax issue that I don't get it. I am not able to figure out what part of&amp;nbsp; my Where clause is wrong. I was able to import the Full Table Called OceanRatingQueries. BUt what i really need is only when the Category says "terminal". Here is my code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc casutil;&lt;BR /&gt;load casdata="OceanRatingQueries" incaslib="LMENG" outcaslib="STDOPT" casout="OceanRatingQueries";&lt;BR /&gt;WHERE="Category='Terminal'";&lt;BR /&gt;promote;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 19:02:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605890#M175873</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2019-11-20T19:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting SQL Table in SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605909#M175884</link>
      <description>&lt;P&gt;You seem to have an extra semi-colon in the middle of your LOAD statement.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 19:49:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605909#M175884</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-11-20T19:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting SQL Table in SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605912#M175885</link>
      <description>&lt;P&gt;I have tried differen options like with and without semi colon.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I remove the semi colon at the end of load statement i get a different error. Here is the details of it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;77 load casdata="OceanRatingQueries" incaslib="LMENG" outcaslib="STDOPT" casout="OceanRatingQueries"&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;78 WHERE="Category='Terminal'";&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Performing serial LoadTable action using SAS Data Connector to SQL Server.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Error occurred during Post Optimization.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: ERROR: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near the keyword 'or'.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: ERROR: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]The batch could not be analyzed because of compile&lt;/DIV&gt;&lt;DIV class="sasError"&gt;errors.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Function failed.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: The action stopped due to errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The Cloud Analytic Services server processed the request in 0.179257 seconds.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;79 promote;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: Parameter 'name' is required but was not specified.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR: The action stopped due to errors.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: The Cloud Analytic Services server processed the request in 0.000972 seconds.&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;80 run;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Nov 2019 19:54:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605912#M175885</guid>
      <dc:creator>Santha</dc:creator>
      <dc:date>2019-11-20T19:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Connecting SQL Table in SAS Viya</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605994#M175910</link>
      <description>&lt;P&gt;You had&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; ERROR: ERROR: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near the keyword 'Top'.&lt;/P&gt;
&lt;P&gt;Now you have&lt;/P&gt;
&lt;DIV class="sasError"&gt;&amp;nbsp;&amp;nbsp; ERROR: ERROR: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near the keyword 'or'.&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;1. Why the difference? What did you change?&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;2. These keywords are not in the query shown.&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;3. Have you enabled tracing?&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2019 03:01:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Connecting-SQL-Table-in-SAS-Viya/m-p/605994#M175910</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-11-21T03:01:06Z</dc:date>
    </item>
  </channel>
</rss>

