473,387 Members | 1,575 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,387 software developers and data experts.

Removing duplicate lines based on a column value

I have an interesting script to write.

The idea is to "rollup" rows that only differ by one column and concatenate the column value. For example:

xxxx a xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
xxxx b xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
1xxx a xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
1xxx b xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
2xxx a xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
2xxx b xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
2xxx c xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz

should produce:

xxxx ab xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
1xxx ab xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz
2xxx abc xxxxxxxxxxxx yyyyyyy zzzzzzzzzzzzzzz

Help please :)
May 25 '07 #1
1 1980
KevinADC
4,059 Expert 2GB
What have you tried so far?
May 27 '07 #2

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

Similar topics

2
by: Iain | last post by:
Hi I have inherited a web app with the following table structure, and need to produce a table without any duplicates. Email seems like the best unique identifier - so only one of each e-mail...
0
by: Luke Airig | last post by:
I am trying to merge two xml files based on common date/time and then write out a tab-delimited xml file with the header record from one of the input files concatenated in front of the merged...
3
by: Rad | last post by:
I have a table . It has a nullable column called AccountNumber, which is of varchar type. The AccountNumber is alpha-numeric. I want to take data from this table and process it for my application....
3
by: dan graziano | last post by:
Hi, How do you suggest is the best way to check for duplicate rows in an access table. And once one knows if there are duplicates, to remove all but one. In my access table, there are 5...
6
by: Peter | last post by:
Can anyone advise me what is wrong with this code? I want it to tell me if I am entering a duplicate record. However, I always get the "Dupe" error message, whether I have entered a duplicate or...
6
by: Niyazi | last post by:
Hi all, What is fastest way removing duplicated value from string array using vb.net? Here is what currently I am doing but the the array contains over 16000 items. And it just do it in 10 or...
12
by: joestevens232 | last post by:
Hello Im having problems figuring out how to remove the duplicate entries in an array...Write a program that accepts a sequence of integers (some of which may repeat) as input into an array. Write...
4
by: mcca0081 | last post by:
hi - i'm trying to delete one of the duplicate records based on the most current date. here's the code for my access 2000 db. any help would be appreciated!!! - thank you kindly Sub...
1
by: VinArt | last post by:
MS Acc 2003, XP Thank you in advance for any help. I have tables called "Makeup" and "Lines". Each makeup can have multiple lines. Goal is to create a new "makeup" with identical "lines"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.