问题网址:

* 生成测试数据
create cursor tt1 (记录行 i,字段名 c(10),值 i) && 临时表
create cursor tt (a1 i,a2 i,a3 i,a4 i,a5 i,a6 i,a7 i,a8 i,a9 i,a10 i,a11 i)
for lnI=1 to 11
    append blank
    nzds=0
    for lnJ=(lnI-1)*11+1 to lnI*11
        nzds=nzds+1
        replace (field(nzds)) with lnJ
    endfor
endfor
* 设置相同数据
replace record 1 a7 with 8
replace record 4 a6 with 48
replace record 6 a6 with 48
* 列记录转换为行记录
scan
    scatter to azd
    for lnI=1 to fcount("tt")
        insert into tt1 values (recno("tt"),field(lnI,"tt"),azd[lnI])
    endfor
endscan
* 显示查询结果
select * from tt1 where 值 in (select 值 from tt1 group by 值 having count(*)>1) order by 值