Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I've created an inline table of dates that I need to exclude during reload. It's a table with a single field called, "Dates".
I've tried something like what I illustrated below, but it did not work, it ended up loading nothing at all. I thought it might work because I've used "Where Exists" to load ONLY data that matched a field in another table, so I thought trying the opposite of that would work here. I appreciate any ideas you may have.
(NOTE: I'm using more dates than this, this is just an example)
Load * Inline [Dates
2017-01-02
2017-05-29
2017-07-04
];
Load
Field1
Field2
Field3
Dates
Resident MainDataTable
Where Not Exists(Dates)
;
MainDataTable is in memory so all the possible dates are beeing used in Exists statement.
Try:
Load * Inline [Dates_exclude
2017-01-02
2017-05-29
2017-07-04
];
Load
Field1
Field2
Field3
Dates
Resident MainDataTable
Where Not Exists(Dates_exclude, Dates)
It might not be working because of difference in date format.
Hi Nate,
Double check the date format of both fields from two different tables. Also if you want to load only data which will match to previously loaded table then use 'Where Exists' instead 'Where Not Exists'
MainDataTable is in memory so all the possible dates are beeing used in Exists statement.
Try:
Load * Inline [Dates_exclude
2017-01-02
2017-05-29
2017-07-04
];
Load
Field1
Field2
Field3
Dates
Resident MainDataTable
Where Not Exists(Dates_exclude, Dates)
Thank you sir! That worked.
The columns don't have to have diffrent names. You could load Dates as Dates and later
LOAD
Field1
Field2
Field3
Dates
Resident MainDataTable
WHERE NOT EXISTS(Dates);