[AccessD] TOP 30 for multiple theaters.

Gustav Brock Gustav at cactus.dk
Mon Mar 14 05:19:57 CST 2005


Hi Erwin

A union is an option. 
However, you could also open a recordset in VBA with the list properly
ordered, then walk through this while counting.
The result could be written to a temp table (they are not that
dangerous) or - if you have control of the table and its design - set a
mark on the selected records for later filtering.

/gustav

>>> Erwin.Craps at ithelps.be 14-03-2005 11:45:23 >>>
(sorry for sending previous message not compleeted....)
 
Hi group
 
I need a query that results in a list for a specific year, numerating
all movietheaters and for each theatre a TOP 30 of movies.
 
Is it posible, and how do I do this to create a query with the
folowing
result. 
Movietheatre X, movie 01, tickets, boxoffice
Movietheatre X, movie 02 , tickets, boxoffice
Movietheatre X, movie ... , tickets, boxoffice
Movietheatre X, movie 29 , tickets, boxoffice
Movietheatre X, movie 30 , tickets, boxoffice
Movietheatre Y, movie 01, tickets, boxoffice
Movietheatre Y, movie 02 , tickets, boxoffice
Movietheatre Y, movie ... , tickets, boxoffice
Movietheatre Y, movie 29 , tickets, boxoffice
Movietheatre Y, movie 30 , tickets, boxoffice
Movietheatre Z, movie 01, tickets, boxoffice
Movietheatre Z, movie 02 , tickets, boxoffice
Movietheatre Z, movie  ...  , tickets, boxoffice
Movietheatre Z, movie 29 , tickets, boxoffice
Movietheatre Z, movie 30 , tickets, boxoffice
 
I see only the posiblilty to create a query for each theatre and use a
union query afterwards.
Or by the use of a temp table, but I don't like using temp tables...
 
The source table looks like this.
 
movietheatre, year, week, movie, tickets, boxoffice
  
 
thx
 
Erwin Craps

Zaakvoerder 

www.ithelps.be/onsgezin 




More information about the AccessD mailing list