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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -