Need help on my cross query

nilses

Registered User.
Local time
Today, 01:59
Joined
Jan 2, 2003
Messages
45
Hello,

I have a problem with a cross query. I use two table. My first table is built dynamically since a form. My second table is a table which gathers all the cases that I can find in one of my fields of the table.

"Tbl: DataBase Générale" - This table is my table built since a form. In this table I have a field which is named "CodeReparationsCourt"

"TblCodeReparation" - This table gathers all the cases which I can find in the table concerning this field "CodeReparationsCourt" in table "Tbl: DataBase Générale" .

My problem is that when I launch my crossed query, I have a field which will be created automatically and which named "<>". how to remove the Other field. How to make delete this column?.

Could you help me.

I've attached my database

Nilses

I 've posted this question on the UtterAccess web site but nobody has an answer
 

Attachments

Because of the outer join you could receive Null values in type, for which Access will use <> in the column heading. You could set fixed column headings in the crosstab query or use the Nz function, for returning an appropriate value in case of an empty field.
Code:
TRANSFORM NullDonneZéro(Count([G].[No_Appel])) AS CompteDeSerie
SELECT
  Nz([M]![CodeReparationCourt],'AUTRES') AS [Module]
, Count(G.No_Appel) AS Total
FROM [DataBase: Type de Module] AS M LEFT JOIN
  [Tbl: DataBase Générale] AS G ON
    M.CodeReparationCourt = G.CodeReparationsCourt
GROUP BY Nz([M]![CodeReparationCourt],'AUTRES')
PIVOT Nz([Type],0);
 
Hello,

Thank you Nouba for your assistance.

You are right, it is well my outer join which poses problem. I used the technique with your NZ.

It there not of solution to my problem to remove this column.

It is a pity which there is not a word in SQL for saying for example SELECT * FROM MyBase EXCEPT this field!! : -)

Nilses
 
Hi Nilses,

you could try setting a Where clause in your crosstab query. I.e. WHERE G.Type Is Not Null and remove the Nz function around the type field.
 

Users who are viewing this thread

Back
Top Bottom