Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm connecting to a data warehouse and I want to limit date to e.g. a specific year or a few days back.
What might the "where" query look like?
Data format from warehouse is 'DD-MM-YYYY'
My code dont work 😞
LIB CONNECT TO 'HD (kp)'; Let vEndDate = text(date((Today()-7), 'DD-MM-YYYY')); [SALES]: SELECT |
Try without the textual representation.
Let vEndDate = Date(Today()-7, 'DD-MM-YYYY');
I have error:
code:
LIB CONNECT TO 'HD (kp)';
Let vEndDate = Date(Today()-7, 'DD-MM-YYYY');
[obroty_72]:
LOAD
hid_sklep,
date(hid_data) as data,
kod_ean,
hid_segment;
SELECT
"hid_sklep",
"hid_data",
"kod_ean",
"hid_segment"
FROM "public"."obroty_72"
Where "hid_data" >= '$(vEndDate)'
;
error:
Started loading data
Connected
The following error occurred:
Field 'hid_sklep' not found
The error occurred here:
SELECT
"hid_sklep",
"hid_data",
"kod_ean",
"hid_segment"
FROM "public"."obroty_72"
Where "hid_data" >= '14-04-2023'
Data has not been loaded. Please correct the error and try loading again.
Try referring to the fields in uppercase.
Alternatively, you can troubleshoot by just executing the SQL part (without the preceding load) and examining table values from the table viewer.