mercredi 25 février 2015

Conditional Select for MS SQL


My table has 4 columns (name, A, B, C). I need to build a Select that has the following logic:


Select name, a as value1, b or or c as value2 from table


Logic:


A <> '' If B <> '' then value2 = b else c <> '' then value2 = c else value2 = ''





Aucun commentaire:

Enregistrer un commentaire