Good afternoon all,
Is anyone familiar with Microsoft query via ODBC ? I am currently learning the ropes with this and have a query.
I have the extract below which pulls data out of our system from 01/01/15 onward, but I really wish to do is pull data from todays date -365 days (so I get a rolling years data every time I run the query) but I am struggling to do this.
Can anyone help with how I could rewrite the query below
WHERE PTMFILE.PTMPTNO = STHFILE.STHPTNO AND ((STHFILE.STHTYPE='A') AND (STHFILE.STHDATE>{d '2015-01-01'}) OR (STHFILE.STHTYPE='E') AND (STHFILE.STHDATE>{d '2015-01-01'}) OR (STHFILE.STHTYPE='G') AND (STHFILE.STHDATE>{d '2015-01-01'}) OR (STHFILE.STHTYPE='I') AND (STHFILE.STHDATE>{d '2015-01-01'}))
thank you,
Kind regards
Mark
Is anyone familiar with Microsoft query via ODBC ? I am currently learning the ropes with this and have a query.
I have the extract below which pulls data out of our system from 01/01/15 onward, but I really wish to do is pull data from todays date -365 days (so I get a rolling years data every time I run the query) but I am struggling to do this.
Can anyone help with how I could rewrite the query below
WHERE PTMFILE.PTMPTNO = STHFILE.STHPTNO AND ((STHFILE.STHTYPE='A') AND (STHFILE.STHDATE>{d '2015-01-01'}) OR (STHFILE.STHTYPE='E') AND (STHFILE.STHDATE>{d '2015-01-01'}) OR (STHFILE.STHTYPE='G') AND (STHFILE.STHDATE>{d '2015-01-01'}) OR (STHFILE.STHTYPE='I') AND (STHFILE.STHDATE>{d '2015-01-01'}))
thank you,
Kind regards
Mark