它的Access数据库..
我有一个库表,其中Autnm Topic Size Cover Lang是外键
每条记录实际上是一本书,具有其属性,例如作者和资料。我不太确定我什至使用了正确的 JOIN .. 非常新的“复杂”SQL :)
SELECT Library.Bknm_Hebrew, Library.Bknm_English, Library.Bknm_Russian, Library.Note,
Library.ISBN, Library.Pages, Library.PUSD, Author.ID AS [AuthorID],
Author.Author_hebrew AS [AuthorHebrew],
Author.Author_English AS [AuthorEnglish],
Author.Author_Russian AS [AuthorRussian], Topic.ID AS [TopicID],
Topic.Topic_Hebrew AS [TopicHebrew], Topic.Topic_English AS [TopicEnglish],
Topic.Topic_Russian AS [TopicRussian], Size.Size AS [Size],
Cover.ID AS [CoverID], Cover.Cvrtyp_Hebrew AS [CoverHebrew],
Cover.Cvrtyp_English AS [CoverEnglish], Cover.Cvrtyp_Russian AS [CoverRussian],
Lang.ID AS [LangID], Lang.Lang_Hebrew AS [LangHebrew],
Lang.Lang_English AS [LangEnglish],
FROM Library INNER JOIN Author ON Library.Autnm = Author.ID
INNER JOIN Topic ON Library.Topic = Topic.ID
INNER JOIN Size ON Library.Size = Size.ID
INNER JOIN Cover ON Library.Cover = Cover.ID
INNER JOIN Lang ON Library.Lang = Lang.ID
WHERE (TopicID=13 AND LangID=1) ORDER BY LangID ASC
编辑: 插入@Guffa建议的括号后,我收到了一个新错误:
Too few parameters. Expected 3.