SQL Server : error converting data type varchar to numeric

后端 未结 5 1941
谎友^
谎友^ 2020-12-25 12:36

I have a table:

Account_Code | Desc
503100       | account xxx
503103       | account xxx
503104       | account xxx
503102A      | account xxx
503110B               


        
5条回答
  •  -上瘾入骨i
    2020-12-25 13:25

    thanks, try this instead

    Select 
      STR(account_code) as account_code_Numeric,
      descr 
    from account 
    where  STR(account_code) = 1
    

    I'm happy to help you

提交回复
热议问题