• GilaMonster (5/13/2016)


    This looks like Oracle code.

    While some people do know Oracle, this is a SQL Server forum (as in Microsoft SQL Server), and that's what most answers will be written for.

    The DECODE is a big clue.