Re: select only those rows that have more than 2 entries based on key field



Hey,
I used the find duplicate query wizard and just modified it in SQL view
to say HAVING Count(*)>2 and then modified it and ran it again for
HAVING Count(*)<2.
Works great but I have a hard time with syntax errors in Access when I
try to combine or modify complicated statements...Logically, I can but
syntactically is a pain!
do others have this problem with Access? Does SQL server have the same
problem? ord does it have some help with writing queries.
How did you experts get around this?
thanks!
Jess wrote:
Hi All,
I have a table that has 2 entries per employee with a few exceptions.
How do I select only those individuals that are the exception? that is,
either <2 or >2 entries?

thanks!
Jess

.



Relevant Pages

  • Re: UP -- patent restricted?
    ... some poor unsuspecting schmuck. ... Maybe there are capabilities in SQL that I'm totally ignorant of. ... After doing that I'd like to "ride the B-tree index" to visit and check all the entries for this client. ... When you need so many keys, i.e. you have so many functions, so much functionality, you don't have a lot of freedom to conform with what others have done. ...
    (comp.databases.pick)
  • Re: UP -- patent restricted?
    ... The schmuck won't be unsuspecting, and 4GL sounds a bit grandiloquent, ... narration) to correct a spelling error, doing it with SQL, at least at ... check all the entries for this client. ... When you need so many keys, i.e. you have so many functions, so much ...
    (comp.databases.pick)
  • Re: PEAR DB - Useful?
    ... SQL, all I have to do is change the connect string and I can use it to ... work with more or less any database out there. ... PHP5's exceptions and stuff, ... debugging information in a log file. ...
    (comp.lang.php)
  • Re: Security Needed!
    ... receive 50 entries a day and all bogus. ... it uses geoip lite. ... I've turned it into an SQL db, ...
    (alt.php)
  • cancelled at the users request
    ... I'm writng a servlet to maintain a database of users. ... During a run of getting the exceptions ... I tried doing the sql as separate executes rather than batch ... boolean communityExists = false; ...
    (microsoft.public.sqlserver.jdbcdriver)