Forum Replies Created

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

  • RE: Query help

    Again, I think more info would help but this will get the result you asked for.

    select

    stid

    ,max(ChrisName) ChrisName

    ,max(ChrisCity) ChrisCity

    ,max(ChrisCounty) ChrisCounty

    ,max(ChrisphoneNumber) ChrisphoneNumber

    from

    (select * from @Table) as src

    pivot

    (

    max(studwor)

    for stuName in (

    ChrisName

    ,ChrisCity

    ,ChrisCounty

    ,ChrisphoneNumber

    )

    ) as pvt

    group...

  • RE: Query help

    do you mean 100 columns or 100 rows? Assuming that you mean rows then how do you know those particular 6 out of the 100 belong together? Can you post...

  • RE: Query help

    Hi,

    This should get the required output, but if the stuName values change and there's more records in there then it won't work. In which case I can only think that...

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