Difference between revisions of "User:Pavila"

From OpenKM Documentation
Jump to: navigation, search
Line 9: Line 9:
 
</source>
 
</source>
  
 +
'''Find duplicates'''
 
<source lang="sql">
 
<source lang="sql">
 
select nd.uuid, nd.name, ndv.checksum from NodeDocument nd, NodeDocumentVersion ndv where nd.uuid = ndv.parent and ndv.checksum in  
 
select nd.uuid, nd.name, ndv.checksum from NodeDocument nd, NodeDocumentVersion ndv where nd.uuid = ndv.parent and ndv.checksum in  

Revision as of 23:41, 4 August 2012

OpenKM Core developer.

import java.util.*;
import java.nio.charset.*;

print("Charset: " + Charset.defaultCharset()+"<br/>");
print("Locale: " + Locale.getDefault()+"<br/>");

Find duplicates

select nd.uuid, nd.name, ndv.checksum from NodeDocument nd, NodeDocumentVersion ndv where nd.uuid = ndv.parent and ndv.checksum in 
  (select ndv.checksum from NodeDocumentVersion ndv where ndv.current = true group by ndv.checksum having count(ndv.checksum) > 1) 
order by nd.name;

TO DO

Books

See also