Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MSQUERY Get system date 2

Status
Not open for further replies.

jpl458

Technical User
Sep 30, 2009
337
0
0
US
Have a simple application that needs to look only at records only with TODAY's date. However, MSQUERY does not support Date() or Today(), etc. Any help would be appreciated.

Thanks in advance

jpl
 
Never tried that in MSQuery myself, but definitely can see the need. From doing a quick search, it sounds like you can just use the "date()" or "now()" or "Getdate()" function of your underlying data source. So, for instance, if it's MS SQL Server, then you could use GETDATE().

Also, here's a reference from Microsoft that mentions some reserved words in MS Query that might work regardless of where the data comes from. Not sure, again, I've ever tried:


"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
hi,

What kind of database are you querying. The target db dictataes ALL your syntax.

For instance if you access MS Access or some other Excel workbook, then MID and DATE are valid functions.

However if you access Oracle, then SUBSTR and SYSDATE would be corresponding functions.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Tried GETDATE() and get all the dates. Using SQLServer database. Like also doesn't work, and I have read the help on that and used both % and * as wildcards. I can set up a query in ACCESS that feeds EXCEL and it runs.
I am trying to build a simple application that counts objects as they pass through gates. Each gate has records that are updated as an object passes. I want a scorebord for each gate just for todays activities. I could do it in Access easily but executing the query every minute would eat cpu time(according to what I've read). Excel does a better job at that, and I would like to use only one application for the task, however MSQuery has it's weak spots as well, which are Getdate() and Like.

Thanks for your help.

jpl
 
How much of your CPU gets utilized will vary GREATLY by the number of records. Are you dealing with a handful of records, thousands, hundreds of thousands, millions, what? That will make a big difference. If you are dealing with thousands or LESS, then an Access database can handle it. Access is built to handle more than Excel anyway - well, that's not as much the case anymore with Excel 2007/2010, b/c Excel can now handle up to 1 million rows (well that's not the exact number).

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top