<?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: run sql script &amp;quot;with&amp;quot; statement in qlikview in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/run-sql-script-quot-with-quot-statement-in-qlikview/m-p/1518985#M599149</link>
    <description>&lt;P&gt;I'm not sure you can get Qlikview to send that to the sql server. Normally you put SQL in front of a statement and it will be send to the odbc/oledb driver etc. But statements are terminated with a semicolon. And those are embedded in your statement too.&lt;/P&gt;&lt;P&gt;But you don't need to use the SQL database to convert timestamps to&amp;nbsp; other timezones. Qlikview has the ConvertToLocalTime function which allows you to convert any timestamp to a timestamp in the time zone of your choice. See &lt;A href="https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/converttolocaltime.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/converttolocaltime.htm&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Dec 2018 06:50:40 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2018-12-11T06:50:40Z</dc:date>
    <item>
      <title>run sql script "with" statement in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/run-sql-script-quot-with-quot-statement-in-qlikview/m-p/1518980#M599148</link>
      <description>&lt;P&gt;i want to run this oracle sql script from qlik script is there any way to do it, i have created connection and i am able to run simple select queries but have no idea how to run the below one,&lt;/P&gt;&lt;PRE&gt;with
  function get_tstz(p_date in date) return timestamp with time zone is
    dst_exception exception;
    pragma exception_init(dst_exception, -1878);
  begin
    return from_tz(cast(p_date as timestamp), 'US/Eastern');
    exception
      when dst_exception then
        return from_tz(cast(p_date as timestamp), '-04:00');
  end get_tstz;
select date_time,
  get_tstz(date_time) as date_time_converted,
  get_tstz(date_time) at time zone 'UTC' as date_time_utc
from table1&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:00:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/run-sql-script-quot-with-quot-statement-in-qlikview/m-p/1518980#M599148</guid>
      <dc:creator>singbittoo</dc:creator>
      <dc:date>2024-11-16T05:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: run sql script "with" statement in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/run-sql-script-quot-with-quot-statement-in-qlikview/m-p/1518985#M599149</link>
      <description>&lt;P&gt;I'm not sure you can get Qlikview to send that to the sql server. Normally you put SQL in front of a statement and it will be send to the odbc/oledb driver etc. But statements are terminated with a semicolon. And those are embedded in your statement too.&lt;/P&gt;&lt;P&gt;But you don't need to use the SQL database to convert timestamps to&amp;nbsp; other timezones. Qlikview has the ConvertToLocalTime function which allows you to convert any timestamp to a timestamp in the time zone of your choice. See &lt;A href="https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/converttolocaltime.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Scripting/DateAndTimeFunctions/converttolocaltime.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 06:50:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/run-sql-script-quot-with-quot-statement-in-qlikview/m-p/1518985#M599149</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2018-12-11T06:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: run sql script "with" statement in qlikview</title>
      <link>https://community.qlik.com/t5/QlikView/run-sql-script-quot-with-quot-statement-in-qlikview/m-p/1519083#M599151</link>
      <description>&lt;P&gt;how to read the data into US/Eastern time zone and convert to UTC after it using the above function, i am in india and the date which i am loading are in US/Eastern time, how will qlik know that the dates are in US/Eastern time&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 09:53:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/run-sql-script-quot-with-quot-statement-in-qlikview/m-p/1519083#M599151</guid>
      <dc:creator>singbittoo</dc:creator>
      <dc:date>2018-12-11T09:53:07Z</dc:date>
    </item>
  </channel>
</rss>

