<?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 tSQLTemplateMerge in Oracle (can't use constant in insert clause) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321642#M91656</link>
    <description>Hi All 
&lt;BR /&gt;Talend 5.2 , Oracle 11g 
&lt;BR /&gt;I did simple example with tSQLTemplateMerge in Oracle 
&lt;BR /&gt;Added in SQLTemplate : 
&lt;BR /&gt;OracleMerge (instead of 2 templates that were there) 
&lt;BR /&gt;Simple merge works ok. 
&lt;BR /&gt; 
&lt;BR /&gt;but say if I want in insert clause for field src_sys_id use not some source field , but constant 
&lt;BR /&gt;I can't do that thru user interface ! (I can choose only field names from combobox but not place there fixed value) 
&lt;BR /&gt;How Can I do this ? 
&lt;BR /&gt;I try to use additional ouptut clause - but have 
&lt;BR /&gt;java.sql.BatchUpdateException: error occurred during batching: ORA-00917: missing comma 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEgN.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140770iB43FB6C2E36FBAA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEgN.jpg" alt="0683p000009MEgN.jpg" /&gt;&lt;/span&gt;</description>
    <pubDate>Thu, 11 Jul 2013 14:18:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-07-11T14:18:54Z</dc:date>
    <item>
      <title>tSQLTemplateMerge in Oracle (can't use constant in insert clause)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321642#M91656</link>
      <description>Hi All 
&lt;BR /&gt;Talend 5.2 , Oracle 11g 
&lt;BR /&gt;I did simple example with tSQLTemplateMerge in Oracle 
&lt;BR /&gt;Added in SQLTemplate : 
&lt;BR /&gt;OracleMerge (instead of 2 templates that were there) 
&lt;BR /&gt;Simple merge works ok. 
&lt;BR /&gt; 
&lt;BR /&gt;but say if I want in insert clause for field src_sys_id use not some source field , but constant 
&lt;BR /&gt;I can't do that thru user interface ! (I can choose only field names from combobox but not place there fixed value) 
&lt;BR /&gt;How Can I do this ? 
&lt;BR /&gt;I try to use additional ouptut clause - but have 
&lt;BR /&gt;java.sql.BatchUpdateException: error occurred during batching: ORA-00917: missing comma 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEgN.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140770iB43FB6C2E36FBAA3/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEgN.jpg" alt="0683p000009MEgN.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 11 Jul 2013 14:18:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321642#M91656</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-11T14:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: tSQLTemplateMerge in Oracle (can't use constant in insert clause)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321643#M91657</link>
      <description>Hi
&lt;BR /&gt;Try to add double quote, "1", I just do a quick test on Mysql database and it works!
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 12 Jul 2013 03:59:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321643#M91657</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-12T03:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: tSQLTemplateMerge in Oracle (can't use constant in insert clause)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321644#M91658</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hi&lt;BR /&gt;Try to add double quote, "1", I just do a quick test on Mysql database and it works!&lt;BR /&gt;Shong&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Tried - not work - same error 
&lt;BR /&gt;java.sql.BatchUpdateException: error occurred during batching: ORA-00917: missing comma 
&lt;BR /&gt;I wonder how to resolve such prolems in General ? 
&lt;BR /&gt;looking into java code ? 
&lt;BR /&gt; 
&lt;PRE&gt;int ADDITIONAL_INSERT_COLUMNS_LENGTH_tSQLTemplateMerge_1 = 1;&lt;BR /&gt;				String[] ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_VALUE_tSQLTemplateMerge_1 = new String;&lt;BR /&gt;				String[] ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_NAME_tSQLTemplateMerge_1 = new String;&lt;BR /&gt;				ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_VALUE_tSQLTemplateMerge_1 = "1";&lt;BR /&gt;				ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_NAME_tSQLTemplateMerge_1 = "SRC_SYS_ID";&lt;BR /&gt;				int INSERT_MAPPING_LENGTH_tSQLTemplateMerge_1 = 5;&lt;BR /&gt;....&lt;BR /&gt;if (hasAdditionalInsertColumns) {&lt;BR /&gt;						for (int i = 0; i &amp;lt; ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_NAME_tSQLTemplateMerge_1.length; i++) {&lt;BR /&gt;							if (flag) {&lt;BR /&gt;								insertColumnsStr += ",";&lt;BR /&gt;								insertValuesStr += ",";&lt;BR /&gt;							} else {&lt;BR /&gt;								flag = true;&lt;BR /&gt;							}&lt;BR /&gt;							insertColumnsStr += ("A2_PROD" + "." + ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_NAME_tSQLTemplateMerge_1&lt;I&gt;);&lt;BR /&gt;							insertValuesStr += ("A0_PROD" + "." + ADDITIONAL_INSERT_COLUMNS_TRG_COLUMN_VALUE_tSQLTemplateMerge_1&lt;I&gt;);&lt;BR /&gt;						}&lt;BR /&gt;					}&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Jul 2013 08:55:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321644#M91658</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-12T08:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: tSQLTemplateMerge in Oracle (can't use constant in insert clause)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321645#M91659</link>
      <description>Hi Fedor 
&lt;BR /&gt;I did a test on version 5.3.1 and it works, please see my screenshots, it might be a bug on v5.2 which you are using, have a try to download the latest version 5.3.1 and test it again. 
&lt;BR /&gt;Shong 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEmZ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134748i3A0C9A365A90B280/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEmZ.png" alt="0683p000009MEmZ.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEPA.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135840iA09F492E72908BAD/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEPA.png" alt="0683p000009MEPA.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEbJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154098i65B1B76E88A3707C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEbJ.png" alt="0683p000009MEbJ.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 12 Jul 2013 09:35:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321645#M91659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-12T09:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: tSQLTemplateMerge in Oracle (can't use constant in insert clause)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321646#M91660</link>
      <description>Now TI think there is no senese to use SQLTemlate components&lt;BR /&gt;I do it using tOracleRow&lt;BR /&gt;just insert there SQL :&lt;BR /&gt;Merge into&lt;BR /&gt;    a2_prod    Targ&lt;BR /&gt;using&lt;BR /&gt;(&lt;BR /&gt;    Select * from a0_prod a &lt;BR /&gt;    where a.stg_product_id &amp;lt; 100&lt;BR /&gt; ) S1&lt;BR /&gt;  on ( Targ.stg_product_id = S1.stg_product_id   ) &lt;BR /&gt;when not matched &lt;BR /&gt;      then insert ( stg_product_id, product_code, product_name, vendor_code, product_desc , src_sys_id, load_id )&lt;BR /&gt;   values   ( s1.stg_product_id, s1.product_code, s1.product_name, s1.vendor_code, s1.product_desc , -1 , -1 )    &lt;BR /&gt;&lt;BR /&gt;it took 10 min &lt;BR /&gt;and with SQL*Templates it still not works</description>
      <pubDate>Fri, 12 Jul 2013 09:58:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321646#M91660</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-12T09:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: tSQLTemplateMerge in Oracle (can't use constant in insert clause)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321647#M91661</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hi Fedor&lt;BR /&gt;I did a test on version 5.3.1 and it works, please see my screenshots, it might be a bug on v5.2 which you are using, have a try to download the latest version 5.3.1 and test it again.&lt;BR /&gt;Shong&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;I think Additional fields - it is fields which are Not exist in Source DB 
&lt;BR /&gt;and in my case I needed to use Constant (-1) for Src_sys_id which were present in Both tables 
&lt;BR /&gt;Problem was that I could' not input manually field in Insert columns 
&lt;BR /&gt;ps Anyway - Thanks for answer 
&lt;BR /&gt;Now I think - using direct SQLs is best way</description>
      <pubDate>Fri, 12 Jul 2013 10:02:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321647#M91661</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-12T10:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: tSQLTemplateMerge in Oracle (can't use constant in insert clause)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321648#M91662</link>
      <description>Hi
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;I think Additional fields - it is fields which are Not exist in Source DB&lt;BR /&gt;and in my case I needed to use Constant (-1) for Src_sys_id which were present in Both tables&lt;BR /&gt;Problem was that I could' not input manually field in Insert columns&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;The fields here should exist in the target table, you don't need to add these fields in the schema, which you want to defined in 'Additional Insert column' table, just input manually the fields in Insert columns, if you can't input the fields, it should be a bug on the version you are using. Anyway, you have find an alternative way right now and you are satisfied with it.
&lt;BR /&gt;
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 15 Jul 2013 02:54:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSQLTemplateMerge-in-Oracle-can-t-use-constant-in-insert-clause/m-p/2321648#M91662</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-15T02:54:56Z</dc:date>
    </item>
  </channel>
</rss>

