Ms query sql statement less than or equal to syntax.

Sonican

New Member
Joined
Jun 20, 2016
Messages
13
This may totally be in the wrong place, but i'm using excel in this situation... kind of...

I am running a query that gets all values from an access database that were recorded less than or equal to a certain date. As the sql is set up right now, he query will gather all records that are less than today's date, but i need it to come up with all records that are less than or equal to today's date.

here is the sql:

SELECT OLOG.LogID, OLOG.Company, OLOG.DateTime, OLOG.AddFaiCnt, OLOG.AddSucCnt, OLOG.UpdFaiCnt, OLOG.UpdSucCnt, OLOG.TotalRecord, OLOG.CUMMode, OLOG.Username, OLOG.Server, OLOG.DelFlag, OLOG.ErrorFilePath
FROM `Q:\Temp 8 Days Only\SAPDTW\dtw.mdb`.OLOG OLOG
WHERE (DateValue([OLOG.DateTime] )>Date()-?)

The important part is that last ">" how can I get it to read less than or equal to?

Thanks a ton!
 

Some videos you may like

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Watch MrExcel Video

Forum statistics

Threads
1,099,083
Messages
5,466,538
Members
406,485
Latest member
kaksolver

This Week's Hot Topics

Top