On Tue, 2005-06-28 at 14:26 -0600, Von Fugal wrote: > > It is doable, and not so hard. What's NOT doable is including step 4 in > "The One Query". > > Some have given some ideas already, but to specifically return results > where there ARE duplicates of sessid, something like this... > > select *, count(sessid) as cnt from CDR group by sessid having cnt > 1 > > that will give you all occurences where theres a duplicate sessid, > though you don't know _which_ duplicate row you will get. > > But finding one query aside, why don't you just put a unique key on > sessid so there cannot be duplicates? > > Von Fugal
Hmmm. I need to learn to use HAVING. I'm self taught, and have always just used WHERE. Thanks for showing us how to do this. -- Matthew Walker The Brain Garden, Inc [EMAIL PROTECTED] Work: (801) 655-1075 Home: (801) 491-2079 Page: (801) 283-9887 (Emergencies Only) Random Quote: The difficult we do today; the impossible takes a little longer.
signature.asc
Description: This is a digitally signed message part
.===================================. | This has been a P.L.U.G. mailing. | | Don't Fear the Penguin. | | IRC: #utah at irc.freenode.net | `==================================='