Well I think that the source of your problem is whatever is going on with the expression ...
I would think that "to_char(...,'RRRRMM')" is giving you a six character strings beginning "20....", but you are converting it to a number and asking if the result is in a list of numbers that I don't think it can possibly match.Code:to_number(to_char(to_date(lpad(to_char(nevaldate),4,'0'),'RRMM'),'RRRRMM')) in (0307,0308,0309,0310,0311,0312,0401,0402,0403,0404,0405,0406)
Storing dates in date formats would be a good start, for reasons that ought to be obvious based on the complexity of the expressions that you are using.




Reply With Quote