<?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 Ad-Hoc Creation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Ad-Hoc-Creation/m-p/2021017#M84291</link>
    <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have one query which i'm using in stored procedure. i need to migrate that procedure into Ad-hoc code based on priority. please find the code below.&lt;/P&gt;
&lt;P&gt;select &lt;BR /&gt;incidentid,&lt;BR /&gt;[DateTimeCreatedOn],&lt;BR /&gt;[Stat_DateTimeResolved],&lt;BR /&gt;I.priority,&lt;BR /&gt;540 + datediff(minute,[DateTimeCreatedOn],DATEADD(hour, 17, DATEDIFF(d, 0, [DateTimeCreatedOn]))) as date_diff_in_mintues,&lt;BR /&gt;smr.dbo.NetBusinessDaysHol([DateTimeCreatedOn], [Stat_DateTimeResolved], '8:00', '17:00', 0, 0, 0, '')/60,&lt;BR /&gt;CASE &lt;BR /&gt;WHEN I.priority =2 Then&lt;BR /&gt;Case &lt;BR /&gt;when cast([DateTimeCreatedOn] as date) = cast([Stat_DateTimeResolved] as date) &lt;BR /&gt;THEN 1 &lt;BR /&gt;when datepart(hour,[DateTimeCreatedOn]) in(15,16) Then &lt;BR /&gt;Case when smr.dbo.NetBusinessDaysHol([DateTimeCreatedOn], [Stat_DateTimeResolved], '8:00', '17:00', 0, 0, 0, '')/60&lt;BR /&gt;&amp;lt;=( 540 + datediff(minute,[DateTimeCreatedOn],DATEADD(hour, 17, DATEDIFF(d, 0, [DateTimeCreatedOn])) ) )&lt;BR /&gt;THEN 1 &lt;BR /&gt;Else 0 End&lt;BR /&gt;when datepart(hour,[DateTimeCreatedOn]) &amp;gt;=17 Then &lt;BR /&gt;case when smr.dbo.NetBusinessDaysHol([DateTimeCreatedOn], [Stat_DateTimeResolved], '8:00', '17:00', 0, 0, 0, '')/60 &amp;lt;=540 THEN 1 &lt;BR /&gt;ELSE 0 END&lt;BR /&gt;Else 0 End &lt;BR /&gt;END AS Resolve_SLA_Met&lt;BR /&gt;From Cherwell.[dbo].[Incident_Final_Hist] I With (Nolock) where incidentid in ('2412763','2412550','2366140','1974128','1725767','1925192')&lt;/P&gt;
&lt;P&gt;Thanks in Advance&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jan 2023 09:34:13 GMT</pubDate>
    <dc:creator>jaswanthchitra9</dc:creator>
    <dc:date>2023-01-02T09:34:13Z</dc:date>
    <item>
      <title>Ad-Hoc Creation</title>
      <link>https://community.qlik.com/t5/App-Development/Ad-Hoc-Creation/m-p/2021017#M84291</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have one query which i'm using in stored procedure. i need to migrate that procedure into Ad-hoc code based on priority. please find the code below.&lt;/P&gt;
&lt;P&gt;select &lt;BR /&gt;incidentid,&lt;BR /&gt;[DateTimeCreatedOn],&lt;BR /&gt;[Stat_DateTimeResolved],&lt;BR /&gt;I.priority,&lt;BR /&gt;540 + datediff(minute,[DateTimeCreatedOn],DATEADD(hour, 17, DATEDIFF(d, 0, [DateTimeCreatedOn]))) as date_diff_in_mintues,&lt;BR /&gt;smr.dbo.NetBusinessDaysHol([DateTimeCreatedOn], [Stat_DateTimeResolved], '8:00', '17:00', 0, 0, 0, '')/60,&lt;BR /&gt;CASE &lt;BR /&gt;WHEN I.priority =2 Then&lt;BR /&gt;Case &lt;BR /&gt;when cast([DateTimeCreatedOn] as date) = cast([Stat_DateTimeResolved] as date) &lt;BR /&gt;THEN 1 &lt;BR /&gt;when datepart(hour,[DateTimeCreatedOn]) in(15,16) Then &lt;BR /&gt;Case when smr.dbo.NetBusinessDaysHol([DateTimeCreatedOn], [Stat_DateTimeResolved], '8:00', '17:00', 0, 0, 0, '')/60&lt;BR /&gt;&amp;lt;=( 540 + datediff(minute,[DateTimeCreatedOn],DATEADD(hour, 17, DATEDIFF(d, 0, [DateTimeCreatedOn])) ) )&lt;BR /&gt;THEN 1 &lt;BR /&gt;Else 0 End&lt;BR /&gt;when datepart(hour,[DateTimeCreatedOn]) &amp;gt;=17 Then &lt;BR /&gt;case when smr.dbo.NetBusinessDaysHol([DateTimeCreatedOn], [Stat_DateTimeResolved], '8:00', '17:00', 0, 0, 0, '')/60 &amp;lt;=540 THEN 1 &lt;BR /&gt;ELSE 0 END&lt;BR /&gt;Else 0 End &lt;BR /&gt;END AS Resolve_SLA_Met&lt;BR /&gt;From Cherwell.[dbo].[Incident_Final_Hist] I With (Nolock) where incidentid in ('2412763','2412550','2366140','1974128','1725767','1925192')&lt;/P&gt;
&lt;P&gt;Thanks in Advance&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jan 2023 09:34:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ad-Hoc-Creation/m-p/2021017#M84291</guid>
      <dc:creator>jaswanthchitra9</dc:creator>
      <dc:date>2023-01-02T09:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Ad-Hoc Creation</title>
      <link>https://community.qlik.com/t5/App-Development/Ad-Hoc-Creation/m-p/2022048#M84375</link>
      <description>&lt;P&gt;can anyone give a reply for this query.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 06:31:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ad-Hoc-Creation/m-p/2022048#M84375</guid>
      <dc:creator>jaswanthchitra9</dc:creator>
      <dc:date>2023-01-05T06:31:11Z</dc:date>
    </item>
  </channel>
</rss>

