Fonction DMax

D

domivax

Bonjour tout le monde,

J'ai la table suivante:



Table: tbl_Global

Id CountryId CountryName CountryDate
_____________________________________________________
1 1 United Kingdom 13.03.2014
2 1 United Kingdom 02.03.2011
3 1 United Kingdom 03.04.2010
4 2 France 01.02.2012
5 2 France 03.03.2014
6 2 France 09.09.2010
7 2 France 08.04.2008
8 3 Swizterland 09.08.2009
9 4 Belgium 15.12.2013
10 4 Belgium 11.08.2011
11 5 Spain 23.08.2011
12 5 Spain 25.04.2014




J'ai un souci avec la fonction DMax.

Je souhaiterai une requete avec un seul enregistrement par pays renvoyant la date la plus recente.

Ma fonction dans sql_Global: Result: DMax("CountryDate","tbl_Global","CountryId")




Query: sql_Global

Id CountryId CountryName CountryDate
_____________________________________________________
1 1 United Kingdom 13.03.2014
5 2 France 03.03.2014
8 3 Swizterland 09.08.2009
9 4 Belgium 15.12.2013
12 5 Spain 25.04.2014




et le resultat est le suivant:




Id CountryId CountryName CountryDate
_____________________________________________________
1 1 United Kingdom 25.04.2014
2 1 United Kingdom 25.04.2014
3 1 United Kingdom 25.04.2014
4 2 France 25.04.2014
5 2 France 25.04.2014
6 2 France 25.04.2014
7 2 France 25.04.2014
8 3 Swizterland 25.04.2014
9 4 Belgium 25.04.2014
10 4 Belgium 25.04.2014
11 5 Spain 25.04.2014
12 5 Spain 25.04.2014



Merci pour votre aide.
Salutations.
Domivax
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Concatenate With Criteria 5
Unique values 1
Adding a numbered field in a query 1
vlookups 0
Bargain Nice one Voip 3
Insert values based on 2 criterias 3
fonction format dans access2000 2
PL2006 ISO downloads 13

Top