I have a column called 'status' in a MS SQL DB and I want to derive it based on a series of other fields. The logic that I want to use in the formula is as follows:
if (f3 = 1)
status = "3"
else if (f2 = 1)
status = "2"
else if (f1 = 1)
status = "1"
else
status = "0"
Can anyone please give me the code for this?
if (f3 = 1)
status = "3"
else if (f2 = 1)
status = "2"
else if (f1 = 1)
status = "1"
else
status = "0"
Can anyone please give me the code for this?