query with crosstab subquery

I want to create a single query of 2 query.

note : this is an simple example of what i want to do not the real example.

this is my subquery named SubQuery1

TRANSFORM Count(dbo_Call.Call_ID) AS CompteDeCall_ID
  SELECT dbo_Call.Call_EnteredBy
  FROM (
   SELECT dbo_Lang.Lang_Id, dbo_Lang.Lang_Text
   FROM dbo_Lang
   WHERE (((dbo_Lang.Lang_Tag)="LST_CALLUDF3") AND ((dbo_Lang.Lang_Flags)=0))
   ORDER BY dbo_Lang.Lang_Id) [reqPlage] INNER JOIN dbo_Call ON reqPlage.Lang_Id = dbo_Call.Call_LST_CALLUDF3
   GROUP BY dbo_Call.Call_EnteredBy PIVOT reqPlage.Lang_Text

if i do SELECT * FROM SubQuery1 all work fine.

but now i try to do a single query out of this without the subquery1
so I do this

SELECT * FROM (
TRANSFORM Count(dbo_Call.Call_ID) AS CompteDeCall_ID
  SELECT dbo_Call.Call_EnteredBy
  FROM (
   SELECT dbo_Lang.Lang_Id, dbo_Lang.Lang_Text
   FROM dbo_Lang
   WHERE (((dbo_Lang.Lang_Tag)="LST_CALLUDF3") AND ((dbo_Lang.Lang_Flags)=0))
   ORDER BY dbo_Lang.Lang_Id) [reqPlage] INNER JOIN dbo_Call ON reqPlage.Lang_Id = dbo_Call.Call_LST_CALLUDF3
   GROUP BY dbo_Call.Call_EnteredBy PIVOT reqPlage.Lang_Text
) SubQuery1

this code dont work... it return syntax error form clause and select the TRANSFORM word, so how i could write it to make it work in a single query?
numerissAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nico5038Commented:
Hmm, is indeed a problem, but why you you need to select from a crosstable query in another query ?
In general limiting the basic data will give the needed column headers...

Nic;o)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
numerissAuthor Commented:
because these query are dynamic and i want to do

rs.open myQuery

and i would like to do it without having to add a temp subquery...
0
nico5038Commented:
I proposed to use a WHERE in your an embedded query to extract just those rows needed by limiting the "column value".
What's the select you need on this crosstable query ?

Nic;o)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.