By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,501 Members | 831 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,501 IT Pros & Developers. It's quick & easy.

crosstab query problem

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.