| | |
Finding possible matches
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2008
Posts: 1
Reputation:
Solved Threads: 0
Hi, lets say I have the following 7 records in my database
ID Model
-- ------
1 400
2 400FL
3 400 FL
4 ABC
5 SGH500
6 SGH-500
7 SGH 500
How is it possible if i could select out the rows which are of possible match to some other rows?
E.g. IDs 1, 2 & 3 are possible matches of one another and IDs 5, 6 & 7 are possible matches of one another. ID 4 will not be displayed in the result.
Thanks a lot in advanced
ID Model
-- ------
1 400
2 400FL
3 400 FL
4 ABC
5 SGH500
6 SGH-500
7 SGH 500
How is it possible if i could select out the rows which are of possible match to some other rows?
E.g. IDs 1, 2 & 3 are possible matches of one another and IDs 5, 6 & 7 are possible matches of one another. ID 4 will not be displayed in the result.
Thanks a lot in advanced
Use the LIKE keyword in your SELECT statement.
Experiment with that. You may also be able to use regular expressions in the LIKE constraint.
sql Syntax (Toggle Plain Text)
SELECT Model FROM Table WHERE Model LIKE '%00';
Experiment with that. You may also be able to use regular expressions in the LIKE constraint.
Last edited by peter_budo; Sep 7th, 2008 at 8:47 am. Reason: Keep It Organized - please use [code] tags
Using the like constrait with '%00' would work for this sample, but would still require the human eye to make the associations with each possible duplicate. I'm not exactly sure what the solution would be for something with 60,000 records, but I have a feeling it will take more than one query for this kind of scenario. I too have some duplicate records to deal with (hence 60,000 records) and was hoping to stumble on a solution as well. I'm thinking about trying to do something with a pivot table or a custom tool. If I find something I will be sure to post back my results.
If in doubt, reach into the trash can and remove the user guide.
![]() |
Similar Threads
- Finding matchin characers in strings (C++)
- Finding a Record in VB6 ADO (Visual Basic 4 / 5 / 6)
- verify page not finding random records (ASP)
- finding a matches recursively (MS SQL)
- need help with arrays (C++)
- Help with error checking code (C++)
Other Threads in the MS SQL Forum
- Previous Thread: No pubs database after installing Mssql 2000
- Next Thread: RowGuidCol and Data_located_on_filegroup
| Thread Tools | Search this Thread |





