sql语句查询excel 2003表,求一sql语句
一个excel表格,4列,6万行左右。
例表:
A B C D
0 1 1 5
1 2 3 2
0 7 1 6
3 2 2 2
0 6 3 7
3 1 1 7
Dim lsSql As String
Dim lrRec As ADODB.Recordset
Dim ldbConn As New ADODB.Connection
ldbConn.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;Extended Properties=DSN=Excel Files;DBQ=" & "c:\1.xls; DefaultDir=c:\ ;DriverId=790;MaxBufferSize=2048;PageTimeout=5;"
ldbConn.Open
lsSql = "SELECT * "
lsSql = lsSql & "......."
Set lrRec = New ADODB.Recordset
lrRec.CursorLocation = adUseClient
lrRec.Open lsSql, ldbConn, adOpenForwardOnly, adLockReadOnly