hi,
how can I intercept and trait one error for duplicated values in one unique
index?
thanks,
Liana
thanks,
Liana
CREATE TABLE MyTable
( MyKey int PRIMARY KEY,
SomeValue varchar(200) NOT NUL
)
Assume that you want to build a UNIQUE index on SomeValue,
but you get an error message indicating that one or more
values are not unique. You could identify those rows with
this query:
SELECT MyKey, SomeValue FROM MyTable WHERE SomeValue IN
(SELECT SomeValue, COUNT(*) FROM MyTable
GROUP BY MyKey
HAVING COUNT(*) > 1)
How you proceed from that point depends on what you need
to do -- delete the duplicate rows, change SomeValue to
make it unique, etc.
Stu Bloom, MCSD
values in one uniqueQuote:>-----Original Message-----
>hi,
>how can I intercept and trait one error for duplicated
Quote:>index?
>thanks,
>Liana
>.
1. Index Error - Index out date
When I open a Tbale, for reindex and pack, sometimes one error occur.
This message appears: "index out date"
The table not open in exclusive mode.
There're a code for open the table and reindex and pack???
Best regrads..
****************************** En espa?ol
*****************************
Cuando abro una tabla para reindexar, algunas veces me ocurre un
error.
El mensaje es el siguuiente : "Index out date"
Por tanto, no puedo abrir la tabla en modo exclusivo.
Hay alguna manera de volver a reindexar la tabla, y corregir el error.
Muchas gracias,
===========================================================
= Apache Salas Rock =
=*********************************************************=
= 2:346/15.10 =
===========================================================
Me comunico, luego existo.....
3. PDOX5, OPAL, error trapping for index errors?
5. BCP: --- Invalid Descriptor Index Error ... need help
7. table corrupted with clustered index error
10. Need Help - 1505 Index Error
11. Composite index error on alter table statement
12. Index Error -- Please help