convert sql to access query (1 Viewer)

Mike Hughes

Registered User.
Local time
Today, 11:44
Joined
Mar 23, 2002
Messages
493
I had someone experienced in sql (doesn't know Access) to write me this query to give me a count of cases where an EFN31 notice was sent and the date sent was greater than or equal to 4/23/2012. This is the query and it works fine but I would like it in access and I tried it in Access and it ran but gave me a count that was not near the count in SQL. Could someone show me how to convert this to be used in Access? Thanks Mike

SELECT COUNT(*) FROM VAFRM WHERE ID_NOTICE='ENF31' AND TRUNC(TS_CREATE_FMRQ) >= '23-APR-2012';
 

pr2-eugin

Super Moderator
Local time
Today, 11:44
Joined
Nov 30, 2011
Messages
8,494
Hello Mike, try the following..
Code:
SELECT COUNT([COLOR=Blue]yourFieldName[/COLOR]) FROM VAFRM WHERE ID_NOTICE='ENF31' AND TS_CREATE_FMRQ >= #04/23/2012#;
Change the Blue bits to any field name in the table, as MS Access does not allow count on * in Query design..
TRUNC function is not available in Access..
The Date should be delimited by using ##
 

Users who are viewing this thread

Top Bottom