xpath - Query using xquery and SQL on an sql table -
i have sql table 3 columns , 1 of columns xml. of elements in xml duplicates.
how query table xml elements occur more once??
any appreciated. thanks.
in case of:
- your table has primary key (
id
here in sample) - your xml data generated program (so no tab, space, carriage return inserted human)
i think, can try use following query find duplicate :
select * <table> t1 exists (select 1 <table> t2 t2.id <> t1.id , convert(nvarchar(max),t2.<xmlcol>) = convert(nvarchar(max),t1.<xmlcol>))
Comments
Post a Comment