Cross-Tab Query

  • I'm having a difficult time with this cross-tab query. Any help appreciated. Data is:

    ID  Word

    1   dog

    2   cat

    1   run

    3   horse

    1   good

    3   gallop

    3   run

    2   bad

    3   mane

    I would like a select statement to return the following (order of words for an ID is not important, however, the number of words for an ID is not fixed)

    ID  Word1  Word2   Word3   Word4

    1   dog       run       good

    2   cat       bad

    3   horse    gallop    run        mane

    TIA,

    John

  • Of course you're having dificulty!  You need another Column Called "WordType" which would discern whether it's a Verb, Noun, etc.

    Data:
    ID     Word     Type
    1      Dog       Noun
    2      Cat       Noun
    3      Bird       Noun
    4      Good     Attribute?
    5      Run       Verb
    6      Mane     Attribute?
     
    CrossTab:
    ID     Noun     Verb    Attributes
    1      Dog       Run     Mane

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply