Page 1 of 1

omit 2 days old data from current date in Sort.

Posted: Wed Oct 31, 2018 9:38 am
by Neeraj N
Hi,

I need to omit records using sort card after a full unload of db2 table. Date field is character x(10). What would be the omit condition for that? Condition is omit 2 days old data from current date, how can I do that in SORT?

Re: omit 2 days old data from current date in Sort.

Posted: Wed Oct 31, 2018 11:59 am
by nicc
What have you tried so far? What was the result? What was the problem with the result?

Re: omit 2 days old data from current date in Sort.

Posted: Wed Oct 31, 2018 1:46 pm
by Chandan Yadav
If you are doing a table unload , why can't you exclude the records during unload itself by tweaking the DB2 query to select only last 2 days data?

Re: omit 2 days old data from current date in Sort.

Posted: Thu Nov 01, 2018 5:10 pm
by Neeraj N
Chandan Yadav wrote: Wed Oct 31, 2018 1:46 pmIf you are doing a table unload , why can't you exclude the records during unload itself by tweaking the DB2 query to select only last 2 days data?
This suggestion looks good, will try it.