Bruce,

That's what the HAVING clause is for in the SELECT syntax.

Presuming you want to look at the details, but group by and count by the
plate number:

SELECT columnlist FROM tablename +
WHERE mvplateno IN +
(SELECT myplateno FROM sametablename t2 GROUP BY myplatenum HAVING COUNT (*)
> 1)

Bill

On Thu, Aug 12, 2010 at 3:41 PM, Bruce Chitiea <[email protected]>wrote:

> All:
>
> After importing Excel vehicle records into a receiving table, I ran a
> "SELECT DISTINCT ..." against all necessary columns in a working copy of
> the receiving table.
>
> This revealed 'semi-distinct' records such as these:
>
> mvplateno mvplatestateid mvcolorid mvmfgrid mvmodel ...
> (Indexed) (Indexed)
>
> 112 BLG   CA             WHT       CHV      MALIBU
> 112 BLG   CA             WHT       -0-      -0-
> 112 BLG   CA             -0-       CHV      IMPALA
> 112 BLG   FL             -0-       -0-      -0-
>
> 123 ABC   CA             RED       HON      CIVIC
> 123 ABC   CA             HON       RED      ACCORD
> 123 ABC   CA             MAR       TOY      ACCORD
>
> I'm thinking a form-hosted, cursor-stepped editing process; producing a
> list of truly distinct records keyed off the license plate number
> (mvplateno).
>
> Where I'm hung up is how to select out only those records where
> (count(mvplateno) > 1).
>
> I'd sure appreciate a pointer in the correct use of SELECT to generate a
> subset based solely on record-count.
>
> I'm working at the crawl level, and every bit of working code is a
> victory; so I'm game to work out the coding myself. But I'd sure
> appreciate direction.
>
> bruce chitiea
> safesectors, inc.
>
> Turbo V-8 Win 8.0.23.30809
> Windows 7
>
>
>

Reply via email to