crosstab query column heading

  • Thread starter Thread starter inungh
  • Start date Start date
I

inungh

I have a crosstab query and would like to change column heading.

The data are "YES" ad "NO" in the table.
The PIVOT clause put the "YES" and "NO" on the heading column.

Is it possible to show "Met" for "YES" and "Not Met" for "NO" like
"as" in s select query?

Like

PIVOT MyField in ("YES" as "Met", "NO" as "Not Met")


Your information is great appreciated,
 
Not directly. Create a query that changes the Yes and No answers to Met and
Not Met. An IIf could do it.

IIf([TheField] = Yes, "Met", "Not Met")

In the above I'm assuming that TheField is a Yes/No data type. If it's text
where Yes and No are typed out, Put quotation marks around "Yes".

Save the query.

Next create a crosstab query based on the first query.
 
Try this for the PIVOT --
PIVOT IIf([YourField]=-1,"Met","Not Met");

--
Build a little, test a little.


Jerry Whittle said:
Not directly. Create a query that changes the Yes and No answers to Met and
Not Met. An IIf could do it.

IIf([TheField] = Yes, "Met", "Not Met")

In the above I'm assuming that TheField is a Yes/No data type. If it's text
where Yes and No are typed out, Put quotation marks around "Yes".

Save the query.

Next create a crosstab query based on the first query.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


inungh said:
I have a crosstab query and would like to change column heading.

The data are "YES" ad "NO" in the table.
The PIVOT clause put the "YES" and "NO" on the heading column.

Is it possible to show "Met" for "YES" and "Not Met" for "NO" like
"as" in s select query?

Like

PIVOT MyField in ("YES" as "Met", "NO" as "Not Met")


Your information is great appreciated,
.
 
Back
Top