我有以下两种格式的视图。
ProductId Version IsAvailable
123 1 Yes
124 1 No
125 1 Yes
126 1 No
ProductId Version IsShippable
123 1 Yes
124 1 Yes
125 1 No
127 1 Yes
我需要将这两个表合并为一个表:
ProductId Version IsAvailable IsShippable
123 1 Yes Yes
124 1 No Yes
125 1 Yes No
126 1 No Null
127 1 Null Yes
我该如何编写查询来实现这一目标?
答案 0 :(得分:1)
在两个视图之间使用完全外部联接,如下所示:
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("TableWithEMailAdresses", dbOpenSnapshot)
rs.FindFirst "EMailAdressColumn = '" & Me!EMailTextboxInput.Value & "'"
If rs.NoMatch Then
Msgbox "No Login for you!"
'Do stuff
Else
Msgbox "Login success!"
'Do other stuff
End If