postgres中的to_number(text,number),即是把字符串text转为number的函数,但有时候用的时候经常碰到这样的错误:[Err] ERROR:  invalid input syntax for type numeric: " ",先直接上表吧:

  数据库中有两条记录的le_charge_building 是null的,其余的le_charge_building 都不是null

[已解决]疑问:关于postgres的to_number()

[已解决]疑问:关于postgres的to_number()

 

  于是我做下面的查询:

[已解决]疑问:关于postgres的to_number()

  所以,为什么呢?我已经都把le_charge_building可能是null或者""的都筛走了,为什么还是有这种报错?

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
  • 2021-08-13
  • 2021-10-29
  • 2021-08-23
  • 2021-07-11
猜你喜欢
  • 2021-05-21
  • 2021-11-17
  • 2021-10-08
  • 2021-11-14
  • 2021-09-13
  • 2021-05-16
相关资源
相似解决方案