Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Sebastian_Dec
Creator II
Creator II

Load from warehouse limited to a specific year

Hi, how I can load only one year from warehouse using only one load?

I need load only 2023, not 2000/2021/2022.

Data is in format DD-MM-YYYY

My code:

 

 

LIB CONNECT TO 'HD';

sales_tmp:
LOAD
hid_sklep,
date(hid_data) as data,
Year(hid_data) as year,
Month(hid_data) as month,
kod_ean,
hid_segment;

SELECT
"hid_sklep",
"hid_data",
"kod_ean",
"hid_segment"
FROM "public"."sales_72"
;

 

 

 

Thanks & Regards,
Please close the thread by marking correct answer & give likes if you like the post.
Labels (2)
2 Solutions

Accepted Solutions
Or
MVP
MVP

Where Year(hid_data) = 2023 presumably (unless your database doesn't use Year(), in which case you may need a different function). This isn't really a Qlik question, though, since you're looking for a condition in your SQL statement.

View solution in original post

Sebastian_Dec
Creator II
Creator II
Author

Hi, thx for help, its works.
My fixed code:

 

LIB CONNECT TO 'HD';

sales_tmp:
LOAD
hid_sklep,
date(hid_data) as data,
Year(hid_data) as year,
Month(hid_data) as month,
kod_ean,
hid_segment
Where Year(hid_data) = 2023;

SELECT
"hid_sklep",
"hid_data",
"kod_ean",
"hid_segment"
FROM "public"."sales_72"
;

 

Thanks & Regards,
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

3 Replies
Or
MVP
MVP

Where Year(hid_data) = 2023 presumably (unless your database doesn't use Year(), in which case you may need a different function). This isn't really a Qlik question, though, since you're looking for a condition in your SQL statement.

Sebastian_Dec
Creator II
Creator II
Author

Hi, thx for help, its works.
My fixed code:

 

LIB CONNECT TO 'HD';

sales_tmp:
LOAD
hid_sklep,
date(hid_data) as data,
Year(hid_data) as year,
Month(hid_data) as month,
kod_ean,
hid_segment
Where Year(hid_data) = 2023;

SELECT
"hid_sklep",
"hid_data",
"kod_ean",
"hid_segment"
FROM "public"."sales_72"
;

 

Thanks & Regards,
Please close the thread by marking correct answer & give likes if you like the post.
Prem0212
Creator
Creator

in the load script editor if u can use the where condition for the year filed as 2023 then it works.