H
Home
I have a database that is connected to our server at work via OBDC. I have a
query that I run on a fairly large table. I the query is built on another
query and there are last of and sum of fields in the queries.. I get
different results in the number of records returned each time I run the
query.
SELECT dbo_tbl_claims.prov_id, dbo_tbl_claims.client_id,
Last(dbo_tbl_claims.srvc_dt) AS LastOfsrvc_dt,
Last(dbo_tbl_claims.srvc_code) AS LastOfsrvc_code,
Sum(dbo_tbl_claims.approved_amt) AS SumOfapproved_amt
FROM dbo_tbl_claims
GROUP BY dbo_tbl_claims.prov_id, dbo_tbl_claims.client_id
HAVING (((Last(dbo_tbl_claims.srvc_dt)) Between [forms]![community
support]![DS] And [forms]![community support]![De]) AND
((Last(dbo_tbl_claims.srvc_code))="H0036"))
ORDER BY Last(dbo_tbl_claims.srvc_dt);
Any help is appreciated
Craig
query that I run on a fairly large table. I the query is built on another
query and there are last of and sum of fields in the queries.. I get
different results in the number of records returned each time I run the
query.
SELECT dbo_tbl_claims.prov_id, dbo_tbl_claims.client_id,
Last(dbo_tbl_claims.srvc_dt) AS LastOfsrvc_dt,
Last(dbo_tbl_claims.srvc_code) AS LastOfsrvc_code,
Sum(dbo_tbl_claims.approved_amt) AS SumOfapproved_amt
FROM dbo_tbl_claims
GROUP BY dbo_tbl_claims.prov_id, dbo_tbl_claims.client_id
HAVING (((Last(dbo_tbl_claims.srvc_dt)) Between [forms]![community
support]![DS] And [forms]![community support]![De]) AND
((Last(dbo_tbl_claims.srvc_code))="H0036"))
ORDER BY Last(dbo_tbl_claims.srvc_dt);
Any help is appreciated
Craig