I have a teradata table. Now I need to add a column, say, Flag and insert values into the Flag column which will depend on say, Sales. Flag=1 if Sales greater than x or Flag=0.
Here is the structure of Table at present
Sales Date
10 11/11/1987
20 12/13/1987
I want it like the following way
Sale Date Flag
10 11/11/1987 0
20 12/13/1987 1
I tried to look for such problems on the forums but couldn’t find any. Excuse if you find any duplicate problems.
What you want to use here is a
CASEstatement: