Re: Crosstab Query??

Tech-Archive recommends: Speed Up your PC by fixing your registry



Thanks for the prompt response. I have the following written:
TRANSFORM PCS_Languages.LANGUAGE_CODE
SELECT NO_PCS_ID.id_of_providers
FROM NO_PCS_ID INNER JOIN PCS_Languages ON
NO_PCS_ID.language_k_of_languagereferences_provaddr =
PCS_Languages.LANGUAGE_NAME
GROUP BY NO_PCS_ID.id_of_providers
ORDER BY NO_PCS_ID.id_of_providers
PIVOT language_code;

This gives kind of what I'm looking for, however, since there are seven
language codes I get the id_of_providers column plus one column for each
language code. Each unique id_of_providers value will have no more than
three language codes tied to it. Is there a way to narrow the results to the
id_of_providers column and then three "language" columns?

"Michel Walsh" wrote:

You have a third field telling which language the record is about? If so, if
it is called languageID, then:
( I assume the second field is called comment )


TRANSFORM LAST(comment)
SELECT id
FROM yourTableName
GROUP BY id
PIVOT languageID



Hoping it may help,
Vanderghast, Access MVP



"smith_gw" <smithgw@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:32D3D212-60D0-4623-954E-3A1C105F6644@xxxxxxxxxxxxxxxx
I have a table that includes and ID and language field where multiple
records
include the different languages. Some ID's have up to three languages so
it
looks like:
ID1,language1
ID1,language2
ID1,language3
ID2,language1
ID2,language2

I am trying to create a query that instead would list them as:
ID1, language1, language2, language3.
ID2, language1, language2, null/blank
ID3, language1, null/blank, null/blank.

Any assistance would be greatly appreciated.




.



Relevant Pages

  • Re: [OT] code is data
    ... Still a programming language. ... So if we can transform documents, images and XML, why not sourcecode? ... You mean like 'converting' javascript to python or python to ruby (or ... Now if one would equate standardized code exchange between languages and ...
    (comp.lang.python)
  • Re: Office 2003 SP1 Instal Failure
    ... 1026, found language 1033. ... patch transform #pro11n_BGR. ... Log file is 2,4 MB. ... package download, client package but nothing. ...
    (microsoft.public.officeupdate)
  • Re: Manually parsing quoted characters
    ... i.e. only splitting on a | if it's not preceded by a \ ... The rest of my code to parse my simple language works this way, but naively I thought it would be possible to simply hack -constructs into it. ...
    (comp.lang.perl.misc)
  • Re: Is Python a Zen language?
    ... A tool language is a language that is, ... a *tool* for programming a computer. ... "Transform your way of thinking" from what? ... All Python changed my thinking about was how to better program in Python. ...
    (comp.lang.python)
  • Re: Is Python a Zen language?
    ... A tool language is a language that is, ... a *tool* for programming a computer. ... Most languages in the Algol family are tool languages. ... "Transform your way of thinking" from what? ...
    (comp.lang.python)