Re: Trigger problem by W
W
Wed Jul 30 08:40:16 CDT 2008
Thanks ED,
I knew the way I did it was a 'kludge'. I like the simplicity of your
suggestion.
Wade
"ED" <nospam@thankyou.com> wrote in message
news:eu1Ynqh8IHA.3656@TK2MSFTNGP04.phx.gbl...
> My 2c,
>
> Quicker way would be to:
> no index set
> delete all
> set index to unique tag
> set deleted off
> recall all
> pack if necessary
>
> No need to scan and compare.
>
> ED
>
> "W.Davis" <wdavis3@cinci.rr.comNOSPAM> wrote in message
> news:%23x3ejMy6IHA.4292@TK2MSFTNGP02.phx.gbl...
> Thanks Christof,
> What I do now is create a cursor with the duplicates, index on it unique,
> index on the table unique, set relation from the cursor to the table, and
> scan the cursor, deleting dups from the table. It seems to work o.k., but
> seems to be a kludge.
> Wade
>
> "Christof Wollenhaupt" <msnews.microsoft.com.20050422@prolib.de> wrote in
> message news:u3yfvAx6IHA.5012@TK2MSFTNGP02.phx.gbl...
> > Hi Wade,
> >
> > If you have two records that are now invalid and will fire the delete
> > trigger, you could first change one of them, for example, replace the
> > primary key.
> >
> > If the question is how you can re-use a key once you deleted a record
with
> > the same key, then the answer would be to use an index with a FOR NOT
> > DELETED() clause as the primary key. Of course, the question would be,
why
> > you have repeating primary keys, at all.
> >
> > --
> > Christof
> >
> >
> >
>
>