scan scatter name oScat if not seek(m.oScat.accode,'newcustomer','accode') insert into newcustomer from name oScat else && see below endif endscandepending on the kind of disc you can think of rewriting the else part as
replace in newcustomer ; address1 with evl(newcustomer.address1, m.oScat.address1); address2 with evl(newcustomer.address2, m.oScat.address2)or for SSD
if empt(newcustomer.address1+newcustomer.address2) && betting on compatible type, else use empty() and empty() replace in newcustomer ; address1 with evl(newcustomer.address1, m.oScat.address1); address2 with evl(newcustomer.address2, m.oScat.address2) endifregards
>>use 1001\customer again in 0 alias oldcustomer shared >>use 1002\customer again in 0 alias newcustomer shared >>sele newcustomer >>set order to accode >>sele oldcustomer >>set order to accode >>go top >>do while not eof('oldcustomer') >> scatter memvar >> sele newcustomer >> if not seek(m.accode,'newcustomer','accode') >> appe blank in newcustomer >> gather memvar >> else >> if empt(newcustomer.address1) >> repl newcustomer.address1 with m.address1 in newcustomer >> endif >> if empt(newcustomer.address2) >> repl newcustomer.address2 with m.address2 in newcustomer >> endif >> endif >> sele oldcustomer >> skip >>enddo >> >>>>