TSQL Pivot Rotations using only REPLACE

Comments 0

Share to social media

Pivoting SQL Server tables is always awkward, even with the PIVOT and UNPIVOT operators. If you want to get the job done without GROUP BY or PIVOT, here is a way to do it using only REPLACE.

Load comments

About the author

Hugh Bin-Haad

See Profile

Hugh is both a distinguished expert in object-oriented conmputer languages, and a DBA who has spent sixteen years working with financial applications in the UK and the Middle-East, and been a delegate on the international ANSI committee for the standardisation of Relational Theory. Hugh is well-known in the Database world. He lectures in Relational Theory at Chiltern University UK. He is the author of many Journal articles and has co-authored several books on UML, SOLID, DRY, Object Modelling techniques and relational theory, as well as a definitive criticism of the black-and-white films of Ingmar Bergman.

Hugh Bin-Haad's contributions