0
我们有一条语句,即在临时表中插入一些行(例如,10行),同时插入第5行,但它有一个问题列格式并给出错误,然后停止插入行。 我想要的是,它应该跳过错误行并插入有效的行。 对于那些错误行,它可以跳过该错误列并插入一些空值&不同的状态。如何在将数据插入数据库时跳过无效行
create table #tb_pagecontent_value (pageid int,formid uniqueidentifier, id_field xml,fieldvalue xml,label_final xml)
…
…
insert into #tb_pagecontent_xml
select A.pageid,B.formid,A.PageData.query('/CPageDataXML/control')
from Pagedata A inner join page B on A.PageId=B.PageId
inner join FormAssociation C on B.FormId=C.FormId
where B.pageid in (select pageId from jobs where jobtype='zba' and StatusFlag!=1)
在上面例如,我想要应用该逻辑。 任何帮助表示赞赏。
它没有完全解决我的问题,但它已经给出了一些关于如何解决这个问题的想法。 – Dinesh 2010-05-14 07:02:50