SQL - Replacing an is null integer with a varchar

前端 未结 1 1877
死守一世寂寞
死守一世寂寞 2021-01-17 06:53

I am trying to replace a column with a new varchar string if there is null values in it in a select statement:

(personid + ISNULL(personid, \'no         


        
相关标签:
1条回答
  • 2021-01-17 07:41

    Replace this:

    (personid+ISNULL(personid,'no person'))
    

    With this:

    (ISNULL(CAST(personid as varchar(31)),'no person')) AS personId
    
    0 讨论(0)
提交回复
热议问题