<?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: Adapt a query to a tDBInput in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Adapt-a-query-to-a-tDBInput/m-p/2340982#M108968</link>
    <description>&lt;P&gt;Hello @Shicong Hong​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added more information in the post. Regarding the last line I'm talking about, it's the one in the SQL query : and to_date('26/04/22', 'DD/MM/RR') between fp.FP_DATADH and nvl(fp.FP_DATRAD, sysdate+1);).&lt;/P&gt;&lt;P&gt;I have to keep it to have only one line in return of my query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is just to clarify, but the main problem is that I don't know how to format this in tDBInput with the tMap input data.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Jan 2023 08:02:47 GMT</pubDate>
    <dc:creator>stephbzr</dc:creator>
    <dc:date>2023-01-04T08:02:47Z</dc:date>
    <item>
      <title>Adapt a query to a tDBInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adapt-a-query-to-a-tDBInput/m-p/2340980#M108966</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to perform a database search from my tMap data (Lookup connector), but due to the syntax of my query, I don't know how to write it in my tDBInput. Here it is (in bold are the tMap data) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select distinct(ay.id_fam)&lt;/P&gt;&lt;P&gt;from AY ay, FPROD fp, PROD P, ORG O, DCSE D&lt;/P&gt;&lt;P&gt;where fp.ID_FAM = AY.ID_FAM&lt;/P&gt;&lt;P&gt;and fp.ID_ORG = P.ID_ORG&lt;/P&gt;&lt;P&gt;and fp.ID_PROD = P.ID_PROD&lt;/P&gt;&lt;P&gt;and fp.ID_ORG = O.ID_ORG&lt;/P&gt;&lt;P&gt;and AY.AY_SS = '&lt;B&gt;2721099132075&lt;/B&gt;'&lt;/P&gt;&lt;P&gt;and fp.ID_ORG = &lt;B&gt;1&lt;/B&gt;&lt;/P&gt;&lt;P&gt;and ay.AY_RNG = &lt;B&gt;1&lt;/B&gt;&lt;/P&gt;&lt;P&gt;and ay.AY_DATNAIS = '&lt;B&gt;26/10/72&lt;/B&gt;'&lt;/P&gt;&lt;P&gt;and fp.ID_PROD = '&lt;B&gt;SANTE&lt;/B&gt;'&lt;/P&gt;&lt;P&gt;and D.DCSE_NOM = 'NOEMIE'&lt;/P&gt;&lt;P&gt;and to_date('&lt;B&gt;26/04/22&lt;/B&gt;', 'DD/MM/RR') between&amp;nbsp;fp.FP_DATADH and nvl(fp.FP_DATRAD, sysdate+1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So there are 6 columns that need to come from tMap. It's especially the last row that I have a problem with, knowing that I have to keep it because my exercise is to check if the query returns a result with or without the last row. So I can't delete it. Also knowing that my dataset contains several thousands of rows, which can affect the performance depending on the solution you can propose me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000bFVhJAAW.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/131902i5B1AEFBA76AB2D98/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000bFVhJAAW.png" alt="0695b00000bFVhJAAW.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the 6 columns concerned by the query (knowing that there are more than 100 columns in total because these data are integrated in a large table). This will help you to better understand my query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:13:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adapt-a-query-to-a-tDBInput/m-p/2340980#M108966</guid>
      <dc:creator>stephbzr</dc:creator>
      <dc:date>2024-11-15T22:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Adapt a query to a tDBInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adapt-a-query-to-a-tDBInput/m-p/2340981#M108967</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;&lt;P&gt;How many rows of the lookup data? the last row you mentioned is the last row of lookup data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 01:59:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adapt-a-query-to-a-tDBInput/m-p/2340981#M108967</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-04T01:59:45Z</dc:date>
    </item>
    <item>
      <title>Re: Adapt a query to a tDBInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adapt-a-query-to-a-tDBInput/m-p/2340982#M108968</link>
      <description>&lt;P&gt;Hello @Shicong Hong​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added more information in the post. Regarding the last line I'm talking about, it's the one in the SQL query : and to_date('26/04/22', 'DD/MM/RR') between fp.FP_DATADH and nvl(fp.FP_DATRAD, sysdate+1);).&lt;/P&gt;&lt;P&gt;I have to keep it to have only one line in return of my query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is just to clarify, but the main problem is that I don't know how to format this in tDBInput with the tMap input data.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2023 08:02:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adapt-a-query-to-a-tDBInput/m-p/2340982#M108968</guid>
      <dc:creator>stephbzr</dc:creator>
      <dc:date>2023-01-04T08:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adapt a query to a tDBInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adapt-a-query-to-a-tDBInput/m-p/2340983#M108969</link>
      <description>&lt;P&gt;You need to iterate each row and run the query for each row, the job looks like:&lt;/P&gt;&lt;P&gt;...tMap--out1-&amp;gt;tFlowToIterate-iterate--&amp;gt;tDBInput--main--&amp;gt;tLogRow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on tDBInput, write the query as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"select distinct(ay.id_fam)&lt;/P&gt;&lt;P&gt;from AY ay, FPROD fp, PROD P, ORG O, DCSE D&lt;/P&gt;&lt;P&gt;where fp.ID_FAM = AY.ID_FAM&lt;/P&gt;&lt;P&gt;and fp.ID_ORG = P.ID_ORG&lt;/P&gt;&lt;P&gt;and fp.ID_PROD = P.ID_PROD&lt;/P&gt;&lt;P&gt;and fp.ID_ORG = O.ID_ORG&lt;/P&gt;&lt;P&gt;and AY.AY_SS = '"+out1.column1+"'&lt;/P&gt;&lt;P&gt;and fp.ID_ORG ="+ out1.column2+"&lt;/P&gt;&lt;P&gt;and ay.AY_RNG ="+ out1.column3+"&lt;/P&gt;&lt;P&gt;and ay.AY_DATNAIS = '"+out1.column4+"'&lt;/P&gt;&lt;P&gt;and fp.ID_PROD = '"+out1.column5+"'&lt;/P&gt;&lt;P&gt;and D.DCSE_NOM = 'NOEMIE'&lt;/P&gt;&lt;P&gt;and to_date('"+out1.column6', 'DD/MM/RR') between fp.FP_DATADH and nvl(fp.FP_DATRAD, sysdate+1)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you try and let me know if it works!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 04:16:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adapt-a-query-to-a-tDBInput/m-p/2340983#M108969</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-05T04:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Adapt a query to a tDBInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adapt-a-query-to-a-tDBInput/m-p/2340984#M108970</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;@Shicong Hong​&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm going to try this idea quietly this weekend and I'll let you know. In my opinion, it might take a long time, but if there is only this solution... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 09:10:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adapt-a-query-to-a-tDBInput/m-p/2340984#M108970</guid>
      <dc:creator>stephbzr</dc:creator>
      <dc:date>2023-01-05T09:10:46Z</dc:date>
    </item>
  </channel>
</rss>

