I'm running an impromptu report which pulls information from different tables on our iSeries. everything's ok and the queries run really fast until i start to do anything with dates.
our system stores dates as numbers eg 20050908 and to find out if an order is overdue i have been using number to date function for expected date and then compare it with the functions either today or curdate.
the query goes from taking a few seconds to sometimes 5 to 10 minutes, there are only 18k of lines in the report.
i have other reports which are 300k+ but which run really quick (which don't contain any NTD or curtime functions)
it doesn't seem to matter whether i use curdate (which runs on the database) or today (which runs on my computer) they both slwo the report right down (
anyone have any ideas
thanks
our system stores dates as numbers eg 20050908 and to find out if an order is overdue i have been using number to date function for expected date and then compare it with the functions either today or curdate.
the query goes from taking a few seconds to sometimes 5 to 10 minutes, there are only 18k of lines in the report.
i have other reports which are 300k+ but which run really quick (which don't contain any NTD or curtime functions)
it doesn't seem to matter whether i use curdate (which runs on the database) or today (which runs on my computer) they both slwo the report right down (
anyone have any ideas
thanks