这是我的sql代码,如果有人可以帮助我查看它以及为什么它没有响应并给出错误消息。请注意,关系是:table1
和table2
由ResetFrequency
连接; table1
和table3
由AccountNumber
连接。
SELECT table1.EffectiveDate, table2.ResetFrequency, table3.Loan
FROM (table1 LEFT JOIN table2 ON table1.ResetFrequency = table2.ResetFrequency)
INNER JOIN table3 ON table1.AccountNumber = table3.AccountNumber
WHERE (table1.EffectiveDate) = [Enter Date: mm/dd/yyy];
答案 0 :(得分:0)
使用以下格式:
SELECT z.EffectiveDate, z.ResetFrequency, table3.Loan
FROM (SELECT Table1.EffectiveDate, table2.ResetFrequency, table1.AccountNumber
FROM table1
LEFT JOIN table2 ON table1.ResetFrequency = table2.ResetFrequency)z
INNER JOIN table3 ON z.AccountNumber = table3.AccountNumber
WHERE (z.EffectiveDate) = [Enter Date: mm/dd/yyy];
答案 1 :(得分:0)
只需删除括号或括号
即可SELECT table1.EffectiveDate, table2.ResetFrequency, table3.Loan
FROM table1 LEFT JOIN table2 ON table1.ResetFrequency = table2.ResetFrequency
INNER JOIN table3 ON table1.AccountNumber = table3.AccountNumber
WHERE table1.EffectiveDate = mm/dd/yyy;