Hi - Here is an extract of by code to insert new data into a table (BOData). Because the source data has the potential to contain the same data multiple times, I would like to amend my code so that if 'DataDate' and 'Avaya' already exist in the table - it updates (or ignores). Ive seen a few other examples which dont really fit my way of coding. Thanks!!
Code:
sSQL = "INSERT INTO BOData (DataDate, Avaya, Staffed, SiebelName)" & _
"VALUES ('" & ActiveSheet.Range("A3") & "', '" & ActiveCell.Offset(0, -1).Value & "', '" & ActiveCell.Offset(0, 1).Value & "', '" & SN & "');"
'Edit the data using ADO
Set rsData = New ADODB.Recordset
rsData.Open sSQL, sConnect, _
adOpenForwardOnly, adLockOptimistic, adCmdText
Set rsData = Nothing