Hello everyone,
I'm having a problem with trying to check a value from one column and add a value to the next column based on what the first column is. Below are my to CASE statements. What I need is to make field IN_OUT either "IN" for when field UpDnGrd is "Upgrade" and "Out" for when UpDnGrd is "Downgrade"
Kinda like this:
IF UpDnGrd = "U" THEN make IN_OUT = IN
OR
IF UpDnGrd = "D" THEN make IN_OUT = OUT
ELSE keep the original value of IN_OUT which will always be either IN or OUT
see below example of my current CASE statement. Just want to know how to change the value of IN_OUT based on what the value of UpDnGrd is.
=============== =============== =============== ======
CASE sv7.InOut
WHEN 'I' THEN 'IN'
WHEN 'O' THEN 'OUT'
END AS IN_OUT,
CASE sv11.S11M14
WHEN 'D' THEN 'Downgrade'
WHEN 'U' THEN 'Upgrade'
ELSE ' '
END AS UpDnGrd
=============== =============== =============== ======
Thank YOU!
I'm having a problem with trying to check a value from one column and add a value to the next column based on what the first column is. Below are my to CASE statements. What I need is to make field IN_OUT either "IN" for when field UpDnGrd is "Upgrade" and "Out" for when UpDnGrd is "Downgrade"
Kinda like this:
IF UpDnGrd = "U" THEN make IN_OUT = IN
OR
IF UpDnGrd = "D" THEN make IN_OUT = OUT
ELSE keep the original value of IN_OUT which will always be either IN or OUT
see below example of my current CASE statement. Just want to know how to change the value of IN_OUT based on what the value of UpDnGrd is.
=============== =============== =============== ======
CASE sv7.InOut
WHEN 'I' THEN 'IN'
WHEN 'O' THEN 'OUT'
END AS IN_OUT,
CASE sv11.S11M14
WHEN 'D' THEN 'Downgrade'
WHEN 'U' THEN 'Upgrade'
ELSE ' '
END AS UpDnGrd
=============== =============== =============== ======
Thank YOU!
Comment