【发布时间】:2018-01-27 09:33:34
【问题描述】:
好吧,因为我对 MS Access 完全陌生,所以被困了几天。
假设我有三个表:
- OrderTable(包含字段:otID 作为自动编号的主键、custID、Ref)。
- CustomerTable(包含字段:custID 作为自动编号的主键、custName、custPhone 和 custEmail)。
- OP-tMain(包含字段:custName、custPhone、custEmail 和 Ref)。
所有数据都存储在 Excel 中,我将使用 OperationTable 在 Access 中处理和存储数据。
我可以执行 UPDATE QUERY 来更新 CustomerTable 就好了。更新 CustomerTable 后,我需要更新订单表。我面临的问题是,在 OrderTable 中,我省略了 custName、custPhone 和 custEmail,只使用了 custID(我相信这是正确的做法)。任何人都可以帮助我如何更新/插入来自 OP-tMain 的数据并从 CustomerTable 中提取相应的 cID?
编辑。此处上传的示例文件 ==> https://drive.google.com/file/d/1fK3IDEd54Jfr6c-U2s5Bnm4TeK2TQZnM/view
【问题讨论】:
标签: sql ms-access sql-update