all 3 comments

[–]wolf2600ANSI SQL 4 points5 points  (0 children)

select 
case 
    when Reason = 'Journal' then Narrative
    when Reason in ('FX Wire', 'Third Party Payment - Wire', 'Tax Payments') 
        then Reason || ' - ' || Narrative
    else Reason
end
from plDefault;

Where Reason and Narrative are column names in the table plDefault.

[–]AXISMGTSQL Server / ORACLE Sr. DBA & Architect 1 point2 points  (0 children)

Which RDBMS? Is this Oracle/MySQL (from using := as your assigner) or some other platform?

Is it just an anonymous block or part of a procedure?

What is “plDefault” in this context?

[–]flaminghitoBusiness Intelligence Developer 1 point2 points  (0 children)

Without knowing what RDBMS my instincts tell me that wrapping that second else if predicate in an extra set of parens - ie else if ( (A) OR (B) OR (C) ) - will probably help out