<?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 tDBInput, where condition context variable date issue in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tDBInput-where-condition-context-variable-date-issue/m-p/2272647#M49876</link>
    <description>&lt;P&gt;Hi everyone&lt;/P&gt; 
&lt;P&gt;I tried to add a context variable "Start" which is a date type.&lt;BR /&gt;If I start my talend job I'm able to choose a date but after that there are always errors.&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="06-08-_2019_11-49-07.png" style="width: 543px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7RT.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157152iE8C44FE0FC290751/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7RT.png" alt="0683p000009M7RT.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;Can't figure out how solve this issue&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;This is my example query:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;select invno 
from invoicedata

where convert(date, invoicedata.invno,104)=convert(date,(TalendDate.formatDate("yyyy-MM-dd HH:mm:ss",context.Start) ),104)&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for any advice.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Aug 2019 12:09:03 GMT</pubDate>
    <dc:creator>pawe84</dc:creator>
    <dc:date>2019-08-06T12:09:03Z</dc:date>
    <item>
      <title>tDBInput, where condition context variable date issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tDBInput-where-condition-context-variable-date-issue/m-p/2272647#M49876</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt; 
&lt;P&gt;I tried to add a context variable "Start" which is a date type.&lt;BR /&gt;If I start my talend job I'm able to choose a date but after that there are always errors.&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="06-08-_2019_11-49-07.png" style="width: 543px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7RT.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157152iE8C44FE0FC290751/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7RT.png" alt="0683p000009M7RT.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;Can't figure out how solve this issue&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;This is my example query:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;select invno 
from invoicedata

where convert(date, invoicedata.invno,104)=convert(date,(TalendDate.formatDate("yyyy-MM-dd HH:mm:ss",context.Start) ),104)&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for any advice.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2019 12:09:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tDBInput-where-condition-context-variable-date-issue/m-p/2272647#M49876</guid>
      <dc:creator>pawe84</dc:creator>
      <dc:date>2019-08-06T12:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: tDBInput, where condition context variable date issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tDBInput-where-condition-context-variable-date-issue/m-p/2272648#M49877</link>
      <description>&lt;P&gt;Is the code you have shown what is in your DB component? You need to keep in mind that the SQL you put in your component is actually a Java String. So you need to build it like a Java String. For example, if you want to add a context variable to a WHERE Clause, you need to do something like below....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;"SELECT
MyColumn1,
MyColumn2,
MyColumn3,
MyColumn4
FROM MyTable
WHERE MyColumn1 = '"+context.MyParam+"'"&lt;/PRE&gt; 
&lt;P&gt;The assumption above being that the data type of MyColumn1 and context.MyParam is String.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2019 15:11:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tDBInput-where-condition-context-variable-date-issue/m-p/2272648#M49877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-06T15:11:09Z</dc:date>
    </item>
  </channel>
</rss>

