
Adding a field to a table based on CrossTab Query
Andrew,
in the PIVOT field, make sure to include IN clause and supply values in your
column headings.
See SQL below.
good luck.
TRANSFORM nz(Sum([CommonSkill]))+0 AS [Value]
SELECT tmpPMCommon.PROJ_ID, Sum(tmpPMCommon.CommonSkill) AS TotalBB, "J0" AS
Sort, "Common Skills" AS [Desc], "45" AS lb
FROM tmpPMCommon
WHERE (((tmpPMCommon.TSD_CD) In ("YY","CN","BB")))
GROUP BY tmpPMCommon.PROJ_ID
PIVOT tmpPMCommon.IBB_DT In ( 09/01/1998, 09/02/1998, 09/03/1998,
09/04/1998, 09/05/1998, 09/06/1998, 09/07/1998, 09/08/1998, 09/09/1998,
09/10/1998, 09/11/1998, 09/12/1998, 09/13/1998, 09/14/1998);
Quote:
>Team,
>AAGH.
>How do I get the data to work over all runs so that I always get fields
1-7.
>I have thought about looking at the resulting table, check which fields
>exist and add new blank ones. But the code eludes me at present. I think
>it's called brain fade.
>TIA
>Andrew