Subject Re: duplicate string fields?
Author ifitsx
> > There are a very few duplicate fields for <subject>.
> >
> > I need to find those to evaluate which one to keep.
> >
> How about something like this:
>
> select a.noteid, a.folderid, a.subject from dbnotes a
> where exists (select 1 from dbnotes b where a.subject = b.subject and
> a.noteid <> b.noteid and a.folderid <>
b.folderid)
> order by 3, 1, 2
>
> This is untested but it should list out the record id fields that have
> duplicates and ordered by the subject, noteid, folderid fields.

Woody,

You get unlimited swings in this at bat ;)

However, on this swing we get:

ISC ERROR CODE:335544652

ISC ERROR MESSAGE:
multiple rows in singleton select

Again, to clarify, there are no duplicate noteid fields: that's the
primary key.

There are a very few duplicate subject fields (hmm...manually editing
- which I got tired of doing, so I'm trying to learn some sql - I
found a couple. Maybe there aren't any more. Would that return an
error, even with the correct sql?)