<?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: Pass Context Variables with date value in Oracle component to delete in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266243#M45535</link>
    <description>So you're right with the syntax, jus have to adjust the mask. Check the oracle documentation for that.</description>
    <pubDate>Fri, 09 Jun 2017 08:12:46 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2017-06-09T08:12:46Z</dc:date>
    <item>
      <title>Pass Context Variables with date value in Oracle component to delete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266239#M45531</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a job, where I need to delete records from a Oracle Table for that particular date (Dynamic like a batch date), before I insert records into the table (Delete before Insert).&lt;/P&gt;
&lt;P&gt;I have set context variables for that job, with one of the variables as BusinessDate with prompt.&lt;/P&gt;
&lt;P&gt;So whenever I run the job, I provide a BusinessDate (preferabbly current date) at runtime. This Context variable BusinessDate is used in Deleting the records from Oracle Table &amp;amp; then later Insert records into the same table with same BusinessDate value. I am unable to Delete the records, this is the query I provide&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"DELETE FROM "+context.Schema+".TableName WHERE DATE="+context.BusinessDate+"".&lt;/P&gt;
&lt;P&gt;It is throwing a error, ORA-00933: SQL command not properly ended. Pl help&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 06:08:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266239#M45531</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-09T06:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Context Variables with date value in Oracle component to delete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266240#M45532</link>
      <description>Try this syntax:
&lt;BR /&gt;"DELETE FROM "+context.Schema+".TableName WHERE DATE = to_date('"+context.BusinessDate+"', 'YYYY-MM-DD'"
&lt;BR /&gt;Here I suppose DATE just after the WHERE represents the column name else you will have a problem as it is an oracle reserved word. Also, you have to adapt the format mask depending on the way the is entered by user.</description>
      <pubDate>Fri, 09 Jun 2017 06:43:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266240#M45532</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-06-09T06:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Context Variables with date value in Oracle component to delete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266241#M45533</link>
      <description>&lt;P&gt;Yes, DATE is a column name in the OracleTable, actually its BIZ_DATE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 07:11:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266241#M45533</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-09T07:11:35Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Context Variables with date value in Oracle component to delete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266242#M45534</link>
      <description>&lt;P&gt;I tried giving it the way that you had mentioned by converting TO_DATE function, but it doesnt work either.&lt;/P&gt; 
&lt;P&gt;The context variable BusinessDate is set as Date Type &amp;amp; the value I provide is:&amp;nbsp;2017-06-05 00:00:00&lt;/P&gt; 
&lt;P&gt;So this is my query:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"DELETE FROM "+context.Schema+".Table WHERE BUSINESS_DATE=TO_DATE('"+context.BusinessDate+"','YYYY-MM-DD HH24:MI&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9p6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134116iFBD5D7F21624A744/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9p6.png" alt="0683p000009M9p6.png" /&gt;&lt;/span&gt;S')".&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This is the error I get, but this query works in Database&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;ORA-01841: (full) year must be between -4713 and +9999, and not be 0&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 07:20:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266242#M45534</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-09T07:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Context Variables with date value in Oracle component to delete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266243#M45535</link>
      <description>So you're right with the syntax, jus have to adjust the mask. Check the oracle documentation for that.</description>
      <pubDate>Fri, 09 Jun 2017 08:12:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266243#M45535</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-06-09T08:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Context Variables with date value in Oracle component to delete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266244#M45536</link>
      <description>&lt;P&gt;Hi&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I just wanted to update what worked for me &amp;amp; what I identified.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;This statement worked for me.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;"DELETE FROM "+context.Schema+".Table WHERE BUSINESS_DATE=TO_DATE('"+context.BusinessDate+"','DD-MON-YY')&lt;/SPAN&gt;&lt;SPAN&gt;".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Also in Talend tMap, year must be specified as yy or yyyy (case sensitive, not to specify in CAPS). Similarly, date must be specified as dd&amp;nbsp;(case sensitive, not to specify in CAPS).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 05:46:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266244#M45536</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-22T05:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pass Context Variables with date value in Oracle component to delete</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266245#M45537</link>
      <description>&lt;P&gt;Hi, I've tried doing your way but it keeps giving me the error ORA-01841. My context variable is a date&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 09:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Pass-Context-Variables-with-date-value-in-Oracle-component-to/m-p/2266245#M45537</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-18T09:06:28Z</dc:date>
    </item>
  </channel>
</rss>

