Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I loaded many table with many date field, and I want only data where Year(Date_Field) >= Year(Today()) - 2.
for example:
Year(Date_Paiemant) >= Year(Today()) - 2
Year(Date_Produit) >= Year(Today()) - 2
Year(Date_Commande) >= Year(Today()) - 2
Year(Date_Facture) >= Year(Today()) - 2
and many other in few table.
So, can I have something like that, perhaps at the beginning of my script
Year(Date_*) >= Year(Today()) - 2
You can use Where clause in the load script:
LOAD
*
FROM/Resident Your_data_source_name
Where Year(Date_Field) >= Year(Today()) - 2;
Hope this helps.
If you are doing this multiple tables, you should set a variable:
let vFilterYear=Year(Today()) -2;
LOAD
*
FROM/Resident Your_data_source_name
Where Year(Date_Field1) >= $(vFilterYear);
LOAD
*
FROM/Resident Your_data_source_name
Where Year(Date_Field2) >= $(vFilterYear);
etc...
Thank jpe , I will try this
Thank jpe for your attention