- 论坛徽章:
- 0
|
本帖最后由 hanminnba 于 2011-01-06 12:22 编辑
在IBM iSeries Access Windows中的Data Transfer from iSeries做数据查询,用current date 减去生产日期得到安全库存天数时,得到的数值有时与实际不符的情况,这是什么原因?AS400版本V5R4M0
select itemcode, lotcode, (current date) - (left(lotcode,4)||'-'||substr(lotcode,5,2)||'-'||substr(lotcode,7,2)) stockday from storage
Itemcode lotcode stockday
11200045 20101231B12 6
11200043 20110103B12 30
11200037 20110103B12 3
11200036 20101231B12 6
11200043 20110103B12 3
11200044 20101231B12 6
11200037 20110103B12 3
11200036 20101231B12 60 |
|