sorry for my english... dcount query, i think? (1 Viewer)

sal21

Registered User.
Local time
Today, 02:56
Joined
Apr 16, 2004
Messages
19
Have 2 tables with fileds:

CUMULO
FIELD1 FIELD2 FIELDCOUNT
AAA V1 0
AAA Z1 0
...
BBB Z2 0

CONTANTI
FIELD1 FIELD2
AAA V1
AAA Z1
AAA V1
AAA Z1
AAA V1
AAA Z1
...
BBB Z2
BBB Z2


i need to count how a many occurence based match FILED1>FILED1 and DIELD2>FILED2 and update CUMULO.FILEDCOUNT?????

Result in CUMULO:
FIELD1 FIELD2 FIELDCOUNT
AAA V1 3
AAA Z1 3
...
BBB Z2 2


query please!

Tks.

note:
i use ado jet conn, already opended, and vb6 classic. aCCess database
 

CJ_London

Super Moderator
Staff member
Local time
Today, 02:56
Joined
Feb 19, 2013
Messages
16,721
Try

SELECT *, DCOUNT("*","CUMULO","Field1>" & field1 & " AND Field2>" & field2) FROM CUMULO
 

Users who are viewing this thread

Top Bottom