473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

crosstab query problem

I am trying to create a "diary page" so that all bookings can be viewed on one
screen. I want resources along the top, eg Arena. Gallop. Farm Ride. Down
the side times . eg 3.00 4.00 etc.

I have been trying with a crosstab query which nearly works !! Problem is what
goes in value. If I use First then if there is a 3.00 booking for 2 resources
then it only shows the customer with the name nearest A

Any thoughts on this. Am I on the right track ?

SQL follows
TRANSFORM First(diarysortfacilities.ContactLastName) AS [The Value]
SELECT diarysortfacilities.ScheduleStartTime
FROM diarysortfacilities
GROUP BY diarysortfacilities.ScheduleStartTime
PIVOT diarysortfacilities.ResourceType;

TIA
David B
Nov 12 '05 #1
2 1379
How about grouping by Contact as well as by ScheduleStartTime?

HTH
- Turtle

"David B" <da***@marleycotenospam.fsnet.co.uk> wrote in message
news:bu**********@news5.svr.pol.co.uk...
I am trying to create a "diary page" so that all bookings can be viewed on one screen. I want resources along the top, eg Arena. Gallop. Farm Ride. Down the side times . eg 3.00 4.00 etc.

I have been trying with a crosstab query which nearly works !! Problem is what goes in value. If I use First then if there is a 3.00 booking for 2 resources then it only shows the customer with the name nearest A

Any thoughts on this. Am I on the right track ?

SQL follows
TRANSFORM First(diarysortfacilities.ContactLastName) AS [The Value]
SELECT diarysortfacilities.ScheduleStartTime
FROM diarysortfacilities
GROUP BY diarysortfacilities.ScheduleStartTime
PIVOT diarysortfacilities.ResourceType;

TIA
David B

Nov 12 '05 #2
Simple when you know how !!
many thanks
David B

MacDermott <ma********@nospam.com> wrote in message
news:g5******************@newsread3.news.atl.earth link.net...
How about grouping by Contact as well as by ScheduleStartTime?

HTH
- Turtle

"David B" <da***@marleycotenospam.fsnet.co.uk> wrote in message
news:bu**********@news5.svr.pol.co.uk...
I am trying to create a "diary page" so that all bookings can be viewed on

one
screen. I want resources along the top, eg Arena. Gallop. Farm Ride.

Down
the side times . eg 3.00 4.00 etc.

I have been trying with a crosstab query which nearly works !! Problem is

what
goes in value. If I use First then if there is a 3.00 booking for 2

resources
then it only shows the customer with the name nearest A

Any thoughts on this. Am I on the right track ?

SQL follows
TRANSFORM First(diarysortfacilities.ContactLastName) AS [The Value]
SELECT diarysortfacilities.ScheduleStartTime
FROM diarysortfacilities
GROUP BY diarysortfacilities.ScheduleStartTime
PIVOT diarysortfacilities.ResourceType;

TIA
David B



Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Donna Sabol | last post by:
First, I should start by saying I am creating a database to be used by some very impatient, non-computer literate people. It needs to be seameless in it's operation from their point of view. I...
3
by: Darleen | last post by:
I am seeking conceptual here on how to get started with a "3D Matrix" in Access. We run a training center which holds multiple classes in multiple cities at multiple times. So I need to create a...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
3
by: Bryan | last post by:
I've been looking over this newsgroup, but I can't find an answer to my problem. I see that a few others have posted this issue over the years, but none of them got a response. I'll give it...
14
by: Tina | last post by:
My employer tracks productivity/performance of clinicians (how much they bill) each week, its averages for the month, and the 6 months. These averages are compared to their expected productivity....
6
by: tizmagik | last post by:
I am having a lot of difficulty generating a CrossTab Query based report. I have looked online for several tutorials and whatnot but I have not been able to really find what I'm looking for, nor...
13
by: salad | last post by:
Operating in A97. I didn't receive much of a response conserning Pivot tables in Access. Pivot tables are nice, but a CrossTab will work for me too. Using a Pivot table, one is actually...
3
by: russellhq | last post by:
Hi, I'm fairly new to access and have a little trouble with a crosstab query I've setup. I have a main form where the user selects a project name and below in a subform, a crosstab query is...
4
by: mattlightbourn | last post by:
Hi all, I have a problem which has been driving me nuts. Crosstab queries! I have a database witch a few different tables to do with garment manufacturing. I have a table for a client...
2
by: Jim Devenish | last post by:
I wish to create a crosstab query as the record source for a report. It needs to count data between selected dates which are entered by the user in a popup window. The following Select query...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.