![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Database Database problems or need to ask a question? maybe something to do with sql injections or a database software question. Database topics cover MySQL, PostgreSQL, Oracle, SQL Server or anything else related to databases. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Hi, I am looking for double entry in my database. So that, for example, if the name bob was listed more than once I would get the name and the number of times it is listed. What select statement should I use to list all the similar entries? Regards, Simon | |||
|
| Advertisements |
| | #2 | ||
| Simon wrote: > Hi, > > I am looking for double entry in my database. > So that, for example, if the name bob was listed more than once I would get > the name and the number of times it is listed. > > What select statement should I use to list all the similar entries? > > Regards, > > Simon > > Here's one way to get all duplicates from the "name" column: SELECT name, count(*) as how_many FROM tablename GROUP BY name HAVING how_many > 1 ciao gmax -- _ _ _ _ (_|| | |(_|>< The Data Charmer _| http://datacharmer.blogspot.com/ | |||
|
| | #3 | ||
| or you could try something like this: SELECT count(*),f_name,GROUP_CONCAT(f_name,' ',l_name) FROM contacts WHERE f_name RLIKE '[b,r]ob' GROUP BY f_name; | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: entries, multiple, searchin, similar |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need advice on extracting database entries | JackM | Database | 1 | 07-01-2007 7:33 PM |
| TomTom or similar - Irish maps | Nick | GPS | 1 | 06-25-2007 11:38 PM |
| want mp3 or similar for my car | strawberry | Car audio | 1 | 06-18-2007 2:41 PM |
| Looking for a good template similar to pricedash.com | Nospam | Affiliate Programs | 2 | 06-12-2007 8:19 PM |
| 'Connect to Internet'; How to name dial-up entries | Maurice Batey | Windows | 1 | 05-28-2007 11:29 PM |
| Featured Websites | ||||
|