Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator 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
its_anandrjs

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';

View solution in original post

3 Replies
Anonymous
Not applicable

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

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

its_anandrjs

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
Creator II
Creator II
Author

Thanks both of you