We have numbers coming form 2 different systems and the last character is different.
System 1 = A123451 and system 2 has A123450. They are the same number for our report but instead of making a separate column for one or the other and adding a 1 to it lets say, I thought about making a Select which would make fast work of it and also filter only for “YES” on the one table/TAB
But Excel ADO does not like it, where Access did, I made the SQL string in the QBE grid in Access and ran it to reurn results.
Any ideas how to appease the Excel ADO Gods?
TIA
DougP
System 1 = A123451 and system 2 has A123450. They are the same number for our report but instead of making a separate column for one or the other and adding a 1 to it lets say, I thought about making a Select which would make fast work of it and also filter only for “YES” on the one table/TAB
But Excel ADO does not like it, where Access did, I made the SQL string in the QBE grid in Access and ran it to reurn results.
Any ideas how to appease the Excel ADO Gods?
TIA
Code:
FileName = Application.ActiveWorkbook.Fullname
' open ADODB connection
With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=" & FileName & ";" & _
"Extended Properties=Excel 8.0;"
.CursorLocation = adUseClient
.Open
End With
'open recordset and
SQLString = "SELECT [Project ID], [Program ID], [Total Hours], [SOP Capital Status] " & _
"FROM SOP INNER JOIN Report ON left([Program ID],6) = left([Project ID],6) " & _
"WHERE ((([SOP Capital Status])='YES'));"
rs.Open SQLString, cn <<< Error
DougP