分别拿dw中当前数据条目的A,B,C列同已声明的datastore中N条数据的E,F,G列的值比较
如果都相等匹配则dw.setitem(row,D,"H"),如何写?
------解决方案--------------------
假设所以列都是字符串型的:
long ll_find, i, ll_rc
ll_rc = dw.rowcount()
for i = 1 to ll_rc
ll_find = lds.find("E = '" + dw.getitemstring(i,'A') + "' and F = '" + dw.getitemstring(i,'B') + "' and G = '" + dw.getitemstring(i,'C') + "'",1, lds.rowcount())
if ll_find <= 0 then continue
//dw.setitem(i, 'D',"H")
dw.setitem(i, 'D',lds.getitemstring(ll_find, 'H'))
next
------解决方案--------------------
long ll_find, i, ll_rc
string ls_data
ll_rc = dw.rowcount()
for i = 1 to ll_rc
ls_data = dw.getitemstring(i,'A')
ls_data += ',' + dw.getitemstring(i,'B')
ls_data += ',' + dw.getitemstring(i,'C')
ll_find = lds.find("E + ',' + F + ',' + G = '" + ls_data + "'",1, lds.rowcount())
if ll_find <= 0 then continue
dw.setitem(i, 'D',lds.getitemstring(ll_find, 'H'))
next