>That's amazing!
>
>I had developed a routine which pulled all the records containing the item into one cursor, created an updatable version of it, then pulled all records that were not the item into another cursor and deleted matching order ids from the first cursor. It used only about 20 lines of code, and I was getting pretty proud of myself. Then you burst my bubble! (Not that I'm complaining!)
>
>I'll have to explore the count(*) instruction. I don't see any info on that variation in Help or the Hacker's Guide. Where can I find an explanation?
>
>Thanks very much!
>
>Neil
>
>>>Is there a quick method of selecting records where only a single instance of the order number exists?
>>>
>>
>>SELECT COUNT(*), OrderID FROM Mytable GROUP BY OrderID HAVING COUNT(*) = 1
COUNT() takes a field name or a wildcard, in this case, it doesn;t matter which you use. If you use COUNT(*) in a plain old query, the results contain a single record with the count. If you use a GROUP BY clause, COUNT() returns the number of records that got grouped.
Erik Moore
Clientelligence