<?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: Merge Oracle : row updated or row inserted ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314961#M85673</link>
    <description>An other way to do such thing could have been to seperate the insert and the update in 2 subjob.
&lt;BR /&gt;First you use a tmap to make an inner join with your table in order to update rows that already exist.
&lt;BR /&gt; tOracleInput
&lt;BR /&gt; |
&lt;BR /&gt;tOracleInput------tmap----------tOracleInput---&amp;gt; no insert just update
&lt;BR /&gt;Second you also use a tmap, make an innerjoin but catch the reject in the output so it will only treat the rows that didn't already exist
&lt;BR /&gt; tOracleInput
&lt;BR /&gt; |
&lt;BR /&gt;tOracleInput------tmap----------tOracleInput(with catching reject) ----&amp;gt; only insert</description>
    <pubDate>Thu, 10 Nov 2011 14:41:55 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-11-10T14:41:55Z</dc:date>
    <item>
      <title>Merge Oracle : row updated or row inserted ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314956#M85668</link>
      <description>Hi, 
&lt;BR /&gt;I'm using TOS 4.2 to feed an Oracle table from another Oracle Table. 
&lt;BR /&gt;My design is quite simple : 
&lt;BR /&gt; tOracleInput --&amp;gt; tMap --&amp;gt; tOracleOutput 
&lt;BR /&gt;What I want is to do a merge, based on the target table primary key : update when the row exists, insert if not. 
&lt;BR /&gt;So, in the "action" field of my tOutputOracle component, I use the "Insert or Update" parameter. 
&lt;BR /&gt;Here, everything works. 
&lt;BR /&gt;Now, what I want is to distinguish updated rows than inserted ones. 
&lt;BR /&gt;(in order to feed my CREATION_DATE and UPDATE_DATE fields in the target table) 
&lt;BR /&gt;Could someone explain me how I could do this ? I tried to use variables in the tMap editor but without success... 
&lt;BR /&gt;Thanks for your help ! 
&lt;BR /&gt;David</description>
      <pubDate>Sat, 16 Nov 2024 12:34:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314956#M85668</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Oracle : row updated or row inserted ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314957#M85669</link>
      <description>Can you put a trigger on the table?</description>
      <pubDate>Wed, 09 Nov 2011 17:12:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314957#M85669</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-09T17:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Oracle : row updated or row inserted ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314958#M85670</link>
      <description>Thank you walkerca, 
&lt;BR /&gt;An Oracle trigger is a solution... and a good one I think. 
&lt;BR /&gt;But currently I'm discovering Talend, and as a training, I'd prefer to do the most thing using Talend only (when it's possible of course). 
&lt;BR /&gt;In fact, I guess I could do something with a lookup on my target table... I'm going to try this today (and let you know if I found something interesting). 
&lt;BR /&gt;David</description>
      <pubDate>Thu, 10 Nov 2011 07:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314958#M85670</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-10T07:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Oracle : row updated or row inserted ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314959#M85671</link>
      <description>The trigger is best if there could be a non-Talend application working with the table so that the fields are always handled correctly. 
&lt;BR /&gt;If you want a Talend-only solution, take 2 passes on the input data. The first pass does a strict update on existing records, mapping TalendDate.getCurrentDate() to the UPDATE_DATE field. 
&lt;BR /&gt;Then, map TalendDate.getCurrentDate() to the CREATE_DATE using an insert action on the oracle output component.</description>
      <pubDate>Thu, 10 Nov 2011 12:27:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314959#M85671</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-10T12:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Oracle : row updated or row inserted ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314960#M85672</link>
      <description>Ok, 
&lt;BR /&gt;I tried this and it works perfectly ! 
&lt;BR /&gt;Thanks ! 
&lt;BR /&gt;David</description>
      <pubDate>Thu, 10 Nov 2011 14:31:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314960#M85672</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-10T14:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Oracle : row updated or row inserted ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314961#M85673</link>
      <description>An other way to do such thing could have been to seperate the insert and the update in 2 subjob.
&lt;BR /&gt;First you use a tmap to make an inner join with your table in order to update rows that already exist.
&lt;BR /&gt; tOracleInput
&lt;BR /&gt; |
&lt;BR /&gt;tOracleInput------tmap----------tOracleInput---&amp;gt; no insert just update
&lt;BR /&gt;Second you also use a tmap, make an innerjoin but catch the reject in the output so it will only treat the rows that didn't already exist
&lt;BR /&gt; tOracleInput
&lt;BR /&gt; |
&lt;BR /&gt;tOracleInput------tmap----------tOracleInput(with catching reject) ----&amp;gt; only insert</description>
      <pubDate>Thu, 10 Nov 2011 14:41:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314961#M85673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-10T14:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Merge Oracle : row updated or row inserted ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314962#M85674</link>
      <description>Hi 
&lt;BR /&gt;I am TOS 4.2 .
&lt;BR /&gt;We are insert , update, delete data from one database table to another database table. But we are facing a problem whenever i m selecting "Use
&lt;BR /&gt;update (when matched). And unable to insert the data in target table.
&lt;BR /&gt;Design:-
&lt;BR /&gt;tmsqlconnection_1...........................tmssqlinput...............................tlogrow_1
&lt;BR /&gt; tmsqltemplatemerg_1
&lt;BR /&gt; .tmssqlinput...............................tlogrow_1
&lt;BR /&gt;
&lt;BR /&gt;Error message:-
&lt;BR /&gt;Exception in component tSQLTemplateMerge_1
&lt;BR /&gt;java.sql.BatchUpdateException: Incorrect syntax near ','.
&lt;BR /&gt; at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:947)
&lt;BR /&gt; at csd.csd_0_1.CSD.tSQLTemplateMerge_1Process(CSD.java:1178)
&lt;BR /&gt; at csd.csd_0_1.CSD.tMSSqlInput_1Process(CSD.java:997)
&lt;BR /&gt; at csd.csd_0_1.CSD.tMSSqlConnection_1Process(CSD.java:383)
&lt;BR /&gt; at csd.csd_0_1.CSD.runJobInTOS(CSD.java:2103)
&lt;BR /&gt; at csd.csd_0_1.CSD.main(CSD.java:1971)</description>
      <pubDate>Sat, 12 Nov 2011 11:59:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Merge-Oracle-row-updated-or-row-inserted/m-p/2314962#M85674</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-11-12T11:59:11Z</dc:date>
    </item>
  </channel>
</rss>

