<?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: ORA-00933 in tDBRow when using context variable in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267801#M46571</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Can you try in the below format?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;" 
insert into test.wk_sf_l_srv_cshistory_to_load select
ID, 
CREATEDDATE
from test.CASE_HISTORY_FULL
where createddate &amp;gt;=  TO_DATE('"+context.builtIn_lastRunDate+"', 'YYYY/MM/DD')"

&lt;/PRE&gt;&lt;P&gt;where&amp;nbsp;context.builtIn_lastRunDate is string data type and it is having the input date in YYYY/MM/DD?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the answer has helped you, could you please mark the topic as resolved? Kudos are also welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nikhil Thampi&lt;/P&gt;</description>
    <pubDate>Thu, 18 Oct 2018 11:48:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-18T11:48:39Z</dc:date>
    <item>
      <title>ORA-00933 in tDBRow when using context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267800#M46570</link>
      <description>&lt;P&gt;I've read some questions about this problem but I can't get it right...&lt;/P&gt;
&lt;P&gt;I'm using a tDBRow component to execute this query:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;" 
insert into test.wk_sf_l_srv_cshistory_to_load select
ID, 
CREATEDDATE
from test.CASE_HISTORY_FULL
where createddate &amp;gt;=  " + context.builtIn_lastRunDate&lt;/PRE&gt;
&lt;P&gt;but everytime it gives me error ORA-00933.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried different combinations, adding +"" at the end, or + ";", or working with date format, but that is not the problem.&amp;nbsp;&lt;BR /&gt;What am I missing?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 08:52:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267800#M46570</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-18T08:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-00933 in tDBRow when using context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267801#M46571</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Can you try in the below format?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;" 
insert into test.wk_sf_l_srv_cshistory_to_load select
ID, 
CREATEDDATE
from test.CASE_HISTORY_FULL
where createddate &amp;gt;=  TO_DATE('"+context.builtIn_lastRunDate+"', 'YYYY/MM/DD')"

&lt;/PRE&gt;&lt;P&gt;where&amp;nbsp;context.builtIn_lastRunDate is string data type and it is having the input date in YYYY/MM/DD?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the answer has helped you, could you please mark the topic as resolved? Kudos are also welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nikhil Thampi&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 11:48:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267801#M46571</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-18T11:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-00933 in tDBRow when using context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267802#M46572</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;lastRunDate is a date data type and I can't change it, since it will have to come from an external system.&lt;BR /&gt;What I've&amp;nbsp;also tried is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;" 
insert into test.wk_sf_l_srv_cshistory_to_load select
a.ID, 
a.CREATEDDATE
from test.CASE_HISTORY_FULL a
where a.CREATEDDATE &amp;gt;=  to_date(to_char("+context.builtIn_lastRunDate+", 'yyyy-MM-dd'),'yyyy-MM-dd')
"&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Oct 2018 11:53:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267802#M46572</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-18T11:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-00933 in tDBRow when using context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267803#M46573</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Even though the context variable is a date field, when it gets converted to Oracle insert statement, it will become a string. You can print the entire output (specified in double quotes) using a tjava and try to see the results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;So as a first step, try to pass a string as parameter and see whether insert statement is working in that case. If the result is positive, you can do a String conversion of context variable in date format before passing to your insert statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nikhil Thampi&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 12:13:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267803#M46573</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-18T12:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-00933 in tDBRow when using context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267804#M46574</link>
      <description>&lt;P&gt;Hi, I've tried your method but it gives error "Invalid character constant"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 13:29:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267804#M46574</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-18T13:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-00933 in tDBRow when using context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267805#M46575</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Did you convert the data in context variable to string before submitting to insert statement? Could you please print the details of both context variable and the full insert statement in a tjava and share the screen shots of the components? Ideally the output should be the exact insert statement as the output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nikhil Thampi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 13:47:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267805#M46575</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-18T13:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-00933 in tDBRow when using context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267806#M46576</link>
      <description>&lt;P&gt;Hi, I'm sorry but I didn't understand.&lt;/P&gt;&lt;P&gt;You said that even if it's a date, it is converted to a String in the Oracle statement, so you suggested me this format:&lt;/P&gt;&lt;PRE&gt;TO_DATE('"+context.builtIn_lastRunDate+"', 'YYYY/MM/DD')"&lt;/PRE&gt;&lt;P&gt;This for me didn't work.&amp;nbsp;&lt;BR /&gt;If I use this method with a String it works, but not with my date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you said I had to convert it to a String before submitting it to the insert statement, but wasn't it converted automatically to String in Oracle statement, as you said earlier? Or did I get it wrong?&lt;/P&gt;&lt;P&gt;Also, if I try to print my insert statement in a tJava, it gives me errors of quotes inside System.out, so I'm not able to print.&lt;/P&gt;&lt;P&gt;I only have one component by the way: tDbRow, where I wrote my query&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 10:20:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267806#M46576</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-19T10:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: ORA-00933 in tDBRow when using context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267807#M46577</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Please refer the below picture for the components you need to use to achieve the resolution.&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-center" image-alt="image.png" style="width: 519px;"&gt;&lt;IMG src="https://yutwg22796.i.lithium.com/t5/image/serverpage/image-id/13293iB0F6B2A0B8B2A8EA/image-size/large?v=1.0&amp;amp;px=999" title="image.png" alt="image.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; You will be able to execute the INSERT statement if the input data is coming as String.&amp;nbsp;So we need to convert the input data from date to String format. You need to add the below code snippet to tjava component.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/* context.val is the value in date format
context.date_to_string converts the data to String in dd/MM/yyyy format */

SimpleDateFormat formatDateJava = new SimpleDateFormat("dd/MM/yyyy");
context.date_to_string = formatDateJava.format(context.val);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In tOracleRow, you can&amp;nbsp;use the below format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;" 
insert into test.wk_sf_l_srv_cshistory_to_load select
a.ID, 
a.CREATEDDATE
from test.CASE_HISTORY_FULL a
where a.CREATEDDATE &amp;gt;=  to_date('"+context.date_to_string+ "','DD/MM/YYYY')
"&lt;/PRE&gt;
&lt;P&gt;Could you please try it and let me know the results.&lt;/P&gt;
&lt;P&gt;If the answer has helped you, could you please mark the topic as resolved? Kudos are also welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nikhil Thampi&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 13:04:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/ORA-00933-in-tDBRow-when-using-context-variable/m-p/2267807#M46577</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-19T13:04:05Z</dc:date>
    </item>
  </channel>
</rss>

