473,418 Members | 2,080 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Find duplicates, concatenate cells

Hello all,

I have a database where I need to find duplicate rows based on one cell and concatenate the two cells from both into one record. For example i'll have:


Expand|Select|Wrap|Line Numbers
  1. ID             NameOne               IDNumber
  2.  
  3. 1              John                        2983
  4.  
  5. 2              Jones                      2983
  6.  
  7. 3              James                     2984
  8.  

I'm wondering if there is a SQL statement where I can search for the duplicates of "2983" and come out with a record of:
Expand|Select|Wrap|Line Numbers
  1. ID             NameOne               IDNumber
  2.  
  3. 1              John Jones              2983
  4.  
  5. 2              James                     2984
  6.  

I've tried loading this into a Datatable and searching through it, but I get out of bounds errors when I try to jump ahead in the search for the next IDNumber to match with the current one. So i'm resorting to an SQL statement (which by searching the net I figure its possible) Thanks in advance!
Sep 24 '10 #1
1 1845
ck9663
2,878 Expert 2GB
Here, tweak this

Happy Coding!!!

~~ CK
Sep 24 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Tom Mitchell | last post by:
All: I'm stumped on a query. How do I find duplicates in a table where one of the duplicates has values is a certain field and the other doesn't. For example, I have the following table: ...
1
by: Phil | last post by:
Hi. There is probably a very simple explanation for this. I am using the find duplicates wizard, I am asked for the fields that may contain duplcate info. So far so good at this point it functions...
2
by: Phil | last post by:
Hi. I have a table containing primary address, secondary address, road,town, postcode, there are otherfields within the table requestid, round, day, etc. I want to find all instances of the...
4
by: Killer42 | last post by:
Hi all. Sorry, this is probably a really simple one but I'm having some difficulty with it, and don't have much time to devote to it right now. I need to find all the records which have...
3
by: AccessHunter | last post by:
Please help with writing a VBA Code to find duplicates from the following acces table. Fields:- TranDate, Job Num, Agency Name Date is like this, 1/3/2003, 757702, People Office...
5
by: limperger | last post by:
Hello everyone! Is out there any way to search for duplicate entries without using the "Find duplicates" option? In the Access 97 installed in my workplace, the Find duplicates option is disabled...
9
by: iheartvba | last post by:
To put the below code simply, I have created a find duplicates query for a table using the Access query wizard. I have then tried to plug the Sql String (strSqlDupColl) copied from the Query Builder...
1
by: stateemk | last post by:
I have an Access project and need to find duplicates in table. How do I create a query to find the duplicates?
1
by: muddasirmunir | last post by:
I have two excel sheet , sheet1 contain about 500 websites addreses and sheet2 contain about 100 , Now i want to find and remove any entry in sheet1 that already present in sheet2 or simple i...
1
by: guest087123 | last post by:
I have a problem to do which I am finding difficult to do. I have a table customers with customer names. The question is as follows "write a procedure that uses a collection to find and display how...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.