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!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,216,116
Messages
6,128,926
Members
449,479
Latest member
nana abanyin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top