Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Tarig
Contributor III
Contributor III

How to use temp table in Qlik sense

Hello all

I am a new user to this fantastic tool, in my work we are use SQL server. My question is, why I can't see any data when I use Temp table in SQL queries. Note: (No error message)  

Labels (2)
1 Reply
Tarig
Contributor III
Contributor III
Author

Here is a simple query:

Select
t.Year
,Count(Distinct t.PersonId) Person
Into #Tmp
From
(
Select Distinct
x.PersonId
,MIN(datepart(yyyy, Date)) [Year]
From
X
Inner Join Y on X.x =Y.y
Group By
x.PersonId
) t
Group By
t.Year

Select
Year
,Person
,SUM (Person) OVER (Order By Year Rows Between UNBOUNDED PRECEDING AND CURRENT ROW) As CumulativeTotal
From
#Tmp

Drop Table #Tmp