Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pawwy1415
Creator III
Creator III

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
sunny_talwar

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

View solution in original post

2 Replies
sunny_talwar

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

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