TitleistDBA
IS-IT--Management
I'm trying to run the following query. I'm only looking for data the mmlmdt greater than the previous days date.
I should only get back 49 rows. However when I run my query here I get back data from 2004 as well. We are running this on and AS400 db so I'm not sure sure if current date works?
Thanks
SELECT mmitno, mmstat, mmitds, mmitty, mmmabu, mmcfi1, mmpuun,
mppopn, mmlmdt
FROM mvxcjdttst.mitmas LEFT OUTER JOIN mvxcjdttst.mitpop
ON (mmitno = mpitno
and MPALWQ = 'UPC')
WHERE mmlmdt > (day(current date) - 1)
I should only get back 49 rows. However when I run my query here I get back data from 2004 as well. We are running this on and AS400 db so I'm not sure sure if current date works?
Thanks
SELECT mmitno, mmstat, mmitds, mmitty, mmmabu, mmcfi1, mmpuun,
mppopn, mmlmdt
FROM mvxcjdttst.mitmas LEFT OUTER JOIN mvxcjdttst.mitpop
ON (mmitno = mpitno
and MPALWQ = 'UPC')
WHERE mmlmdt > (day(current date) - 1)