sql - Alias case statement -
i have stored procedure return negative number in id. (on purpose). in additional, have view shows table (simple select), don't want '-' appear in id column, mean, if number negative - want add letter 'a' id without '-'.
how can this?
select replace (id, '-', 'a') myid
or if wanting append 'a'
select replace (id, '-', '') + 'a' myid
Comments
Post a Comment