0
我已經將數據庫鏈接到Sharepoint,並且每一天我都會切斷 - 我已經爲它創建了一個簡單的宏。因此我有許多表稱爲「進度跟蹤」&適當的日期。訪問VBA - 建立一個查詢,連接數據庫中的所有表
我需要什麼這是一個查詢,比較所有表中的一列。
它不應該是這樣的:
Select
a.[Unique identifier], a.[Escalation reason],
b.[escalation reason], ...,
z.[escalation reason]
from
([Progress tracking & date a
left join
[Progress tracking * b on a.[unique identifier] = b.[unique identifier])
left join
[Progress tracking * c on a.[unique identifier] = c.[unique identifier])
...
left join
[Progress tracking * z on a.[unique identifier] = z.[unique identifier]
我不知道這是否可能使用VBA代碼。我開始在db.tabledefs
的每個表格中使用,但是我不知道如何繼續。
我將不勝感激任何建議
問候
您是否考慮過將[tracking date]字段設置爲「= Date()」的單個表?這樣,當您導入表格時,字段默認爲當天,然後您只需針對所需的日期範圍運行查詢。 –