sql中将数据类型 nvarchar 转换为 numeric 时出错怎么办

zhuailcz 2013-07-10 08:03:16
select *
from organization o,customer c
where c.customer_square=o.structid

customer_square是nvarchar类型,structid是numeric类型。求大神啊!!在线等!
...全文
359 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
蝈蝈(GuoGuo) 2013-07-11
  • 打赏
  • 举报
回复
表设计有问题,通过这些方式可以查询到,但是会影响到系统的性能(进行表扫描)
叶子 2013-07-10
  • 打赏
  • 举报
回复
select * 
from organization o,(select * from customer where isnumeric(customer_square)=1) c 
where c.customer_square=o.structid
唐诗三百首 2013-07-10
  • 打赏
  • 举报
回复

select * 
 from organization o,customer c 
 where c.customer_square=cast(o.structid as nvarchar)
shoppo0505 2013-07-10
  • 打赏
  • 举报
回复
select * from organization o,customer c where c.customer_square= convert(nvarchar(10),o.structid)

22,210

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧