0 Replies Latest reply: Nov 16, 2016 9:56 PM by Jet Yang RSS

    How to write script regular statements_add field

    Jet Yang

      I want to add a field "NPT1" in QlikSense.

       

      The Data source form connected to the SQL Server, and not this field, it is necessary to filter out the database from the required, as a new field "NPT1"

       

      The SQLQuery  is

       

      SELECT

      a.*

      FROM Sale_Customer as A

      Where

      (NPT_date_1 BETWEEN @StartDate And @EndDate

      OR NPT_date_1 BETWEEN @StartDate And @EndDate

      OR NPT_date_2 BETWEEN @StartDate And @EndDate

      OR NPT_date_3 BETWEEN @StartDate And @EndDate

      OR NPT_date_4 BETWEEN @StartDate And @EndDate

      OR NPT_date_5 BETWEEN @StartDate And @EndDate

      OR NPT_date_6 BETWEEN @StartDate And @EndDate

      OR NPT_date_7 BETWEEN @StartDate And @EndDate)

       

      1.Sale_Customer is table name

      2. NPT_date_1~NPT_date_7 are column name

       

      So how do I write the script regular statements?


      Thanks in advance for any help!