Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kailashkotak91
Contributor III
Contributor III

Where clause within Load Script

Hello,

Following is my load script. I want to use where statement to filter year as 2017 and month as October. How can i do that ?

OLEDB CONNECT TO [My Connection String];

LOAD

    CHARGE as Charge_Table1,

    INVCCAT as InvCAT_Table1 ,

    MONTH as Month_Table1,

    YEAR as  Year_Table1,

   

SQL SELECT *

FROM Table 1;

Thank you in advance.

Regards.

5 Replies
Anil_Babu_Samineni

Try this?

OLEDB CONNECT TO [My Connection String];

LOAD

    CHARGE as Charge_Table1,

    INVCCAT as InvCAT_Table1 ,

    MONTH as Month_Table1,

    YEAR as  Year_Table1 Where MONTH = 'October' and YEAR = 2017;  

SQL SELECT *

FROM Table 1;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
its_anandrjs

Try this

OLEDB CONNECT TO [My Connection String];

LOAD

    CHARGE as Charge_Table1,

    INVCCAT as InvCAT_Table1 ,

    MONTH as Month_Table1,

    YEAR as  Year_Table1

Where YEAR =  Yeaar(Today()) and MONTH  = 'Oct' ;

  

SQL SELECT *

FROM Table 1;

its_anandrjs

In MONTH field what type of data you have for october month.

kailashkotak91
Contributor III
Contributor III
Author

Got it. Its fixed. Thank you for all your feedback

Anil_Babu_Samineni

Great, Please close this thread by flag "Correct Answer". Read more the usage Qlik Community Tip: Marking Replies as Correct or Helpful

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful