- 論壇徽章:
- 0
|
本帖最后由 hanminnba 于 2011-01-06 12:22 編輯
在IBM iSeries Access Windows中的Data Transfer from iSeries做數(shù)據(jù)查詢,用current date 減去生產(chǎn)日期得到安全庫存天數(shù)時,得到的數(shù)值有時與實際不符的情況,這是什么原因?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 |
|