本帖最后由 chiyiangel 于 2011-06-03 08:36 编辑
在一个目录下 有很多子目录 (很多很多)
里面的文件全是sql 脚本 大部分是insert create update语句
但是有很多重复的
请问如何找出这些sql脚本中完全重复的语句呢
找出完全重复的sql语句然后输出
PS:找出重复的sql语句后 还要把路径找出来
比如 aaa/bbb/1.sql 中有一条语句和 ccc/ddd/2.sql 中的一条重复了
要输出这条重复的语句然后还需要把 aaa/bbb/1.sql 和ccc/ddd/2.sql
这两个路径输出出来
我实在找不到办法了 请各位高手看看- insert into pub_billtemplet(bill_templetcaption,bill_templetname,dr,funccode,metadataclass,model_type,modulecode,nodecode,options,pk_billtemplet,pk_billtypecode,pk_corp,resid,shareflag,ts,validateformula) values('单据-资产实体版本','SYSTEM',0,'~','ncaam.appassetversion',null,'NCAAM','',null,'1027Z1100000000005G5','1411AAM_V','@@@@','~',null,'2010-06-18 15:55:15',null)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,1,null,-1,'N',null,-1,'vno',0,'N',1,'Y',null,0,'vno','ncaam.appassetversion.vno',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005G8','@@@@',0,null,null,null,'N',1,3,'appassetversionHVO','appassetversionHVO',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,0,null,-1,'N',null,-1,'creationtime',0,'N',1,'Y',null,0,'creationtime','ncaam.appassetversion.creationtime',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005G9','@@@@',2,null,null,null,'N',1,2,'audit','审计信息',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
复制代码- insert into pub_billtemplet_t(basetab,dr,metadataclass,metadatapath,mixindex,pk_billtemplet,pk_billtemplet_t,pk_layout,pos,position,resid,tabcode,tabindex,tabname,ts,vdef1,vdef2,vdef3) values(null,0,'ncaam.appassetversion',null,null,'1027Z1100000000005G5','1004Z11000000000LEUD','~',0,0,null,'appassetversionHVO',0,'应用资产版本表头','2010-06-18 15:55:15',null,null,null)
- go
- insert into pub_billtemplet_t(basetab,dr,metadataclass,metadatapath,mixindex,pk_billtemplet,pk_billtemplet_t,pk_layout,pos,position,resid,tabcode,tabindex,tabname,ts,vdef1,vdef2,vdef3) values(null,0,'ncaam.appassetversion',null,null,'1027Z1100000000005G5','1004Z11000000000LEUE','~',2,null,null,'audit',0,'审计信息','2010-06-18 15:55:15',null,null,null)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,0,null,-1,'N',null,-1,'creator',0,'N',1,'Y',null,0,'creator','ncaam.appassetversion.creator',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005GD','@@@@',2,null,null,null,'N',1,1,'audit','审计信息',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,0,null,-1,'N',null,-1,'modifier',0,'N',1,'Y',null,0,'modifier','ncaam.appassetversion.modifier',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005GE','@@@@',2,null,null,null,'N',1,3,'audit','审计信息',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,0,null,-1,'N',null,-1,'pk_asset',0,'N',1,'N',null,0,'pk_asset','ncaam.appassetversion.pk_asset',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005GF','@@@@',0,null,null,null,'N',0,2,'appassetversionHVO','appassetversionHVO',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
复制代码- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,1,null,-1,'N',null,-1,'ts',0,'N',1,'N',null,0,'ts','ncaam.appassetversion.ts',null,'N',0,null,'1027Z1100000000005G5','1004Z11000000000LCKD','@@@@',2,null,null,null,'N',0,5,'audit','audit',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,0,null,-1,'N',null,-1,'pk_version',0,'N',1,'N',null,0,'pk_version','ncaam.appassetversion.pk_version',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005G6','@@@@',0,null,null,null,'N',0,1,'appassetversionHVO','应用资产版本表头',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,0,null,-1,'N',null,-1,'modifiedtime',0,'N',1,'Y',null,0,'modifiedtime','ncaam.appassetversion.modifiedtime',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005G7','@@@@',2,null,null,null,'N',1,4,'audit','审计信息',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,1,null,-1,'N',null,-1,'vno',0,'N',1,'Y',null,0,'vno','ncaam.appassetversion.vno',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005G8','@@@@',0,null,null,null,'N',1,3,'appassetversionHVO','appassetversionHVO',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,0,null,-1,'N',null,-1,'creationtime',0,'N',1,'Y',null,0,'creationtime','ncaam.appassetversion.creationtime',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005G9','@@@@',2,null,null,null,'N',1,2,'audit','审计信息',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,1,null,-1,'N',null,-1,'vname',0,'N',1,'Y',null,0,'vname','ncaam.appassetversion.vname',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005GA','@@@@',0,null,null,null,'N',1,4,'appassetversionHVO','appassetversionHVO',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,1,null,-1,'N',null,-1,'vstartdate',0,'N',1,'Y',null,0,'vstartdate','ncaam.appassetversion.vstartdate',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005GB','@@@@',0,null,null,null,'N',1,5,'appassetversionHVO','appassetversionHVO',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,1,null,-1,'N',null,-1,'venddate',0,'N',1,'Y',null,0,'venddate','ncaam.appassetversion.venddate',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005GC','@@@@',0,null,null,null,'N',1,6,'appassetversionHVO','appassetversionHVO',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,0,null,-1,'N',null,-1,'creator',0,'N',1,'Y',null,0,'creator','ncaam.appassetversion.creator',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005GD','@@@@',2,null,null,null,'N',1,1,'audit','审计信息',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,0,null,-1,'N',null,-1,'modifier',0,'N',1,'Y',null,0,'modifier','ncaam.appassetversion.modifier',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005GE','@@@@',2,null,null,null,'N',1,3,'audit','审计信息',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
- insert into pub_billtemplet_b(cardflag,datatype,defaultshowname,defaultvalue,dr,editflag,editformula,foreground,hyperlinkflag,idcolname,inputlength,itemkey,itemtype,leafflag,listflag,listshowflag,loadformula,lockflag,metadatapath,metadataproperty,metadatarelation,newlineflag,nullflag,options,pk_billtemplet,pk_billtemplet_b,pk_corp,pos,reftype,resid,resid_tabname,reviseflag,showflag,showorder,table_code,table_name,totalflag,ts,userdefflag,userdefine1,userdefine2,userdefine3,usereditflag,userflag,userreviseflag,usershowflag,validateformula,width) values(1,-1,null,null,0,0,null,-1,'N',null,-1,'pk_asset',0,'N',1,'N',null,0,'pk_asset','ncaam.appassetversion.pk_asset',null,'N',0,null,'1027Z1100000000005G5','1027Z1100000000005GF','@@@@',0,null,null,null,'N',0,2,'appassetversionHVO','appassetversionHVO',0,'2010-06-18 15:55:15','N',null,null,null,1,1,'N',1,null,1)
- go
复制代码 |