[AccessD] crosstab query by decades...

Kostas Konstantinidis kost36 at otenet.gr
Sun Dec 3 01:40:08 CST 2017


HI Stuart,
That's better...

Thank's
/kostas

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Stuart McLachlan
Sent: Saturday, December 2, 2017 11:38 PM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] crosstab query by decades...

For decades, I just GROUP BY INT(year/10)*10 as "DecadeBeginning" or you
could use
.INT(year/10) * 10 & " - " & Int(year/10) * 10 + 9 

On 2 Dec 2017 at 20:28, Kostas Konstantinidis wrote:

> Forget... solved replacing year with switch([year] between 1914 and 
> 1919; "1914-1919".. etc)
> 
> Sorry
> /kostas
> 
> -----Original Message-----
> From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf 
> Of Kostas Konstantinidis Sent: Saturday, December 2, 2017 7:29 PM To:
> 'Access Developers discussion and problem solving'
> <accessd at databaseadvisors.com> Subject: [AccessD] crosstab query by 
> decades...
> 
> Hi all,
> 
> I use a crosstab query to count the total films (group by short and
> long) per year but what I need is to count the same in decades 
> starting from 1914 to 2017 e.g 1914/1919 -- 4 1920/1929 -- 8 ....
> 2000/2017 -- 186 The 'year' is not a date but a simple number field.
> Any help how to do this?
> 
> TRANSFORM Count(MT_films.[ID_films]) AS CountOfID_films SELECT 
> MT_films.[kind_movie], Count(MT_films.[ID_films]) AS [Total Of 
> ID_films] FROM MT_films GROUP BY MT_films.[kind_movie] PIVOT 
> MT_films.year;
> 
> Thank's
> /kostas
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list