在表B的B1输入=IF(COUNTIF(表A!A1,A1),"","不同") 回车并下拉
补充:
=IF(AND(表A!A1<>A1,OR(表A!A1<>"",A1<>"")),"不同","") 回车并下拉
也行。
数据多的,在表C的A1输入:
=IF(AND(表A!A1<>表B!A1,OR(表A!A1<>"",表B!A1<>"")),"不同","")
回车,向右复制(右拉),再选A1~最右边的(如Z1),一起向下复制(下拉)。
select * from (select fdname from fldlist where lower(fdname) in (select a.name from syscolumns ainner join sysobjects d on a.id=d.id and d.xtype='U' and d.name<>'dtproperties' where d.name='spkfk')
)as a1 ,
(select fdname from gzyry.dbo.fldlist where lower(fdname) in (select a.name from gzyry.sys.syscolumns a
inner join gzyry.sys.sysobjects d on a.id=d.id and d.xtype='U' and d.name<>'dtproperties' where d.name='goodsdoc')
)
as b1 where a1.fdname = b1.fdname
说明fldlist 表 是存放字段的表(自己定义) 可以直接将查询的字段存入
库:gzyry 和当前库
spkfk goodsdoc 为两张比较的表
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)