BUG: DOC: IGNORE_DUP_ROW and Tables with Text DataID: Q187966
|
The documentation for the IGNORE_DUP_ROW option for creating a nonunique clustered index is incomplete in SQL Server Books Online for SQL Server versions 6.0 and 6.5. Due to the nature of the way text and image data is stored, the option may not eliminate duplicate rows if the table contains columns of either text or image data types. If the table has text or image data, the only case in which a duplicate row will be eliminated is if the text or image field has not been initialized. This information was inadvertently omitted from the Books Online for SQL Server 6.0 and 6.5.
When text or image columns exist, the table simply stores the address pointer to the beginning of a text or image page chain in the associated column. Each of these pointers is unique. The IGNORE_DUP_ROW option checks these pointer values, rather than the actual text or image data. Therefore, even if the text or image data is exactly the same, the pointers in the column will have different values, so the row will not qualify as unique. If the value of a text or image column is uninitialized, the pointers will evaluate the same, so the duplicate row is eliminated.
The documentation should state that the IGNORE_DUP_ROW option will not
eliminate duplicate rows on a table with text or image data.
If you need to find and eliminate duplicates rows in a table with text or
image data, you can use the following query to identify rows that may be
duplicates:
SELECT col1, col2, col3, ..... count(*)
FROM t1
GROUP BY col1, col2, col3, ...
HAVING count(*)>1
Q139444 : INF: How to Remove Duplicate Rows From a Table
Microsoft has confirmed this to be a problem in the Books Online for SQL Server versions 6.0 and 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
Additional query words: datatype datatypes
Keywords : SSrvDoc_Err SSrvTran_SQL kbbug6.50 kbbug6.00
Version : WINNT:6.5
Platform : winnt
Issue type : kbbug
Last Reviewed: April 19, 1999