10 Replies Latest reply: Jun 1, 2014 1:22 PM by Ivan Kantemirov RSS

    Problem with sql code to qlikview code

    Ivan Kantemirov

      I have a sql code, but i need to make something like it in qlikview. I tried different ways, but i stuck, someone got an ideas how can it be done.

      SELECT

      [ContactId]

      ,[PolicyEndDate]

      ,[policyDate]

      ,[PolicyNo]

      ,[source]

      ,[policttype]

      into #Candidates

      from Policy WITH (nolock)

       

      select

      [ContactID]

      from #Candidates e

      inner join #Candidates s

      ON

      1. e.contactid = s.contactid

      AND e.policytype = s.policytype

      AND e.source = s.source

      WHERE

      ABS(DATEDIFF(DAY,s.PolicyDate , e.PolicyEndDate)) < 30

      AND

      (e.Policy <> s.Policy)

      GROUP BY

      [ContactID]