<?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 Convert qlikview script to SQL query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Convert-qlikview-script-to-SQL-query/m-p/1577987#M741262</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Could you please help me to convert the below scripting to sql query? This is written in qlikview.&lt;/P&gt;&lt;P&gt;[QVD_NAME_TEMP]:&lt;BR /&gt;LOAD&lt;BR /&gt;[CID],&lt;BR /&gt;[QID],&lt;BR /&gt;[AOID],&lt;BR /&gt;FROM&lt;BR /&gt;tableQ;&lt;/P&gt;&lt;P&gt;inner join([QVD_NAME_TEMP])&lt;BR /&gt;Load Distinct [CID]&lt;BR /&gt;FROM&lt;BR /&gt;tableC&lt;BR /&gt;Where [Date]&amp;gt;='01/01/2019' AND [Date]&amp;lt;='01/31/2019';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Left Join([QVD_NAME_TEMP])&lt;BR /&gt;LOAD&lt;BR /&gt;[AOID],&lt;BR /&gt;[AT]&lt;BR /&gt;FROM&lt;BR /&gt;AOT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left Join([QVD_NAME_TEMP])&lt;BR /&gt;LOAD [CID],&lt;BR /&gt;If(Sum(If(([QID]=1000) and ([A&lt;SPAN&gt;OID]=1074),1))&amp;gt;0,1) as Flag01,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If(Sum(If(([QID]=1008) and ([AOID]=1075),1))&amp;gt;0,1) as Flag02&lt;BR /&gt;Resident [QVD_NAME_TEMP]&lt;BR /&gt;Group By [CID];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;[QVD_NAME_TEMP_2]:&lt;BR /&gt;Load Distinct [CID],&lt;BR /&gt;[QID],&lt;BR /&gt;[AT],&lt;BR /&gt;Flag01,&lt;BR /&gt;Flag02&lt;BR /&gt;Resident [QVD_NAME_TEMP];&lt;/P&gt;&lt;P&gt;drop table [QVD_NAME_TEMP];&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;[SB]:&lt;BR /&gt;LOAD&amp;nbsp;&lt;BR /&gt;If(Sum(if(((Flag01=1) and (Match([QID],'1033','1034','1040'))) or ((Flag02=1) and (Match([QID],'1033','1034','1041'))),1,0))&amp;gt;1,1,) as [SC],&lt;BR /&gt;[CID]&lt;BR /&gt;Resident [QVD_NAME_TEMP_2]&lt;BR /&gt;group by [CID];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;[QVD]:&lt;BR /&gt;Load [CID],&lt;BR /&gt;if(Sum([SC])&amp;gt;=1,1,0) as [SC]&lt;BR /&gt;Resident [SB]&lt;BR /&gt;group by [CID];&lt;/P&gt;&lt;P&gt;DROP Table [SB];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left Join([QVD])&lt;BR /&gt;Load Distinct&lt;BR /&gt;Count([QID])as [QCNT],&lt;BR /&gt;[CID]&lt;BR /&gt;Resident [QVD_NAME_TEMP_2]&lt;BR /&gt;Group by [CID];&lt;/P&gt;&lt;P&gt;Left Join([QVD])&lt;BR /&gt;Load Distinct&lt;BR /&gt;Count([AT])as [AQ],&lt;BR /&gt;[CID]&lt;BR /&gt;Resident [QVD_NAME_TEMP_2]&lt;BR /&gt;where isnull([AT])=0&lt;BR /&gt;Group by [CID];&lt;/P&gt;&lt;P&gt;Drop Table [QVD_NAME_TEMP_2];&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anusha&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:38:25 GMT</pubDate>
    <dc:creator>anushahegde</dc:creator>
    <dc:date>2024-11-16T03:38:25Z</dc:date>
    <item>
      <title>Convert qlikview script to SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-qlikview-script-to-SQL-query/m-p/1577987#M741262</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Could you please help me to convert the below scripting to sql query? This is written in qlikview.&lt;/P&gt;&lt;P&gt;[QVD_NAME_TEMP]:&lt;BR /&gt;LOAD&lt;BR /&gt;[CID],&lt;BR /&gt;[QID],&lt;BR /&gt;[AOID],&lt;BR /&gt;FROM&lt;BR /&gt;tableQ;&lt;/P&gt;&lt;P&gt;inner join([QVD_NAME_TEMP])&lt;BR /&gt;Load Distinct [CID]&lt;BR /&gt;FROM&lt;BR /&gt;tableC&lt;BR /&gt;Where [Date]&amp;gt;='01/01/2019' AND [Date]&amp;lt;='01/31/2019';&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Left Join([QVD_NAME_TEMP])&lt;BR /&gt;LOAD&lt;BR /&gt;[AOID],&lt;BR /&gt;[AT]&lt;BR /&gt;FROM&lt;BR /&gt;AOT;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left Join([QVD_NAME_TEMP])&lt;BR /&gt;LOAD [CID],&lt;BR /&gt;If(Sum(If(([QID]=1000) and ([A&lt;SPAN&gt;OID]=1074),1))&amp;gt;0,1) as Flag01,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If(Sum(If(([QID]=1008) and ([AOID]=1075),1))&amp;gt;0,1) as Flag02&lt;BR /&gt;Resident [QVD_NAME_TEMP]&lt;BR /&gt;Group By [CID];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;[QVD_NAME_TEMP_2]:&lt;BR /&gt;Load Distinct [CID],&lt;BR /&gt;[QID],&lt;BR /&gt;[AT],&lt;BR /&gt;Flag01,&lt;BR /&gt;Flag02&lt;BR /&gt;Resident [QVD_NAME_TEMP];&lt;/P&gt;&lt;P&gt;drop table [QVD_NAME_TEMP];&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;[SB]:&lt;BR /&gt;LOAD&amp;nbsp;&lt;BR /&gt;If(Sum(if(((Flag01=1) and (Match([QID],'1033','1034','1040'))) or ((Flag02=1) and (Match([QID],'1033','1034','1041'))),1,0))&amp;gt;1,1,) as [SC],&lt;BR /&gt;[CID]&lt;BR /&gt;Resident [QVD_NAME_TEMP_2]&lt;BR /&gt;group by [CID];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;[QVD]:&lt;BR /&gt;Load [CID],&lt;BR /&gt;if(Sum([SC])&amp;gt;=1,1,0) as [SC]&lt;BR /&gt;Resident [SB]&lt;BR /&gt;group by [CID];&lt;/P&gt;&lt;P&gt;DROP Table [SB];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left Join([QVD])&lt;BR /&gt;Load Distinct&lt;BR /&gt;Count([QID])as [QCNT],&lt;BR /&gt;[CID]&lt;BR /&gt;Resident [QVD_NAME_TEMP_2]&lt;BR /&gt;Group by [CID];&lt;/P&gt;&lt;P&gt;Left Join([QVD])&lt;BR /&gt;Load Distinct&lt;BR /&gt;Count([AT])as [AQ],&lt;BR /&gt;[CID]&lt;BR /&gt;Resident [QVD_NAME_TEMP_2]&lt;BR /&gt;where isnull([AT])=0&lt;BR /&gt;Group by [CID];&lt;/P&gt;&lt;P&gt;Drop Table [QVD_NAME_TEMP_2];&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anusha&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:38:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-qlikview-script-to-SQL-query/m-p/1577987#M741262</guid>
      <dc:creator>anushahegde</dc:creator>
      <dc:date>2024-11-16T03:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Convert qlikview script to SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-qlikview-script-to-SQL-query/m-p/1578433#M741263</link>
      <description>&lt;P&gt;Hi, I suggest first you identify the base tables from where the the data is loaded.&lt;/P&gt;&lt;P&gt;Once you identify the base tables, you can query and try to identify the joins.&lt;/P&gt;&lt;P&gt;Then you might get some ideas to write your own query.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;VK&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 12:39:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-qlikview-script-to-SQL-query/m-p/1578433#M741263</guid>
      <dc:creator>vireshkolagimat</dc:creator>
      <dc:date>2019-05-09T12:39:31Z</dc:date>
    </item>
  </channel>
</rss>

