one character fields name generated by crosstab query

I

inungh

I create a query base on a crosstab query.

The crosstab query has pivot clause like following:

PIVOT tblMytable.[MyGrade] In ("A", "B", "C", "D");

It generates single character filed name from pivot clause.

My problem is I need use (sum([a]) + sum())/ (sum([a]) + sum() +
sum([c]) + sum([d])) in my query.
It seems Access does not let me use single character field name.

If the filed name more than one character works fine.


any workaround?
Your information is great appreciated,
 
I

inungh

Did your crosstab produce any nulls?    Nulls do not sum very well.
--
KARL DEWEY
Build a little - Test a little



inungh said:
I create a query base on a crosstab query.
The crosstab query has pivot clause like following:
PIVOT tblMytable.[MyGrade] In ("A", "B", "C", "D");
It generates single character filed name from pivot clause.
My problem is I need use (sum([a]) + sum())/ (sum([a]) + sum() +
sum([c]) + sum([d])) in my query.
It seems Access does not let me use single character field name.

If the filed name more than one character works fine.
any workaround?
Your information is great appreciated,- Hide quoted text -

- Show quoted text -


yes, it returns null value. does null value affect?
it works for more than one character field name.

Thanks again
 
K

KARL DEWEY

Use the Nz function like this ---
(sum(Nz([a],0)) + sum(Nz(,0)) / sum(Nz([a],0)) + .....
--
KARL DEWEY
Build a little - Test a little


inungh said:
Did your crosstab produce any nulls? Nulls do not sum very well.
--
KARL DEWEY
Build a little - Test a little



inungh said:
I create a query base on a crosstab query.
The crosstab query has pivot clause like following:
PIVOT tblMytable.[MyGrade] In ("A", "B", "C", "D");
It generates single character filed name from pivot clause.
My problem is I need use (sum([a]) + sum())/ (sum([a]) + sum() +
sum([c]) + sum([d])) in my query.
It seems Access does not let me use single character field name.

If the filed name more than one character works fine.
any workaround?
Your information is great appreciated,- Hide quoted text -

- Show quoted text -


yes, it returns null value. does null value affect?
it works for more than one character field name.

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top