问题现象: |
"错误信息:
-2147217873
不能在具有唯一索引 ''''citem_name'''' 的对象 ''''fitem'''' 中插入重复键的行。
执行如下语句时出错:
if not exists (select * from fitem where citem_class=''''97'''')
Begin
delete from fitemstructure where citem_class =''''97''''
Insert fitem(citem_class,citem_name,citem_text,crule,ctable,cclasstable) Values(''''97'''',''''项目管理'''',''''项目名称'''',''''1'''',''''fitemss97'''',''''fitemss97class'''')
Insert fitemstructure(citem_class,citem_sqr,cfield_name,ctext,imode,itype,ilength,iscale,blist,bsum,bref,isubitem,idefine,bprimarykey)
values(''''97'''',''''1'''',''''I_id'''',''''自动编号'''',0,1,4,0,0,0,0,0,NULL,0)
Insert fitemstructure(citem_class,citem_sqr,cfield_name,ctext,imode,itype,ilength,iscale,blist,bsum,bref,isubitem,idefine,bprimarykey)
values(''''97'''',''''2'''',''''citemcode'''',''''项目编号'''',1,3,20,0,1,0,1,0,NULL,0)
Insert fitemstructure(citem_class,citem_sqr,cfield_name,ctext,imode,itype,ilength,iscale,blist,bsum,bref,isubitem,idefine,bprimarykey)
values(''''97'''',''''3'''',''''citemname'''',''''项目名称'''',2,3,60,0,1,0,1,0,NULL,0)
Insert fitemstructure(citem_class,citem_sqr,cfield_name,ctext,imode,itype,ilength,iscale,blist,bsum,bref,isubitem,idefine,bprimarykey)
values(''''97'''',''''4'''',''''bclose'''',''''是否结算'''',3,5,1,0,0,0,1,0,NULL,0)
Insert fitemstructure(citem_class,citem_sqr,cfield_name,ctext,imode,itype,ilength,iscale,blist,bsum,bref,isubitem,idefine,bprimarykey)
values(''''97'''',''''5'''',''''citemccode'''',''''所属分类码'''',4,3,22,0,0,0,0,0,NULL,0)
Insert fitemstructure(citem_class,citem_sqr,cfield_name,ctext,imode,itype,ilength,iscale,blist,bsum,bref,isubitem,idefine,bprimarykey)
values(''''97'''',''''6'''',''''iotherused'''',''''其他系统是否使用'''',5,1,4,0,0,0,0,0,NULL,0)
Insert fitemstructure(citem_class,citem_sqr,cfield_name,ctext,imode,itype,ilength,iscale,blist,bsum,bref,isubitem,idefine,bprimarykey)
values(''''97'''',''''7'''',''''dEndDate'''',''''完工日期'''',6,4,10,0,0,0,0,0,NULL,0)
Insert fitemstructure(citem_class,citem_sqr,cfield_name,ctext,imode,itype,ilength,iscale,blist,bsum,bref,isubitem,idefine,bprimarykey)
values(''''97'''',''''1'''',''''citemcode'''',''''项目编号'''',6,3,20,0,0,0,0,1,NULL,0)
Insert fitemstructure(citem_class,citem_sqr,cfield_name,ctext,imode,itype,ilength,iscale,blist,bsum,bref,isubitem,idefine,bprimarykey)
values(''''97'''',''''2'''',''''citemname'''',''''项目名称'''',6,3,60,0,0,0,0,1,NULL,0)
Insert fitemstructure(citem_class,citem_sqr,cfield_name,ctext,imode,itype,ilength,iscale,blist,bsum,bref,isubitem,idefine,bprimarykey)
values(''''97'''',''''3'''',''''iclose'''',''''是否结算'''',6,1,2,0,0,0,0,1,NULL,0)
Insert fitemstructure(citem_class,citem_sqr,cfield_name,ctext,imode,itype,ilength,iscale,blist,bsum,bref,isubitem,idefine,bprimarykey)
values(''''97'''',''''4'''',''''dEndDate'''',''''完工日期'''',6,4,10,0,0,0,1,1,NULL,0)
End
"
|