使用其他文件的其他列更新文件的一列时,SQL Server中的某些语法错误 [英] Some syntax error in SQL server when updating one column of a file with other column of an other file

查看:100
本文介绍了使用其他文件的其他列更新文件的一列时,SQL Server中的某些语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

some syntax error in sql server when updating one column of a file with other column ofa other file



我的代码是


my code is

update invDB.sum(itmqty)=stkDB.itmsl_rtn from invDB inner join stkDB on invDB.itemid=stkDB.itmcode where stkDB.itmcode=1333





我尝试了什么:



我用google搜索解决方案但没有合适的结果



What I have tried:

I googled for solution but came with no suitable result

推荐答案

嗯。你似乎试图为一个函数的结果赋值?

你是不是要反过来做这个任务?

Um. You seem to be trying to assign a value to the result of a function?
Did you mean to do the assignment the other way around?
UPDATE stkDB.itmsl_rtn = invDB.SUM(itmqty) FROM ...


这篇关于使用其他文件的其他列更新文件的一列时,SQL Server中的某些语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆