RT ,表中没有设置主键,没有约束,就三个不唯一非聚集,一个唯一非聚集索引,我现在想通过临时表导入数据 ,中间有些数据是设置了非聚集索引的列是重复的,就在新表中查不到
CREATE NONCLUSTERED INDEX [I_biz_wareid] ON [dbo].[u_biz]
(
[wareid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF,
DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [i_biz_item] ON [dbo].[u_biz]
(
[item] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [I_biz_execdate] ON [dbo].[u_biz]
(
[execdate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [I_u_biz] ON [dbo].[u_biz]
(
[stamp] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
如上:wareid,execdate,item三个字段重复的数据就插入失败(未报错)
请问这是怎么回事
------解决方案--------------------
你是怎么插入的,数据库里运行脚本?程序里导的?看看是不是有东西屏蔽了报错信息。
------解决方案--------------------
你可以建立一个表 将错误的数据插入这个表