• hi,

    How do you know that "6U7000000 443 IRA FBO Loelei C Dehart DecD W00001" is 1 row and not any other combination?

    Try to add row_number to the query, the row number will give you another group by field.

    something like this

    select custAcctNo,custID,shortName,accountTitle

    from

    (select Acmnumber, dataset, stringvalue, row_number() over (partition by Acmnumber, dataset order by FIELD) as rnum from vacmvariables

    where acmnumber = 153588)

    up pivot ( max (stringvalue ) for dataset in ( custAcctNo,custID,shortName,accountTitle)) as pvt

    order by acmnumber