How to Replace Multiple Characters in Access SQL?

前端 未结 9 2275
北海茫月
北海茫月 2020-12-12 03:16

I\'m a novice at SQL, so hopefully someone can spell this out for me. I tried following the \"Replace Multiple Strings in SQL Query\" posting, but I got stuck.

I\'

9条回答
  •  失恋的感觉
    2020-12-12 03:51

    Don't think Access supports the CASE statement. Consider using iif:

    iif ( condition, value_if_true, value_if_false )
    

    For this case you can use the REPLACE function:

    SELECT 
        REPLACE(REPLACE(REPLACE(yourfield, '#', ''), '-', ''), '/', '') 
        as FieldName
    FROM
        ....
    

提交回复
热议问题