5 Replies Latest reply: Sep 13, 2013 10:57 AM by Henric Cronström RSS

    how to make selections on dates in SQL when coded as numbers

      HI everybody,


      I'm trying, qithout success, to achieve the following.

      Usually, I'm solving this kind of issue by means of an ApplyingMap, but I'm not sure it is the optimal solution.


      I have a field which is including all the incoming quantities.

      I then would like to include a field which is considering just the quantities that are incoming in the next two weeks AND that are coming by truck, regardless if within two weeks or one month time. All these quantities need to be in the same field.


      The source is AS400 and the dates are coded as 20121210.

      I think that the SQL date-related functions are not working properly because those 'dates' are coded as numbers (I am getting no results).


      How would you tackle this problem? Importing the AS400 source in QV first, by using a Date#, and then doing some IF functions regarding the dates needed and whether shipment is by truck?


      thank you!