Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

pawwy1415
Contributor II

Where condition at select statement

Hi Experts,

Can any one please help me on below requirement.

I have a oracle table like below in qlik

Table:

Load

     DATE,

     ACCOUNT,

    CURRENCY,                                      

    VALUE,                                                 

     GBPVALUE ;                                          

Sql

    select

      to_char(ap.date,'DD/MM/YYYY') as date,

      ap.account,

      ap.currency,

      ap.value,

      ap.gbpvalue

from account ap

where to_char(ap.date,'DD/MM/YYYY') in '31/07/2017';


In the above table at where condition i have to apply where ap.date <= '31/07/2017' in static way dynamic method is not required.just for testing purpose.

Please help me how to write that oracle syntax at select statement.



Thanks in advance.

1 Solution

Accepted Solutions
MVP
MVP

Re: Where condition at select statement

Try this

Table:

Load

     DATE,

     ACCOUNT,

    CURRENCY,                                     

    VALUE,                                                

     GBPVALUE ;                                         

Sql

    select

      to_char(ap.date,'DD/MM/YYYY') as date,

      ap.account,

      ap.currency,

      ap.value,

      ap.gbpvalue

from account ap

where ap.date <= TO_DATE('31/07/2017', 'dd/mm/yyyy');

2 Replies
MVP
MVP

Re: Where condition at select statement

Try this

Table:

Load

     DATE,

     ACCOUNT,

    CURRENCY,                                     

    VALUE,                                                

     GBPVALUE ;                                         

Sql

    select

      to_char(ap.date,'DD/MM/YYYY') as date,

      ap.account,

      ap.currency,

      ap.value,

      ap.gbpvalue

from account ap

where ap.date <= TO_DATE('31/07/2017', 'dd/mm/yyyy');

pawwy1415
Contributor II

Re: Where condition at select statement

Thanks for your reply sunny below one is also working.

Table:

Load

     DATE,

     ACCOUNT,

    CURRENCY,                                     

    VALUE,                                                

     GBPVALUE ;                                         

Sql

    select

      to_char(ap.date,'DD/MM/YYYY') as date,

      ap.account,

      ap.currency,

      ap.value,

      ap.gbpvalue

from account ap

where to_char(ap.date,'DD/MM/YYYY') <= '31/07/2017';