I am having issues with loading a SQL statement in QlikView desktop. The script runs without issues but there doesn't seem to be any data in the document after the load. Below is a very similar sql statement inside the load script. Any help would be greatly appreciated.
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
DECLARE @StartDate NVARCHAR(25)
DECLARE @EndDate NVARCHAR(25)
SET @StartDate ='01-01-2017'
SET @EndDate = '02-01-2017'
DECLARE @vStartDate as date
DECLARE @vEndDate as date
SET @vStartDate = @StartDate
SET @vEndDate = @EndDate
FROM hsp_transactions ht
INNER JOIN HSP_ACCOUNT ha on ht.HSP_ACCOUNT_ID=ha.HSP_ACCOUNT_ID
WHERE ht.tx_type_ha_c = 1 AND ht.tx_post_date >= @vStartDate and ht.tx_post_date < @vEndDate
and ht.primary_plan_id = 1
har1.HSP_ACCOUNT_ID as HAR
,loc.loc_name as Location
FROM HSP_ACCOUNT har1
inner join #MAINSELECT1 m on har1.HSP_ACCOUNT_ID = m.HSP_ACCOUNT_ID
left outer join clarity_loc loc on (har1.loc_id = loc.loc_id)