为了账号安全,请及时绑定邮箱和手机立即绑定

sql server, left join on,on附近有语法错误

sql server, left join on,on附近有语法错误

白衣染霜花 2019-04-08 10:04:41
select cast(Service_Order_No as nvarchar)+CAST(Item_No as nvarchar) as 'Key1', Service_Order_No, Item_No from dbo.GH_Billing_ID_TH_MY_IN as A left join (select cast([Service Order ID] as nvarchar)+CAST([Service Order Line] as nvarchar) as 'Key2', [Service Order ID],[Service Order Line] from dbo.SO_Raw_All as B) on A.Key1= B.Key2;提示:消息 156,级别 15,状态 1,第 8 行关键字 'on
查看完整描述

3 回答

?
函数式编程

TA贡献1807条经验 获得超9个赞

select (cast(Service_Order_No as nvarchar)+CAST(Item_No as nvarchar) )as 'Key1',

Service_Order_No

 

这个地方错了

对应的,这个地方也错了

select (cast([Service Order ID] as nvarchar)+CAST([Service Order Line] as nvarchar)) as 'Key2',


查看完整回答
反对 回复 2019-04-09
  • 3 回答
  • 0 关注
  • 1073 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信