<?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 Gettin Error while loading the SP data using DirectQuery in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Gettin-Error-while-loading-the-SP-data-using-DirectQuery/m-p/377210#M4455</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I was trying to use the Stored procedure using Direct Query&amp;nbsp; in Power BI on Prem OCT Version&lt;/P&gt;&lt;P&gt;I am getting the below error message while loading the data into Power BI desktop itself&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Incorrect&amp;nbsp; Syntax near the&amp;nbsp; Keyword EXEC. Incorrect Syntax&amp;nbsp; near )".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steps:&lt;/P&gt;&lt;P&gt;Connected&amp;nbsp; source&amp;nbsp; using GetData-&amp;gt; SQL Server-&amp;gt; DirectQuery -&amp;gt;Advance Option-&amp;gt; EXEC SPName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power BI Desktop Version: 2.51.4885.1423 64-bit (October, 2017)&lt;/P&gt;</description>
    <pubDate>Thu, 15 Mar 2018 18:05:50 GMT</pubDate>
    <dc:creator>arun_1047</dc:creator>
    <dc:date>2018-03-15T18:05:50Z</dc:date>
    <item>
      <title>Gettin Error while loading the SP data using DirectQuery</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Gettin-Error-while-loading-the-SP-data-using-DirectQuery/m-p/377210#M4455</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I was trying to use the Stored procedure using Direct Query&amp;nbsp; in Power BI on Prem OCT Version&lt;/P&gt;&lt;P&gt;I am getting the below error message while loading the data into Power BI desktop itself&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Incorrect&amp;nbsp; Syntax near the&amp;nbsp; Keyword EXEC. Incorrect Syntax&amp;nbsp; near )".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steps:&lt;/P&gt;&lt;P&gt;Connected&amp;nbsp; source&amp;nbsp; using GetData-&amp;gt; SQL Server-&amp;gt; DirectQuery -&amp;gt;Advance Option-&amp;gt; EXEC SPName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power BI Desktop Version: 2.51.4885.1423 64-bit (October, 2017)&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 18:05:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Gettin-Error-while-loading-the-SP-data-using-DirectQuery/m-p/377210#M4455</guid>
      <dc:creator>arun_1047</dc:creator>
      <dc:date>2018-03-15T18:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Gettin Error while loading the SP data using DirectQuery</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Gettin-Error-while-loading-the-SP-data-using-DirectQuery/m-p/377601#M4460</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="46594" data-lia-user-login="arun_1047" class="lia-mention lia-mention-user"&gt;arun_1047&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have played a bit with your scenario. Using just 'exec sp_proc' does not work indeed, the statement sent to the SQL Server is not syntactically correct:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select * from (exec sp_test) SourceQuery where 1 = 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use OPENQUERY as mentioned&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://stackoverflow.com/questions/37589448/how-to-use-sql-server-stored-procedures-in-microsoft-powerbi" target="_self"&gt;here&lt;/A&gt;, however you'll need your SQL Server setup for data access.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maria&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Mar 2018 08:35:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Gettin-Error-while-loading-the-SP-data-using-DirectQuery/m-p/377601#M4460</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-16T08:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Gettin Error while loading the SP data using DirectQuery</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Gettin-Error-while-loading-the-SP-data-using-DirectQuery/m-p/470138#M6665</link>
      <description>&lt;P&gt;&lt;A href="http://community.powerbi.com/t5/Desktop/Use-SQL-Store-Procedure-in-Power-BI/td-p/20269" rel="noreferrer" target="_blank"&gt;http://community.powerbi.com/t5/Desktop/Use-SQL-Store-Procedure-in-Power-BI/td-p/20269&lt;/A&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;You must be using DirectQuery mode, in which you cannot connect to data with stored procedures. Try again using Import mode or just use a SELECT statement directly.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 24 Jul 2018 07:08:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Gettin-Error-while-loading-the-SP-data-using-DirectQuery/m-p/470138#M6665</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-24T07:08:34Z</dc:date>
    </item>
  </channel>
</rss>

