【问题标题】:I'm having this error in ms access query input must contain at least one table or query我在 ms 访问查询输入中遇到此错误必须包含至少一个表或查询
【发布时间】:2020-06-10 18:13:31
【问题描述】:

我正在尝试从其他表中插入单个值,但出现此错误。如果您知道如何修复,请修复我的代码...

检查一下:

INSERT INTO Library_Records_DB(Book_Name, Student_Roll_Num, Student_Name, Student_Department, Lending_Date)
values
(
"English", 
747, 
(select Full_Name from GCUF_Students_DB_Morning where Roll_Num=747), 
(select Department from GCUF_Students_DB_Morning where Roll_Num=747), 
"01-jan-2020"
)

【问题讨论】:

  • 您真的将日期存储为文本吗?

标签: sql ms-access sql-insert ms-access-2016


【解决方案1】:

我会尝试类似:

INSERT INTO Library_Records_DB
    (Book_Name, Student_Roll_Num, Student_Name, Student_Department, Lending_Date)
select "English", Roll_Num, Full_Name, Department, "01-jan-2020"
from GCUF_Students_DB_Morning
where Roll_Num=747

(但我不知道你的数据。选择会返回一行吗?)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-30
    • 1970-01-01
    • 1970-01-01
    • 2021-12-08
    相关资源
    最近更新 更多