I am trying to make database connections in Excel but I keep getting the Failure to Refresh error. I have tried several things to get the stamp between the first and last date of the the previous month:
SELECT COUNT(*)
FROM MTS
WHERE TRAN_CODE like '%NA7' AND FROM_BLDG = 'C' AND (STAMP between DATEADD(MONTH, DATEDIFF(MONTH, '20010101', CURRENT_TIMESTAMP), '20001231') AND DATEADD(MONTH, DATEDIFF(MONTH, '20010101', CURRENT_TIMESTAMP), '20001201');
DateSerial(Year(Now), Month(Now)-1, 1) FDPMonth ,
DateSerial(Year(Now), Month(Now)-1, 1+30) FDCMonth
dateadd(m, datediff(m, #01/01/1900#, SYSDATE()-1)-1, #01/01/1900#) AND dateadd(m, datediff(m,#01/01/1900#, SYSDATE()-1), #01/01/1900#)-1
what am I doing wrong?
Bookmarks