<?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 tOracleRow reject empty result set in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tOracleRow-reject-empty-result-set/m-p/2265503#M45025</link>
    <description>&lt;P&gt;I have a tOracleRow that executes a PreparedStatement based on values from an input. Say the SQL statement is something like "SELECT foo FROM bar WHERE baz = ?", and I substitute the lookup value of baz based on a flow input to the tOracleComponent i.e., in advanced settings I have parameter index 1 assigned to inputRow.someValue. I get the values of foo in the output like I expect, but I want the values of baz that don't exist in table bar. In other words, I want the values of baz for which the query returned no results to be sent to the rejects output of the tOracleRow. Is this possible?&lt;/P&gt;</description>
    <pubDate>Thu, 14 Feb 2019 19:49:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-02-14T19:49:06Z</dc:date>
    <item>
      <title>tOracleRow reject empty result set</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tOracleRow-reject-empty-result-set/m-p/2265503#M45025</link>
      <description>&lt;P&gt;I have a tOracleRow that executes a PreparedStatement based on values from an input. Say the SQL statement is something like "SELECT foo FROM bar WHERE baz = ?", and I substitute the lookup value of baz based on a flow input to the tOracleComponent i.e., in advanced settings I have parameter index 1 assigned to inputRow.someValue. I get the values of foo in the output like I expect, but I want the values of baz that don't exist in table bar. In other words, I want the values of baz for which the query returned no results to be sent to the rejects output of the tOracleRow. Is this possible?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 19:49:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tOracleRow-reject-empty-result-set/m-p/2265503#M45025</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-14T19:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: tOracleRow reject empty result set</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tOracleRow-reject-empty-result-set/m-p/2265504#M45026</link>
      <description>&lt;P&gt;What do you want to achieve, can you say more clearly on it with a screenshot&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 20:41:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tOracleRow-reject-empty-result-set/m-p/2265504#M45026</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-14T20:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: tOracleRow reject empty result set</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tOracleRow-reject-empty-result-set/m-p/2265505#M45027</link>
      <description>&lt;P&gt;I don't think a screenshot would be helpful. I'm currently achieving what I want with a tJavaFlex. Here's the Java&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start code:&lt;/P&gt;
&lt;PRE&gt;Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection(url, context.Login, context.Password);

PreparedStatement l_pstmt = conn.prepareStatement("SELECT * FROM foo WHERE bar = ?");&lt;/PRE&gt;
&lt;P&gt;Main code:&lt;/P&gt;
&lt;PRE&gt;l_pstmt.setLong(1, inputRow.bar);
ResultSet resultSet = l_pstmt.executeQuery();

if(resultSet.next()) {
outputRow.lookupSuccessful = true;
outputRow.PRIMARY_KEY = resultSet.getBigDecimal("PRIMARY_KEY");
outputRow.bar = new BigDecimal(inputRow.bar);
} else {
outputRow.lookupSuccessful = false;
outputRow.bar = inputRow.bar;
}&lt;/PRE&gt;
&lt;P&gt;End code:&lt;/P&gt;
&lt;PRE&gt;l_pstmt.close();
conn.close();&lt;/PRE&gt;
&lt;P&gt;And then I use a downstream tMap to switch on lookupSuccessful. Good records get inserted into a different table. Bad ones get logged. I would like to achieve this with a tOracleRow (customer would prefer less bespoke Java). I was hoping there was a way of sending the lookupSuccessful == false records to the rejects output of this component.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 22:16:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tOracleRow-reject-empty-result-set/m-p/2265505#M45027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-14T22:16:05Z</dc:date>
    </item>
  </channel>
</rss>

