以下是引用sdta在2020-9-13 10:59:30的发言:
例如能解决问题吗
例如能解决问题吗
最后一行代码应是:
REPLACE _1dxxf WITH '_1DXXF' FOR NOT '_'$_1dxx AND ('_'$k_1d OR '_'$k_1x OR '_'$k_1t) AND RECNO()=i
[此贴子已经被作者于2020-9-13 18:55编辑过]
CLOSE TABLES all USE b1 IN 0 ALIAS t1 BLANK FIELDS _1d, _1x,_1t,_2d, _2x,_2t ALL USE b1 IN 0 ALIAS t2 AGAIN SELECT t1 SET RELATION TO RECNO()+1 INTO "t2" REPLACE ALL t2._1d WITH IIF(t2.a1>t1.a1 ,"_1D", ""); t2._1x WITH IIF(t2.a1<t1.a1 ,"_1X", ""); t2._1t WITH IIF(t2.a1=t1.a1 ,"_1t", ""); t2._2d WITH IIF(t2.a2>t1.a2 ,"_2D", ""); t2._2x WITH IIF(t2.a2<t1.a2 ,"_2X", ""); t2._2t WITH IIF(t2.a2=t1.a2 ,"_2t", "") SET RELATION TO SELECT * FROM t1 BROWSE
CLOSE TABLES all USE b1 IN 0 ALIAS t1 BLANK FIELDS _1d, _1x,_1t,_2d, _2x,_2t ALL USE b1 IN 0 ALIAS t2 AGAIN SELECT t1 SET RELATION TO RECNO()+1 INTO "t2" p1=ALLTRIM("t1.")+ALLTRIM('a')+ALLTRIM('1') p11=&p1 k1=ALLTRIM("t2.")+ALLTRIM('a')+ALLTRIM('1') k11=&k1 p2=ALLTRIM("t1.")+ALLTRIM('a')+ALLTRIM('2') p22=&p2 k2=ALLTRIM("t2.")+ALLTRIM('a')+ALLTRIM('2') k22=&k2 REPLACE ALL t2._1d WITH IIF(k11>p11 ,"_1D", ""); t2._1x WITH IIF(k11<p11 ,"_1X", ""); t2._1t WITH IIF(k11=p11 ,"_1t", ""); t2._2d WITH IIF(k22>p22 ,"_2D", ""); t2._2x WITH IIF(k22<p22 ,"_2X", ""); t2._2t WITH IIF(k22=p22 ,"_2t", "") SET RELATION TO SELECT * FROM t1 BROWSE
[此贴子已经被作者于2020-9-13 18:45编辑过]