One for the IT bunc...
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] One for the IT bunch - deleting duplicate values

7 Posts
7 Users
0 Reactions
68 Views
Posts: 13916
Free Member
Topic starter
 

I have data in a database field that contains quite a lot of duplication i.e. 1,1,1,2,2,2,2,3,3,3,3,4,4,4,4 and I would like to reduce this to 1,2,3,4.
A spreadsheet can do this for a column of data using a filter, but I don't think I can get the data into columns (only rows) nor can I create a filter for the first row and then duplicate it across multiple rows - I would need to do about 1600 rows.
Anybody got a handy hint how I can achieve this with the minimum fuss?


 
Posted : 26/03/2012 9:04 am
Posts: 19
Free Member
 

what software are you using?

Access you could just 'group by' for example, Excel there are a whole host of ways (Countif or pivot tables)


 
Posted : 26/03/2012 9:08 am
Posts: 811
Free Member
 

If it's in a database:
select distinct fieldname from table

Depending on the database software you may also be able to:
select distinct fieldname into newtable from tablename

C


 
Posted : 26/03/2012 9:19 am
Posts: 13916
Free Member
Topic starter
 

Database is FileMaker (pretty powerful) but I can easily export in many formats to carry out the work in a spreadsheet or other app.


 
Posted : 26/03/2012 9:33 am
Posts: 4170
Free Member
 

If you can get the data into rows in Excel, copy and paste it into columns using Paste Special with the Transpose box ticked. Then you can filter to unique values. To do all the columns you could probably record it as a Macro but I don't have a copy of Excel handy to check.


 
Posted : 26/03/2012 7:41 pm
Posts: 0
Free Member
 

Does this help?

http://support.microsoft.com/kb/262277

EDIT: I don't think it does re-reading OP


 
Posted : 26/03/2012 7:48 pm
Posts: 5139
Full Member
 

you back up the table, group the values then write the table from this query (or rename the table and create a new table with the original name)

the above could get complex if you have a key on this table rather than it being for lookup purposes hence the backing up first


 
Posted : 26/03/2012 8:42 pm
Posts: 646
Full Member
 

If you do group them, just export the average, that'll be the value you want.


 
Posted : 26/03/2012 8:51 pm

6 DAYS LEFT
We are currently at 95% of our target!