<?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: How to use tELTOracleMap to build SQL statement with correct ORDER BY in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335982#M104479</link>
    <description>Hi Alice 
&lt;BR /&gt;I think you have some misunderstand on ELT components, the SQL is in fact executed on database engine, not Talend program, and it has no output, the ELT component provider a GUI operation for you and it generate the SQL script, this script will be executed on database engine, so the job must be table to table with ELT components. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Wed, 07 Dec 2011 02:44:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-12-07T02:44:19Z</dc:date>
    <item>
      <title>How to use tELTOracleMap to build SQL statement with correct ORDER BY</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335979#M104476</link>
      <description>I am trying to build a job to execute a SQL statement like:&lt;BR /&gt;          INSERT into TABLE (col1, col2, ...) SELECT ... from ... WHERE ... ORDER BY col1&lt;BR /&gt;The component flow I create is basically as:&lt;BR /&gt;          tELTOracleInput ---&amp;gt; tELTOracleMap ----&amp;gt; tELTOracleOutput&lt;BR /&gt;If I add the ORDER BY clause by defining Additional Clauses inside the tELTOracleMap component, the SQL statement generated is incorrect. The statement is:&lt;BR /&gt;          &lt;BR /&gt;          INSERT into TABLE (col1, col2, ...) ( SELECT ... from ... WHERE ... ORDER BY col1 )&lt;BR /&gt; &lt;BR /&gt;          This will trigger  SQL Error: ORA-00907: missing right parenthesis&lt;BR /&gt;The correct SQL statement should be:&lt;BR /&gt;          INSERT into TABLE (col1, col2, ...) ( SELECT ... from ... WHERE ... ) ORDER BY col1 &lt;BR /&gt;The ORDER BY clause needs to be outside the SELECT clause. How do I use ELT components to generate correct SQL?</description>
      <pubDate>Sat, 16 Nov 2024 12:31:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335979#M104476</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to use tELTOracleMap to build SQL statement with correct ORDER BY</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335980#M104477</link>
      <description>Dear user 
&lt;BR /&gt;It was a bug for tELTOraclexxx component now, the select statement is always enclosed by the parenthesis. Please report a bug on our JIRA platform. 
&lt;BR /&gt; 
&lt;A href="http://jira.talendforge.org/secure/Dashboard.jspa" rel="nofollow noopener noreferrer"&gt;http://jira.talendforge.org/secure/Dashboard.jspa&lt;/A&gt; 
&lt;BR /&gt;Right now, you can use tOracleRow to execute this SQL statement: 
&lt;BR /&gt;"INSERT into TABLE (col1, col2, ...) ( SELECT ... from ... WHERE ... ) ORDER BY col1" 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Tue, 06 Dec 2011 02:31:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335980#M104477</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-06T02:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to use tELTOracleMap to build SQL statement with correct ORDER BY</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335981#M104478</link>
      <description>Thank you, Shong. I tried tOracleRow and it works. Although I can execute whatever complex SQL statement with tOracleRow, but it lose the beauty to define data flow visually. Hope this bug can be fixed soon. 
&lt;BR /&gt;I have another question about tELTOracleMap in general. My goal is to join tables, filtering by some conditions, order by some fields, and then pipe the output to a CSV file. I discover that I cannot pipe tELTOracleMap to a tFileOutputDelimited directly. Instead, I need to feed output to an intermediate table first, and create another subjob to extract from intermediate table to a tFileOutputDelimited. Under normal JAVA JDBC environment, I would write code to iterate rows fetched and write them directly into a CSV file. I wonder how can this be accomplished by Talend without the need to create a intermediate table because that is a waste of disk space and perhaps runs slower? 
&lt;BR /&gt;I also tried a separate job to use tMap + tSortRow + tFileOutputDelimited to mimic the same functionality. It works, but is slower than the ELT SQL version. 
&lt;BR /&gt;Thank you for prompt response. 
&lt;BR /&gt;-Alice Chang-</description>
      <pubDate>Wed, 07 Dec 2011 02:34:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335981#M104478</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-07T02:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use tELTOracleMap to build SQL statement with correct ORDER BY</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335982#M104479</link>
      <description>Hi Alice 
&lt;BR /&gt;I think you have some misunderstand on ELT components, the SQL is in fact executed on database engine, not Talend program, and it has no output, the ELT component provider a GUI operation for you and it generate the SQL script, this script will be executed on database engine, so the job must be table to table with ELT components. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 07 Dec 2011 02:44:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335982#M104479</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-07T02:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use tELTOracleMap to build SQL statement with correct ORDER BY</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335983#M104480</link>
      <description>So, if my goal is to join two ORACLE tables, and then write the result sets into a CSV file. What's the best practice to use Talend components to accomplish this task?
&lt;BR /&gt;A simple example of java code with JDBC would be something like:
&lt;BR /&gt; .... // write code to open an output file
&lt;BR /&gt; Statement st = conn.createStatement();
&lt;BR /&gt; ResultSet rs = st. executeQuery(query); // a select query to join two tables, sorted by key id
&lt;BR /&gt; while (rs.next())
&lt;BR /&gt; {
&lt;BR /&gt; int c1 = rs.getInt("col1");
&lt;BR /&gt; String c2 = rs.getString("col2");
&lt;BR /&gt; ....... // get data of more columns
&lt;BR /&gt; // then write this row into output file
&lt;BR /&gt; }</description>
      <pubDate>Wed, 07 Dec 2011 03:41:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335983#M104480</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-07T03:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use tELTOracleMap to build SQL statement with correct ORDER BY</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335984#M104481</link>
      <description>Hi
&lt;BR /&gt;A simple way is to use two tOracleInput components to read these two tables and do a join (inner join or left outer join) on tMap, the job design looks like:
&lt;BR /&gt;tOracleInput_1---main---tMap---main---tFileOutputDelimited
&lt;BR /&gt; |
&lt;BR /&gt; lookup
&lt;BR /&gt; | 
&lt;BR /&gt; tOracleInput_2
&lt;BR /&gt;tOracleInput_1: select some columns from table1
&lt;BR /&gt;tOracleInput_2: select some columns from table2
&lt;BR /&gt;on tMap, do a inner join or left outer join base on table1.columnName=table2.columnName
&lt;BR /&gt;Please read the user component documentation and learn tMap.
&lt;BR /&gt;
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 08 Dec 2011 01:59:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-tELTOracleMap-to-build-SQL-statement-with-correct/m-p/2335984#M104481</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-08T01:59:15Z</dc:date>
    </item>
  </channel>
</rss>

