<?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 Combining Multiple rows returned by a SQL statement into a string in Data Quality</title>
    <link>https://community.qlik.com/t5/Data-Quality/Combining-Multiple-rows-returned-by-a-SQL-statement-into-a/m-p/2198613#M302</link>
    <description>I have a tMySQLInput that returns multiple rows. In each of these rows is information that when combined will create the where clause of a SQL statement. How can I combine the multiple rows returned from the SQL statement into one string. 
&lt;BR /&gt;Thank You 
&lt;BR /&gt;Scott</description>
    <pubDate>Mon, 16 Apr 2012 14:01:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-04-16T14:01:10Z</dc:date>
    <item>
      <title>Combining Multiple rows returned by a SQL statement into a string</title>
      <link>https://community.qlik.com/t5/Data-Quality/Combining-Multiple-rows-returned-by-a-SQL-statement-into-a/m-p/2198613#M302</link>
      <description>I have a tMySQLInput that returns multiple rows. In each of these rows is information that when combined will create the where clause of a SQL statement. How can I combine the multiple rows returned from the SQL statement into one string. 
&lt;BR /&gt;Thank You 
&lt;BR /&gt;Scott</description>
      <pubDate>Mon, 16 Apr 2012 14:01:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Combining-Multiple-rows-returned-by-a-SQL-statement-into-a/m-p/2198613#M302</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-16T14:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Multiple rows returned by a SQL statement into a string</title>
      <link>https://community.qlik.com/t5/Data-Quality/Combining-Multiple-rows-returned-by-a-SQL-statement-into-a/m-p/2198614#M303</link>
      <description>Hi Scott 
&lt;BR /&gt;You can concatenate all rows on a tJavaFlex component, for example: 
&lt;BR /&gt;tMysqlInput--row1--tJavaFlex 
&lt;BR /&gt;in the begin part of tJavaFlex, define a empty string, eg: 
&lt;BR /&gt;String s=""; 
&lt;BR /&gt;in the main part of tJavaFle, concatenate all the rows returned from tMysqlInput, for example: 
&lt;BR /&gt;if(s.equals(""){ 
&lt;BR /&gt;s=row1.name; 
&lt;BR /&gt;}else{ 
&lt;BR /&gt;s=s+";"+row1.name; 
&lt;BR /&gt;} 
&lt;BR /&gt;//name is a column name on tMysqlInput; 
&lt;BR /&gt;in the end part of tJavaFlex, put the string to a global variable so that you can use it on other component later. For example: 
&lt;BR /&gt;globalMap.put("key", name); 
&lt;BR /&gt; 
&lt;BR /&gt;Let me know if you still have problems! 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 18 May 2012 11:08:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Combining-Multiple-rows-returned-by-a-SQL-statement-into-a/m-p/2198614#M303</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-18T11:08:26Z</dc:date>
    </item>
  </channel>
</rss>

