cross tab query from Access
From: Aleks (axiaxi2003_at_hotmail.com)
Date: 07/29/04
- Next message: David Portas: "Re: Calculation Result Different btwn SQL 2k & Excel"
- Previous message: SqlJunkies User: "New to SQL & Reporting Services"
- Next in thread: Jack D. Ripper: "Re: cross tab query from Access"
- Reply: Jack D. Ripper: "Re: cross tab query from Access"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Jul 2004 02:27:55 -0400
Hi,
I am still working on this cross tab query, I started by using Access,
created a query and called it "jen", this is the query:
SELECT Atts.UserId, Users.MailStr, Users.MaidenNm, Cases.Id, Cases.CaseId
FROM (Atts INNER JOIN Cases ON Atts.CaseId=Cases.Id) INNER JOIN Users ON
Atts.UserId=Users.UserId;
Then created a cross-tab query using the wizard, this is the result:
TRANSFORM Max(jen.UserId) AS MaxOfMailStr
SELECT jen.Id
FROM jen
GROUP BY jen.Id
PIVOT jen.UserId;
This will give me the desired result, by grouping by cases.id and it
displays the user.id for each one of the records. Problem is that when I try
to run the second query on sql query analyzer it doesnt work because there
is no "jen" object.
How can I combine both queries into one to run it in query analizer and get
the same result ?
THANKS IN ADVANCE !
Z
- Next message: David Portas: "Re: Calculation Result Different btwn SQL 2k & Excel"
- Previous message: SqlJunkies User: "New to SQL & Reporting Services"
- Next in thread: Jack D. Ripper: "Re: cross tab query from Access"
- Reply: Jack D. Ripper: "Re: cross tab query from Access"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|