Welcome to the board
I can't really provide anything substantive to you without know what the error message is, when do you encounter it, etc. I looked through your code for obvious danger signs and didn't really see any, I refactored your code in process (posted below if you want it.)
Also when you are posting back the error message, make sure you also post the procedure: SQL_WHERE
[vba]Option Explicit

Public Sub Convert()
Dim qt As Excel.QueryTable
Dim SQL1 As String, connstring As String
Dim ws As Excel.Worksheet
Set ws = Excel.ActiveSheet
Application.EnableEvents = False
Application.ScreenUpdating = False
ws.Columns("A:C").Insert Shift:=xlToRight
sql_filter = SQL_WHERE(ws.Range("D1:" & ws.Range("D1").End(xlDown).Address)) 'what is this doing?
SQL1 = "xxxxxxx"
connstring = "ODBC;DSN=xxxx;UID=xxxx;pwd=xxxx;"
Set qt = ws.QueryTables.Add(Connection:=connstring, Destination:=ws.Range("A1"), Sql:=SQL1)
qt.Refresh
With Excel.Intersect(ws.UsedRange, ws.Range("C:C"))
.Formula = "=VLOOKUP(D1,A:A:B:B,2,0)"
.Value = .Value 'This is the same as copy/paste-special:values
End With
ws.Columns("A:B").Delete Shift:=xlToLeft
qt.Delete
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub[/vba]