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

Crosstab column naming problem

P: n/a
Hi

I have the following crosstab query;

TRANSFORM Sum([Staff Figures All Years].Rqd) AS SumOfRqd
SELECT [Staff Figures All Years].D
FROM [Staff Figures All Years]
GROUP BY [Staff Figures All Years].D
PIVOT [Staff Figures All Years].Y;

When I try to force the pivot values to appear under three columns value1,
value2 and value3 as below, I get a 'Data type mismatch in criteria' error
when running the query.

TRANSFORM Sum([Staff Figures All Years].Rqd) AS SumOfRqd
SELECT [Staff Figures All Years].D
FROM [Staff Figures All Years]
GROUP BY [Staff Figures All Years].D
PIVOT [Staff Figures All Years].Y In ("Value1","Value2","Value3");

What is the problem and how can I fix it?

Thanks

Regards

Dec 29 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Sat, 29 Dec 2007 02:18:29 -0000, "John" <Jo**@nospam.infovis.co.uk>
wrote:

You got your Year off by one.
-Tom.
>Hi

I have the following crosstab query;

TRANSFORM Sum([Staff Figures All Years].Rqd) AS SumOfRqd
SELECT [Staff Figures All Years].D
FROM [Staff Figures All Years]
GROUP BY [Staff Figures All Years].D
PIVOT [Staff Figures All Years].Y;

When I try to force the pivot values to appear under three columns value1,
value2 and value3 as below, I get a 'Data type mismatch in criteria' error
when running the query.

TRANSFORM Sum([Staff Figures All Years].Rqd) AS SumOfRqd
SELECT [Staff Figures All Years].D
FROM [Staff Figures All Years]
GROUP BY [Staff Figures All Years].D
PIVOT [Staff Figures All Years].Y In ("Value1","Value2","Value3");

What is the problem and how can I fix it?

Thanks

Regards

Dec 29 '06 #2

P: n/a
fix your computer's date, pls.
"John" <Jo**@nospam.infovis.co.ukwrote in message
news:Bs*********************@pipex.net...
Hi

I have the following crosstab query;

TRANSFORM Sum([Staff Figures All Years].Rqd) AS SumOfRqd
SELECT [Staff Figures All Years].D
FROM [Staff Figures All Years]
GROUP BY [Staff Figures All Years].D
PIVOT [Staff Figures All Years].Y;

When I try to force the pivot values to appear under three columns value1,
value2 and value3 as below, I get a 'Data type mismatch in criteria' error
when running the query.

TRANSFORM Sum([Staff Figures All Years].Rqd) AS SumOfRqd
SELECT [Staff Figures All Years].D
FROM [Staff Figures All Years]
GROUP BY [Staff Figures All Years].D
PIVOT [Staff Figures All Years].Y In ("Value1","Value2","Value3");

What is the problem and how can I fix it?

Thanks

Regards

Jan 11 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.