- Common and currently testing out..
- First insert the excel sheet data into DB..then query by following
Expand|Select|Wrap|Line Numbers
- select distinct id,mobilenumber from scrubmaster where calltablename=<calltablename given by the uploader>
Expand|Select|Wrap|Line Numbers
- For jj As Integer = 0 To ds3.Tables("dup").Rows.Count - 1
- stor1 = "SELECT count(mobilenumber), calltablename from scrubmaster WHERE mobilenumber =<mobilenumber> and flag is NULL GROUP BY calltablename"
- da3 = New OleDbDataAdapter(stor1, con3)
- da3.Fill(dse3, "dupp")
Expand|Select|Wrap|Line Numbers
- If dse3.Tables("dupp").Rows(0).Item(0) > 1 Then
- dupcountid += 1
- stor2 = "update scrubmaster set flag='ID' where ID=" & ds3.Tables("dup").Rows(jj).Item(0) & " and flag IS NULL"
- comm.Connection = con3
- comm.CommandText = stor2
- comm.ExecuteNonQuery()
- stor2 = ""
- End If
Expand|Select|Wrap|Line Numbers
- If dse3.Tables("dupp").Rows.Count > 1 Then
- dupcounted += 1
- stor2 = "update scrubmaster set flag='ED' where ID=" & ds3.Tables("dup").Rows(jj).Item(0) & " and flag IS NULL"
- comm.Connection = con3
- comm.CommandText = stor2
- comm.ExecuteNonQuery()
- stor2 = ""
- End If
- stor1 = ""
- Next
Any good logic pls or correct my logic?