sql server 2014 Analytical data

  • I have data as below

    Data is as shown below where every 4 row gets repeated

    IDValue

    AAA

    BBB

    CCC

    AAD

    BBE

    CCF

    AAG

    BBH

    CCI

    I need data as per below format

    IDValue1Value2Value3

    AAADG

    BBBEH

    CCCFI

    Please guide me what needs to be done pivot did not work neither transpose

    Thanks in advance.

  • This article may get you on your way

    http://www.sqlservercentral.com/articles/T-SQL/63681/

    Hint :

    SELECT ID,

    Value,

    ROW_NUMBER() OVER (PARTITION BY ID ORDER BY Value) rn

    FROM <yourtablename>

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

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

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