无法解决 equal to 操作的排序规则冲突!(20分)

  • 主题发起人 主题发起人 heiqiqiou
  • 开始时间 开始时间
H

heiqiqiou

Unregistered / Unconfirmed
GUEST, unregistred user!
if object_id('temp..t2') is not null drop table t2
select std_price,right(prod_no,2) as prod_no into t2 from machine.dbo.ddrawnameitem where id='01
update xf_std set pin_price=t2.std_price
from xf_std a,t2
where a.prod_no=t2.prod_no

在执行的时候老是报 '无法解决 equal to 操作的排序规则冲突!' 的错误!
无法理解!
 
where id='01
是不是多了个'
update xf_std set pin_price=t2.std_price
from xf_std a,t2
where a.prod_no=t2.prod_no
可以简化一下
update xf_std set xf_std.pin_price=t2.std_price
from t2
where Xf_std.prod_no=t2.prod_no
 
if object_id('temp..t2') is not null drop table t2
select std_price,right(prod_no,2) as prod_no into t2 from machine.dbo.ddrawnameitem
update xf_std set pin_price=t2.std_price
from xf_std a,t2
where a.prod_no=t2.prod_no
一样的错误!
 
我是想达到这样一个目的:
从machine数据库中的ddrawnameitem表中查询出std_price,更新本地数据库xf_std表的pin_price,两个表的prod_no是相同的 !
不知道哪位有更好的方法能达到这个目的!
 
在WHERE X=X 后面加上 collate database_default 搞定
 
多人接受答案了。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
后退
顶部