<?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 parameter to SQL query in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372697#M135508</link>
    <description>&lt;P&gt;parameter file&lt;/P&gt;
&lt;P&gt;BBCODE parm1&amp;nbsp; &amp;nbsp;parm2&amp;nbsp; parm3&lt;BR /&gt;ATXL IN&amp;nbsp; &amp;nbsp;Dec-17 Dec-16 Sep-17&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SELECT round(NET_SALES) FROM svg_test.sch6_template WHERE YYYYMM In('" + ((String)globalMap.get("test_log.param1"))+"','" + ((String)globalMap.get("test_log.param2"))+"','" + ((String)globalMap.get("test_log.param3"))+"') and bbcode=''" + ((String)globalMap.get("test_log.BBCODE"))+"'') AS Revenue_Rs_m1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am passing multiple parameter in single query using IN operator&lt;/P&gt;
&lt;P&gt;Is this correct?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jun 2018 07:36:02 GMT</pubDate>
    <dc:creator>Darmesh</dc:creator>
    <dc:date>2018-06-08T07:36:02Z</dc:date>
    <item>
      <title>parameter to SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372697#M135508</link>
      <description>&lt;P&gt;parameter file&lt;/P&gt;
&lt;P&gt;BBCODE parm1&amp;nbsp; &amp;nbsp;parm2&amp;nbsp; parm3&lt;BR /&gt;ATXL IN&amp;nbsp; &amp;nbsp;Dec-17 Dec-16 Sep-17&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SELECT round(NET_SALES) FROM svg_test.sch6_template WHERE YYYYMM In('" + ((String)globalMap.get("test_log.param1"))+"','" + ((String)globalMap.get("test_log.param2"))+"','" + ((String)globalMap.get("test_log.param3"))+"') and bbcode=''" + ((String)globalMap.get("test_log.BBCODE"))+"'') AS Revenue_Rs_m1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am passing multiple parameter in single query using IN operator&lt;/P&gt;
&lt;P&gt;Is this correct?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 07:36:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372697#M135508</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-06-08T07:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: parameter to SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372698#M135509</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMabAAG"&gt;@Darmesh&lt;/A&gt;,context parameter file should be link this.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;parameter file&lt;/P&gt; 
&lt;P&gt;BBCODE=&lt;SPAN&gt;ATXL IN&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;parm1 =Dec-17&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;parm2 =Dec-16&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;parm3=Sep-17&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 07:47:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372698#M135509</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2018-06-08T07:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: parameter to SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372699#M135510</link>
      <description>&lt;P&gt;i am generating multiple parameter file from the table to excel file and using that in sql filter condition&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="a.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lya5.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129104i12CDDA250352E763/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lya5.png" alt="0683p000009Lya5.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;this is my sql query. n that i have to pass. tell me what is the right way to implement.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;SELECT&lt;BR /&gt;distinct b.Company,b.Reco,b.Price,&lt;BR /&gt;(SELECT round(NET_SALES) FROM svg_test.qtr_template WHERE YYYYMM = 'Mar-18' and bbcode='AL IN') AS Revenue_Rs_m,&lt;BR /&gt;(SELECT round(NET_SALES) FROM svg_test.qtr_template WHERE YYYYMM = 'Mar-17' and bbcode='AL IN') AS R_Year,&lt;BR /&gt;(SELECT round(NET_SALES) FROM svg_test.qtr_template WHERE YYYYMM = 'Dec-17' and bbcode='AL IN') AS R_Quarter,&lt;BR /&gt;(SELECT CAST(((Revenue_Rs_m-R_Year)/R_Year)*100 as decimal(10,1)) 'Revenue_Rs_m YOY%' FROM svg_test.qtr_template WHERE YYYYMM = 'Mar-18' and bbcode='AL IN') AS 'Revenue_Rs_m YOY%',&lt;BR /&gt;(SELECT CAST(((Revenue_Rs_m-R_Quarter)/R_Quarter)*100 as decimal(10,1)) 'Revenue_Rs_m QOQ%' FROM svg_test.qtr_template WHERE YYYYMM = 'Mar-18' and bbcode='AL IN') AS 'Revenue_Rs_m QOQ%',&lt;BR /&gt;(SELECT CAST(EBITDA_MARGIN as decimal(10,1)) FROM svg_test.qtr_template WHERE YYYYMM = 'Mar-18' and bbcode='AL IN') AS 'EBITDA_MARGIN_Dec-17',&lt;BR /&gt;(SELECT CAST(EBITDA_MARGIN as decimal(10,1)) FROM svg_test.qtr_template WHERE YYYYMM = 'Mar-17' and bbcode='AL IN') AS 'EBITDA_MARGIN_Dec-16',&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM svg_test.qtr_template WHERE YYYYMM = 'Mar-18' and bbcode='AL IN') AS Adjusted_PAT,&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM svg_test.qtr_template WHERE YYYYMM = 'Mar-17' and bbcode='AL IN') AS A_Year,&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM svg_test.qtr_template WHERE YYYYMM = 'Dec-17' and bbcode='AL IN') AS A_Quarter,&lt;BR /&gt;(SELECT CAST(((Adjusted_PAT-A_Year)/A_Year)*100 as decimal(10,1)) 'Adjusted_PAT YOY%' FROM svg_test.qtr_template WHERE YYYYMM = 'Mar-18' and bbcode='AL IN') AS 'Adjusted_PAT YOY%',&lt;BR /&gt;(SELECT CAST(((Adjusted_PAT-A_Quarter)/A_Quarter)*100 as decimal(10,1)) 'Adjusted_PAT QOQ%' FROM svg_test.qtr_template WHERE YYYYMM = 'Mar-18' and bbcode='AL IN') AS 'Adjusted_PAT QOQ%',&lt;BR /&gt;(SELECT round(NET_SALES) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-18' and bbcode='AL IN') AS Revenue_Rs_m1,&lt;BR /&gt;(SELECT round(NET_SALES) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-17' and bbcode='AL IN') AS R_Year1,&lt;BR /&gt;(SELECT CAST(((Revenue_Rs_m1-R_Year1)/R_Year1)*100 as decimal(10,1)) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-18' and bbcode='AL IN') AS 'Revenue_Rs_m YOY1%',&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-18' and bbcode='AL IN') AS Adjusted_PAT_Rs_m1,&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-17' and bbcode='AL IN') AS A_Year1,&lt;BR /&gt;(SELECT CAST(((Adjusted_PAT_Rs_m1-A_Year1)/A_Year1)*100 as decimal(10,1)) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-18' and bbcode='AL IN') AS 'Adjusted_PAT_Rs_m_YOY1%',&lt;BR /&gt;(SELECT round(NET_SALES) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-19' and bbcode='AL IN') AS Revenue_Rs_m2,&lt;BR /&gt;(SELECT round(NET_SALES) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-18' and bbcode='AL IN') AS R_Year2,&lt;BR /&gt;(SELECT CAST(((Revenue_Rs_m2-R_Year2)/R_Year2)*100 as decimal(10,1)) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-19' and bbcode='AL IN') AS 'Revenue_Rs_m YOY2%',&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-19' and bbcode='AL IN') AS Adjusted_PAT_Rs_m2,&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-18' and bbcode='AL IN') AS A_Year2,&lt;BR /&gt;(SELECT CAST(((Adjusted_PAT_Rs_m2-A_Year2)/A_Year2)*100 as decimal(10,1)) 'Adjusted_PAT_Rs_m_YOY%' FROM svg_test.sch6_template WHERE YYYYMM ='Mar-19' and bbcode='AL IN') AS 'Adjusted_PAT_Rs_m_YOY%2',&lt;BR /&gt;(SELECT round(NET_SALES) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-20' and bbcode='AL IN') AS Revenue_Rs_m3,&lt;BR /&gt;(SELECT round(NET_SALES) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-19' and bbcode='AL IN') AS R_Year3,&lt;BR /&gt;(SELECT CAST(((Revenue_Rs_m3-R_Year3)/R_Year3)*100 as decimal(10,1)) FROM svg_test.sch6_template WHERE YYYYMM in('Mar-20','Sep-19','Dec-19') and bbcode='AL IN') AS 'Revenue_Rs_m YOY%3',&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-20' and bbcode='AL IN') AS Adjusted_PAT_Rs_m3,&lt;BR /&gt;(SELECT round(ADJ_NET_PROF) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-19' and bbcode='AL IN') AS A_Year3,&lt;BR /&gt;(SELECT CAST(((Adjusted_PAT_Rs_m3-A_Year3)/A_Year3)*100 as decimal(10,1)) FROM svg_test.sch6_template WHERE YYYYMM ='Mar-20' and bbcode='AL IN') AS 'Adjusted_PAT_Rs_m_YOY%3',&lt;BR /&gt;(SELECT CAST((RT_ADJ_EPS_RS) as decimal(10,1)) FROM svg_test.sch6_template WHERE yyyymm ='Mar-18' and bbcode='AL IN') AS FY_1,&lt;BR /&gt;(SELECT CAST((RT_ADJ_EPS_RS) as decimal(10,1)) FROM svg_test.sch6_template WHERE yyyymm ='Mar-19' and bbcode='AL IN') AS FY_2,&lt;BR /&gt;(SELECT CAST((RT_ADJ_EPS_RS) as decimal(10,1)) FROM svg_test.sch6_template WHERE yyyymm ='Mar-20' and bbcode='AL IN') AS FY_3,&lt;BR /&gt;(SELECT CAST((price/FY_1) as decimal(10,1)) FY18_X FROM svg_test.sch6_template WHERE yyyymm ='Mar-18' and bbcode='AL IN') AS FY18_X,&lt;BR /&gt;(SELECT CAST((price/FY_2) as decimal(10,1)) FY19_X FROM svg_test.sch6_template WHERE yyyymm ='Mar-19' and bbcode='AL IN') AS FY19_X,&lt;BR /&gt;(SELECT CAST((price/FY_3) as decimal(10,1)) FY20_X FROM svg_test.sch6_template WHERE yyyymm ='Mar-20' and bbcode='AL IN') AS FY20_X&lt;BR /&gt;FROM svg_test.price_and_reco b where b.bbcode='AL IN';&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 07:53:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372699#M135510</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-06-08T07:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: parameter to SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372700#M135511</link>
      <description>&lt;P&gt;This is my flow.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="a.PNG" style="width: 559px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LybC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140991i436C8101741052A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LybC.png" alt="0683p000009LybC.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="b.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lya6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130118i3E7807321AF5F390/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lya6.png" alt="0683p000009Lya6.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 08:06:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372700#M135511</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-06-08T08:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: parameter to SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372701#M135512</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMabAAG"&gt;@Darmesh&lt;/A&gt;,yes flow looks ok for me.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 08:26:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372701#M135512</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2018-06-08T08:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: parameter to SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372702#M135513</link>
      <description>&lt;P&gt;ok.can you tell in steps. bcoz when i am using the below query it is not loading anything&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SELECT round(NET_SALES) FROM svg_test.sch6_template WHERE YYYYMM In('" + ((String)globalMap.get("test_log.param1"))+"','" + ((String)globalMap.get("test_log.param2"))+"','" + ((String)globalMap.get("test_log.param3"))+"') and bbcode=''" + ((String)globalMap.get("test_log.BBCODE"))+"'') AS Revenue_Rs_m1;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;kindly suggest me what to do.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 08:40:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372702#M135513</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-06-08T08:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: parameter to SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372703#M135514</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;,&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Still i dont know how to pass multiple parameter in single filter condition. can you help me?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 06:43:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372703#M135514</guid>
      <dc:creator>Darmesh</dc:creator>
      <dc:date>2018-06-11T06:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: parameter to SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372704#M135515</link>
      <description>&lt;P&gt;OK, I see your problem. The tricky thing for us is that we do not have access to your system to try the query. You need to use a very useful trick to help YOU resolve this.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Remove your DB component (or disable it) and use the SQL String you are creating in a tJava or tJavaFlex component. Add it to a System.out.println() call, something like this.....&lt;/P&gt; 
&lt;PRE&gt;System.out.println("Select myColumns from MyTable Where myColumn1 = '" +((String)globalMap.get("myParam"))+"'");&lt;/PRE&gt; 
&lt;P&gt;Then run the job, get your prepared SQL and try it in your SQL query analyzer. This will highlight the errors, or give you a better idea why it isn't working (you may be producing good SQL, but the filtering may be bad). If you still cannot figure it, put the SQL you are generating here and maybe we can have a better idea of what is going wrong.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 09:56:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372704#M135515</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-11T09:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: parameter to SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372705#M135516</link>
      <description>&lt;P&gt;You could always attach a tJava via "On Component Error" and print out the contents of the components QUERY&amp;nbsp;global map variable.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 16:13:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/parameter-to-SQL-query/m-p/2372705#M135516</guid>
      <dc:creator>David_Beaty</dc:creator>
      <dc:date>2018-06-12T16:13:56Z</dc:date>
    </item>
  </channel>
</rss>

