![]() ![]() ![]() ![]() |
|||||
|
|||||
樓主 Fishball ![]()
![]() |
一個是 tblCheque 我想做的是..找到 在tblAccountTransactionEntries 的 CHEQUE NO 更新 tblCheque 的 SET SubjectCode = 'A' Msg 512, Level 16, State 1, Line 25 Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
搜尋相關Tags的文章:
[ SQL UPDATE 多對多問題 ] ,
本篇文章發表於2019-08-04 14:14 |
別忘捐VP感謝幫助你的人 | 新手會員瞧一瞧 |
1樓 |
update tblCheque set SubjectCode = 'A' where ChequeNo = (select ChequeNo from tblAccountTransactionEntries)
多的 where 應該會有二組以上的條件才可以的,否則會全部一起改掉。
本篇文章回覆於2019-08-04 16:16
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
2樓 |
應該改用in或exists,不能用"="
例 update tblCheque set SubjectCode = 'A' where ChequeNo in (select ChequeNo from tblAccountTransactionEntries)
本篇文章回覆於2019-08-05 09:35
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
3樓
最有價值解答
pilipala ![]() |
請參考看看
本篇文章回覆於2019-08-05 11:21
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
回覆 |
如要回應,請先登入. |