<?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: Any ideas on how to pass a string to a stored procedure for an IN clause? in Pipelines</title>
    <link>https://community.fabric.microsoft.com/t5/Pipelines/Any-ideas-on-how-to-pass-a-string-to-a-stored-procedure-for-an/m-p/3471865#M795</link>
    <description>&lt;P&gt;That did the trick! Thanks,&amp;nbsp;Anonymous&lt;/LI-USER&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2023 17:47:23 GMT</pubDate>
    <dc:creator>arpost</dc:creator>
    <dc:date>2023-10-11T17:47:23Z</dc:date>
    <item>
      <title>Any ideas on how to pass a string to a stored procedure for an IN clause?</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Any-ideas-on-how-to-pass-a-string-to-a-stored-procedure-for-an/m-p/3471567#M791</link>
      <description>&lt;P&gt;Greetings, all. I have an array/list of values I want to pass to a stored procedure in a data warehouse and use the values in an IN statement. I can't figure out how to make this work, however, and am hoping someone can assist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example of the list:&lt;/P&gt;&lt;PRE&gt;'ABC','DEF','GHI'&lt;/PRE&gt;&lt;P&gt;And here's a sample of what the sproc script could look like where @List is the parameter for the sproc:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT Top 10 *
FROM Table
WHERE Column1 in (@List)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When applied, the executed script would look like so:&lt;/P&gt;&lt;PRE&gt;SELECT Top 10 *&lt;BR /&gt;&lt;BR /&gt;FROM Table&lt;BR /&gt;&lt;BR /&gt;WHERE Column1 in ('ABC','DEF','GHI')&lt;/PRE&gt;&lt;P&gt;Any ideas on how I can convert the string into a useable list on the warehouse side of things?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 15:33:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Any-ideas-on-how-to-pass-a-string-to-a-stored-procedure-for-an/m-p/3471567#M791</guid>
      <dc:creator>arpost</dc:creator>
      <dc:date>2023-10-11T15:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Any ideas on how to pass a string to a stored procedure for an IN clause?</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Any-ideas-on-how-to-pass-a-string-to-a-stored-procedure-for-an/m-p/3471843#M794</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="307993" data-lia-user-login="arpost" class="lia-mention lia-mention-user"&gt;arpost&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thanks for using Fabric Community.&lt;BR /&gt;Yes you can&amp;nbsp;&lt;SPAN&gt;convert the string into a useable list in the Fabric Warehouse. I have created a repro of the scenario and was successful in executing the stored procedure. Below are the steps I followed along with the screenshots:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;1) I have a table named FabricDemo in my warehouse which has a column named "Code" .&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;2) I have created a stored procedure named 'infunc3' as follows:&lt;BR /&gt;&lt;BR /&gt;Here we are passing our input as string and using STRING_SPLIT() function to split the input string.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) After creating the stored procedure, I executed the stored procedure by giving the column values as follows and was successful in getting the records with 'Code' column as 'DNK', 'FIN' and 'ECU'.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps. Please let me know if you have any further queries.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 17:28:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Any-ideas-on-how-to-pass-a-string-to-a-stored-procedure-for-an/m-p/3471843#M794</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-11T17:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Any ideas on how to pass a string to a stored procedure for an IN clause?</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Any-ideas-on-how-to-pass-a-string-to-a-stored-procedure-for-an/m-p/3471865#M795</link>
      <description>&lt;P&gt;That did the trick! Thanks,&amp;nbsp;Anonymous&lt;/a&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 17:47:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Any-ideas-on-how-to-pass-a-string-to-a-stored-procedure-for-an/m-p/3471865#M795</guid>
      <dc:creator>arpost</dc:creator>
      <dc:date>2023-10-11T17:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Any ideas on how to pass a string to a stored procedure for an IN clause?</title>
      <link>https://community.fabric.microsoft.com/t5/Pipelines/Any-ideas-on-how-to-pass-a-string-to-a-stored-procedure-for-an/m-p/3471867#M796</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="307993" data-lia-user-login="arpost" class="lia-mention lia-mention-user"&gt;arpost&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Glad that your issue got resolved. Please continue using Fabric Community for any help regarding your queries.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 17:48:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Pipelines/Any-ideas-on-how-to-pass-a-string-to-a-stored-procedure-for-an/m-p/3471867#M796</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-11T17:48:50Z</dc:date>
    </item>
  </channel>
</rss>

