Olivierが書いたように、SQLだけではそれができません。最も簡単な方法は、フィールドコレクションをループし、各フィールドで[field name] <> '..'
のような基準を使用してのみに'..'
という列を見つけることです。
Sub AnalyzeTable()
Dim db As DAO.Database
Dim td As DAO.TableDef
Dim fld As DAO.Field
Dim sCrit As String
Dim n As Long
Set db = CurrentDb
Set td = db.TableDefs("tHistorical")
For Each fld In td.Fields
' only check text columns
If fld.Type = dbText Or fld.Type = dbMemo Then
' For each field, count the records *not* containing '..'
sCrit = "[" & fld.Name & "] <> '..'"
n = DCount("*", "tHistorical", sCrit)
' if that number is 0, the column only contains '..' and can go
If n = 0 Then
' this will go into the Immediate window, use Ctrl+G to open it
Debug.Print fld.Name
End If
End If
Next fld
End Sub
"データセット"とは何かわかりません - 1つのテーブル(手動で各列を手動でクエリするのが最も高速です)または多くのテーブルがありますか? – Andre
テーブルが1つ。私は各列を照会するだろうが、私はそこに100列以上のより速い解決策があることを望んでいた。 – Salviati