`
一笑_奈何
  • 浏览: 66740 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

oracle ORA-01722无效数字

阅读更多
    我有一个表table_a 里面有一个字段field中保存了用户的编号,编号使用逗号隔开,例如:379,380,386,390,503我做查询select * from user where user_id in (379,380,386,390,503); 是正确的。 但是当我查询 select * from user where user_id in (select field from table_a where id = 1);时却报oracle ORA-01722无效数字

答:select * from user where INSTR( (select ',' || field || ',' from table_a where id = 1), ',' || TRIM(TO_CHAR(user_id )) || ',' ) > 0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics