以下存储过程不起作用,我已经尝试了一切但没有成功。请帮忙。
Sub Create_View()
Dim conn As ADODB.Connection
Set conn = Application.CurrentProject.Connection
conn.Execute "CREATE VIEW vw_RobPS AS " & _
"SELECT sid, " & _
"Lname, " & _
"Fname, " & _
"EmpStatus, " & _
"[Peax Update as of 6-18-15], " & _
"[Peax Update Date] " & _
"FROM Master_06-18-2015" & _
"WHERE [Peax Update Date] as PeaxUdDt is not null; "
Application.RefreshDatabaseWindow
ExitHere:
If Not conn Is Nothing Then
If conn.State = adStateOpen Then conn.Close
End If
Set conn = Nothing
End Sub
当我运行它时,我收到此错误消息:
运行时错误'-2147217900(80040e14)':FROM子句中的语法错误。
我找不到问题。
答案 0 :(得分:6)
WHERE
WHERE
子句"FROM [Master_06-18-2015] " & _
"WHERE [Peax Update Date] is not null; "