vendredi 23 novembre 2018

Multiple Else Statement Logic in SQL

Hi I have a question on using multiple else statements without re-using if statements.

If FieldA = '14'
     Set FieldX = '1'
Else If FieldB ='15'
     Set FieldX = '2'
Else If FieldC = '16'
     Set FieldX ='3'
Else
     Set FieldX = '10'

My question is, say both FieldB = 15, and FieldC = 16. So the last two conditions are satisfied but the first isn't. Does the line stop as soon as the Else statement is met? Or will it continue to the next Else statement to test for fieldC?

Aucun commentaire:

Enregistrer un commentaire