<?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 execute a custom SQL in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-execute-a-custom-SQL/m-p/2208655#M7795</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is your problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can use any sql code in tMSSQLInput component&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jan 2019 09:17:41 GMT</pubDate>
    <dc:creator>vapukov</dc:creator>
    <dc:date>2019-01-22T09:17:41Z</dc:date>
    <item>
      <title>How to execute a custom SQL</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-execute-a-custom-SQL/m-p/2208654#M7794</link>
      <description>&lt;P&gt;How can i execute the following MS SQL Query. This query contains multiple tables and "Over - Partition by " functions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;select a.vm_id, d.HOST_ID, a.SHUTDOWN_DAYS,a.DIFF_COLLECTION_DATE_TS from (&lt;/P&gt;
&lt;P&gt;select [VM_ID], datediff(hour,min([REC_COLLECTION_DATE_TS]),max([REC_COLLECTION_DATE_TS]))/24.0 as SHUTDOWN_DAYS,&lt;BR /&gt;max([REC_COLLECTION_DATE_TS])-min([REC_COLLECTION_DATE_TS]) as DIFF_COLLECTION_DATE_TS&lt;BR /&gt;from ( SELECT [VM_FCT_ID]&lt;BR /&gt;,[VM_ID]&lt;BR /&gt;,[REC_COLLECTION_DATE_TS]&lt;BR /&gt;,[PowerState]&lt;BR /&gt;,sum([PowerState]) OVER ( partition by [VM_ID] ORDER BY [REC_COLLECTION_DATE_TS] desc ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) rn&lt;BR /&gt;FROM [T_FCT_VCENTER_VM] where [PowerState] is not null and VM_ID in (SELECT [VM_ID]&lt;BR /&gt;&lt;BR /&gt;FROM [T_DIM_VCENTER_VM] where UPDATED_FLAG =1 and PowerState='PoweredOff')&lt;BR /&gt;) a where rn=0&lt;BR /&gt;group by [VM_ID]&lt;BR /&gt;&lt;BR /&gt;) as a&lt;/P&gt;
&lt;P&gt;inner join T_DIM_VCENTER_VM d on a.VM_ID = d.VM_ID&lt;BR /&gt;order by ShutDown_Days desc&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 09:10:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-execute-a-custom-SQL/m-p/2208654#M7794</guid>
      <dc:creator>amtkmr1990</dc:creator>
      <dc:date>2019-01-22T09:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute a custom SQL</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-execute-a-custom-SQL/m-p/2208655#M7795</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is your problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can use any sql code in tMSSQLInput component&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2019 09:17:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-execute-a-custom-SQL/m-p/2208655#M7795</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2019-01-22T09:17:41Z</dc:date>
    </item>
  </channel>
</rss>

