Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
upaliwije
Contributor II

date condition in script

Hi Friends

LOAD

      DATE(POL_PERIOD_FROM) AS POL_PERIOD_FROM ,

      DATE(POL_PERIOD_TO) AS POL_PERIOD_TO , 

     INT_MODE,

     INT_CLASS_CODE,

   AMOUNT

    

FROM

SS_Claim.qvd

(qvd)

WHERE POL_PERIOD_TO BETWEEN '01-JAN-2014' AND '30-JUN-2014';

in my above script the condition highlighted in red does not work. What may be the correct script. Pls help me

1 Solution

Accepted Solutions

Re: date condition in script

Hi Upali

Bill is right you have to use Greater than or Less than operators with the date fields for solution please see the load script with below load script.

LOAD

      DATE(POL_PERIOD_FROM) AS POL_PERIOD_FROM ,

      DATE(POL_PERIOD_TO) AS POL_PERIOD_TO ,

      INT_MODE,

      INT_CLASS_CODE,

      AMOUNT

FROM

SS_Claim.qvd

(qvd)

Where POL_PERIOD_TO   >= '01-JAN-2014' and POL_PERIOD_TO <= '30-JUN-2014';

3 Replies

Re: date condition in script

I do not believe that BETWEEN is a valid QlikView function.

Try using a greater than and a less than for the condition.

Re: date condition in script

Hi Upali

Bill is right you have to use Greater than or Less than operators with the date fields for solution please see the load script with below load script.

LOAD

      DATE(POL_PERIOD_FROM) AS POL_PERIOD_FROM ,

      DATE(POL_PERIOD_TO) AS POL_PERIOD_TO ,

      INT_MODE,

      INT_CLASS_CODE,

      AMOUNT

FROM

SS_Claim.qvd

(qvd)

Where POL_PERIOD_TO   >= '01-JAN-2014' and POL_PERIOD_TO <= '30-JUN-2014';

upaliwije
Contributor II

Re: date condition in script

Thanks both of you

Community Browser