请大家支招,做了通行证,可如何合并重复的账号.
以前有两个站点,用的都是各自的账号表,现在要合并,有7000多重复的账号,怎么合并啊,请大家支招,看有什么好的办法?
------解决方案--------------------写个文件导入不就行了吗?
我的做法
dim import_field(17) ' '要导入的表字段,被导入的表字段
import_field(0) = "ID,userNo "
import_field(1) = "姓名,realName "
import_field(2) = "最初购买时间,first "
import_field(3) = "名下客户,client "
import_field(4) = "地址,address "
import_field(5) = "手机,phone1 "
import_field(6) = "电话,phone2 "
import_field(7) = "小灵通,phone2 "
import_field(8) = "成交人,bargain "
import_field(9) = "最后购买详情,lastbuy "
import_field(10) = "金额,money "
import_field(11) = "总购买套数,count "
import_field(12) = "总金额,allmoney "
import_field(13) = "最后购买时间,last "
import_field(14) = "较对人,man1 "
import_field(15) = "复核人,man2 "
import_field(16) = "主管,man3 "
dim import_conn, import_rs
Set import_conn = server.CreateObject( "ADODB.Connection ")
Set import_rs = server.CreateObject( "ADODB.Recordset ")
import_conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Server.MapPath( "import.mdb ") & "; "
import_rs.open "select * from [all] order by ID ", import_conn, 1, 1 ' '打开要导入的表
for i = 1 to import_rs.recordcount
rs.open "select * from t_user where userNo = " & import_rs( "ID "), conn, 1, 3
if rs.recordcount = 0 then '如果记录不存在为添加,否则为更新
rs.addnew
end if
for j = 0 to 16 ' ' 1 to 16
rs(split(import_field(j), ", ")(1)) = import_rs(split(import_field(j), ", ")(0))
next
' ' '其它字段
' ' 'rs( "datetime ") = now()
rs.update
rs.close
import_rs.movenext
next
import_rs.close
import_conn.close
set import_rs = nothing
set import_conn = nothing
'删除临时文件
deleteFile Server.MapPath( "import.mdb ")
------解决方案--------------------学习一下
------解决方案--------------------你不妨模仿一下搜狐的方法,他们跟CHINAREN合并时,在原SOHU会员名后跟上了@sohu.这个就可以区分了.
------解决方案--------------------一般来说都是加前后追
系统宠大功能复杂采用中央库分权