<?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: Change Code? in Installing and Upgrading</title>
    <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395263#M8031</link>
    <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;is it possible in the code i wrote in the tPerlRow to know if i am in the last row of the tdbinput?&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Yes it is &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; There is a global variable associated to the tDBInput : NB_LINE. In your tPerlRow "Code" property, press Ctrl+Space and choose the variable in the auto-completion list.
&lt;BR /&gt;PS: by the way, can you create a new topic for each question you have, it will be easier for other users to find questions &amp;amp; answers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; thank you</description>
    <pubDate>Fri, 13 Oct 2006 11:17:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-10-13T11:17:52Z</dc:date>
    <item>
      <title>Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395260#M8028</link>
      <description>Hi, 
&lt;BR /&gt;I created a tdbinput
&lt;BR /&gt;then a tPerlRow
&lt;BR /&gt;then a tdbOutput
&lt;BR /&gt;the 3 objects are linked via main link input-&amp;gt;perlrow-&amp;gt;output
&lt;BR /&gt;in the tperlrow i calculate the values for the output
&lt;BR /&gt;il all works fine
&lt;BR /&gt;But somethimes i would like to say to tdboutput not to write anything
&lt;BR /&gt;to perform this i wrote the tperlrow so that it gives to the tdboutput the () value ( @tPerlRow_1=() )
&lt;BR /&gt;i would like to let dbinput not to insert anything if the row in input is ()...
&lt;BR /&gt;is it possible for me to modify the automatic code generated adding a if (@tDBOutput_1) before the push?
&lt;BR /&gt;Or there is some other way?
&lt;BR /&gt;thank u</description>
      <pubDate>Sat, 16 Nov 2024 14:38:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395260#M8028</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2024-11-16T14:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395261#M8029</link>
      <description>Hi Gb!&lt;BR /&gt;In fact you've a component to do just this: the tMap.&lt;BR /&gt;Connect  your tdbInput to a tMap and the tMap to your tdbOutput.&lt;BR /&gt;Then double-click on the tMap and drag'n drop columns from left-table to the right-table.&lt;BR /&gt;Then add a constraint on your right table (your ouput) clicking on the little-green-plus-with-question-mark icon (sic) on the top of the table.&lt;BR /&gt;In this field, add your code constraint (eg: $row1 eq '' or wathever else).&lt;BR /&gt;If you want to get rejected lines, just follow this :&lt;BR /&gt;Add a second output clicking on the main-green-plus-icon on the top of the right column.&lt;BR /&gt;Add some columns on this new output and click on the reject-checkbox on the top of this table.&lt;BR /&gt;Close the mapper using "Ok" and connect the new tMap output (NewOutput1 in my example) on (for example) a tFileOutputXML.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Fabrice&lt;BR /&gt;ps: if you really need to do specific calculation you can add a tPerlRow beetween the tDBInput and the tMap</description>
      <pubDate>Fri, 13 Oct 2006 09:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395261#M8029</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-13T09:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395262#M8030</link>
      <description>Great i'll try it...&lt;BR /&gt;onother question...&lt;BR /&gt;in my schema (not yet using the map)&lt;BR /&gt;is it possible in the code i wrote in the tPerlRow to know if i am in the last row of the tdbinput?</description>
      <pubDate>Fri, 13 Oct 2006 10:05:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395262#M8030</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2006-10-13T10:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395263#M8031</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;is it possible in the code i wrote in the tPerlRow to know if i am in the last row of the tdbinput?&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Yes it is &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; There is a global variable associated to the tDBInput : NB_LINE. In your tPerlRow "Code" property, press Ctrl+Space and choose the variable in the auto-completion list.
&lt;BR /&gt;PS: by the way, can you create a new topic for each question you have, it will be easier for other users to find questions &amp;amp; answers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; thank you</description>
      <pubDate>Fri, 13 Oct 2006 11:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395263#M8031</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-13T11:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395264#M8032</link>
      <description>I am sorry but the ($_globals{tPerlRow_1}{NB_LINE} gives empty value.</description>
      <pubDate>Fri, 13 Oct 2006 13:43:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395264#M8032</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2006-10-13T13:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395265#M8033</link>
      <description>take $_globals{tDBInput_1}{NB_LINE} instead &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 13 Oct 2006 14:57:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395265#M8033</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-13T14:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395266#M8034</link>
      <description>It returns -1</description>
      <pubDate>Fri, 13 Oct 2006 15:18:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395266#M8034</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2006-10-13T15:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395267#M8035</link>
      <description>You're right, it was working with MySQL and I had assumed it was working this way for any database. Reading more carefully 
&lt;A href="http://search.cpan.org/~timb/DBI-1.52/DBI.pm" target="_blank" rel="nofollow noopener noreferrer"&gt;DBI module documentation&lt;/A&gt;, I see: 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;For SELECT statements, execute simply "starts" the query within the database engine. Use one of the fetch methods to retrieve the data after calling execute. The execute method does not return the number of rows that will be returned by the query (because most databases can't tell in advance), it simply returns a true value.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;My conclusion: it works with MySQL, it doesn't work with Oracle (it returns "0E0") and I don't know yet for other DBMS. 
&lt;BR /&gt;So, we have a problem. The only reliable way to solve this problem is to increment the line counter at each iteration. The problem with this solution is that the total number of lines is available only at the end of the loop, and you can't use it in the tPerlRow linked to the tDBInput. 
&lt;BR /&gt;Anyway, I've created the 
&lt;A href="http://talendforge.org/bugs/view.php?id=196" target="_blank" rel="nofollow noopener noreferrer"&gt;bug 196&lt;/A&gt; in the bugtracker concerning this issue.</description>
      <pubDate>Fri, 13 Oct 2006 16:10:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395267#M8035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-13T16:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395268#M8036</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;It returns -1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;Which DBMS?</description>
      <pubDate>Fri, 13 Oct 2006 16:11:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395268#M8036</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-13T16:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395269#M8037</link>
      <description>SQLSERVER.
&lt;BR /&gt;Now, how to know when i am at the end?
&lt;BR /&gt;It would be ok for me now because i need to perform an operation only at the end and so i don't realy need total number of lines.
&lt;BR /&gt;Is there something like .EOF?</description>
      <pubDate>Fri, 13 Oct 2006 16:52:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395269#M8037</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2006-10-13T16:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395270#M8038</link>
      <description>You can't know in the tPerlRow if it's the last iteration. But you can do it another way: instead of trying to know if it's the last iteration to perform a specific action, use a tPerl with a "trigger, run after" link, as illustrated by the screenshot.</description>
      <pubDate>Fri, 13 Oct 2006 17:50:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395270#M8038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-10-13T17:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395271#M8039</link>
      <description>Hi, 
&lt;BR /&gt;I would like to be able to run the following oracle commands within Talend. Is there a way? 
&lt;BR /&gt;drop table contr_catalog_newcols; 
&lt;BR /&gt;create table contr_catalog_newcols as select * from contr_catalog 
&lt;BR /&gt;where M_PRICE &amp;lt;&amp;gt; '-10.00%'; 
&lt;BR /&gt;--add columns 
&lt;BR /&gt;alter table contr_catalog_newcols add 
&lt;BR /&gt;(mb_client_product_id varchar(100), mb_online_customer_price char(14)); 
&lt;BR /&gt;commit; 
&lt;BR /&gt;--for product 
&lt;BR /&gt;--find m_clientproductid 
&lt;BR /&gt;update contr_catalog_newcols set mb_client_product_id=trim(substr(m_product_id, 1, instr(m_product_id, ':',1,1)-1)); 
&lt;BR /&gt;commit; 
&lt;BR /&gt;update contr_catalog_newcols set mb_client_product_id=trim(m_product_id) where mb_client_product_id is null; 
&lt;BR /&gt;commit; 
&lt;BR /&gt;and then I can do my regular mapping 
&lt;BR /&gt;thanks, 
&lt;BR /&gt;bob</description>
      <pubDate>Thu, 24 Apr 2008 08:53:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395271#M8039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-24T08:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Change Code?</title>
      <link>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395272#M8040</link>
      <description>I was able to solve my own problem by trial and error. I eventually tried enough combinations and came up with an oracle error of ora-01003 which let me to use a tJava with several tOrarows and that did the trick for me</description>
      <pubDate>Thu, 24 Apr 2008 17:52:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Installing-and-Upgrading/Change-Code/m-p/2395272#M8040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-24T17:52:08Z</dc:date>
    </item>
  </channel>
</rss>

