[AccessD] TOP 30 for multiple theaters.

Erwin Craps - IT Helps Erwin.Craps at ithelps.be
Mon Mar 14 15:52:52 CST 2005


I'll take a look in to this tomorow.
I also need a sum but I supose that no prob.

Let you know.
Erwin
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Scott Marcus
Sent: Monday, March 14, 2005 1:41 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] TOP 30 for multiple theaters.

Would something like this work (at least it does on my computer)?

SELECT B.TheatreID, B.Movie, B.Tickets
FROM tblBoxoffice AS B
WHERE B.id In (SELECT TOP 30 A.id
FROM tblBoxoffice AS A
WHERE A.TheatreID=B.TheatreID
ORDER BY A.TICKETS DESC)
ORDER BY B.TheatreID, B.Tickets DESC;


Tables:

tblBoxoffice
   id         autonumber
   Movie      Text
   Tickets    Long
   TheatreID  Long

tblTheatre
   id         autonumber
   Theatre    Text


Scott Marcus
TSS Technologies, Inc.
marcus at tsstech.com


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Erwin Craps -
IT Helps
Sent: Monday, March 14, 2005 5:38 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] TOP 30 for multiple theaters.

Hi group
 
Is it posible, and how do I do this to create a query with the folowing
result.
 
Movietheatre X, movie 1, tickets, boxoffice Movietheatre X, movie 1,
tickets, boxoffice Movietheatre X, movie 1, tickets, boxoffice
Movietheatre X, movie 1, tickets, boxoffice Movietheatre X, movie 1,
tickets, boxoffice
 
 
 

 

Erwin Craps

Zaakvoerder 

www.ithelps.be/onsgezin

 

This E-mail is confidential, may be legally privileged, and is for the
intended recipient only. Access, disclosure, copying, distribution, or
reliance on any of it by anyone else is prohibited and may be a criminal
offence. Please delete if obtained in error and E-mail confirmation to
the sender.

IT Helps - I.T. Help Center  ***  Box Office Belgium & Luxembourg

www.ithelps.be <http://www.ithelps.be/>   *  www.boxoffice.be
<http://www.boxoffice.be/>   *  www.stadleuven.be
<http://www.stadleuven.be/> 

IT Helps bvba* ** Mercatorpad 3 **  3000 Leuven

IT Helps  *  Phone: +32 16 296 404  *  Fax: +32 16 296 405 E-mail:
Info at ithelps.be 

Box Office **  Fax: +32 16 296 406 **  Box Office E-mail:
Staff at boxoffice.be <mailto:figures at boxoffice.be> 

 
--
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