I am debuggin an old program. Can any one please tell me where that table is created "lcltblOMSCLTEXPORT". I check into SQL Server but i didnt find any table with that name. The select query which pulls data from Sybase table is working find in SQL Query Any Where but when i check the SQL Server i didnt find any table with that name "lcltblOMSCLTEXPORT" . Also there is no error in the program.

Thanks.

INSERT INTO lcltblOMSCLTEXPORT

(CE_PRIMARY_DEBTOR_ID,CE_DEBT_ID,CE_DEBT_NO,CE_CLT _ID,CE_CLT_REF_NO,CE_ENTERED_DATE,CE_LIST_DATE,CE_ SERV_DATE,CE_STATUS_DATE,

CE_ORIG_PRINC_AMT,CE_STATUS_CODE) SELECT

DEBT.PRIMARY_DEBTOR_ID,DEBT.DEBT_ID,DEBT.DEBT_NO,D EBT.CLT_ID,CLT_REF_NO,ENTERED_DATE,LIST_DATE,SERV_ DATE,STATUS_DATE,ORIG_PRI

NC_AMT,DEBT.STATUS_CODE FROM DEBT JOIN CLT on (DEBT.CLT_ID=CLT.CLT_ID) WHERE (CLT.CLT_ID LIKE 'HSBC03%',0)


Private Sub CommFunc_InsertSelectIntoLocalTable(TableName As String, FieldNames() As String, SelectSQL As String, Success As

Boolean, RecordsAffected As Long)
Dim SQL As String
' On Error GoTo eh
If Len(TableName) > 0 And UBound(FieldNames) >= 0 And UCase(Mid(SelectSQL, 1, 7)) = "SELECT " Then
SQL = "INSERT INTO lcltbl" & TableName & " (" & Join(FieldNames, ",") & ") " & SelectSQL
Debug.Print SQL
' Stop
AuthenticateConnection
With mDBConn
.CursorLocation = adUseClient
' .IsolationLevel = adXactCursorStability
.Execute "SET TEMPORARY OPTION ISOLATION_LEVEL = 0"
.Execute SQL, RecordsAffected
End With
Success = True
End If
Exit Sub
eh:
Success = False
End Sub