473,386 Members | 2,042 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,386 software developers and data experts.

double entries

Hi Folk

I have a databse with a bunch of double entries in some fields. For
example:
field A:

"that is the way to go that is the way to go "

field A should be:

"that is the way to go "

Is there some sort of sql I can use to find these (and clean them up)?

TIA
Nicolaas
Mar 24 '07 #1
1 3028
On Mar 24, 8:34 pm, "windandwaves" <nfranc...@gmail.comwrote:
Hi Folk

I have a databse with a bunch of double entries in some fields. For
example:

field A:

"that is the way to go that is the way to go "

field A should be:

"that is the way to go "

Is there some sort of sql I can use to find these (and clean them up)?

TIA
Nicolaas
Is there some sort of sql I can use to find these
Yep. Assuming they really are exact doubles (phrase,space,phrase)
here's one way:

SELECT TRIM( SUBSTR(
fieldA, 1, FLOOR( LENGTH( fieldA ) /2 ) )
)
START , TRIM( SUBSTR(
fieldA, CEILING( LENGTH( fieldA ) /2 ) )
)finish
FROM mytable
HAVING START = finish
LIMIT 0 , 30
>(and clean them up)?
I'll leave that as an execise for the reader. WARNING: BACK UP YOUR
DATA BEFORE YOU ATTEMPT THIS!!!

Mar 25 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: LumisROB | last post by:
Is it possible to create matrixes with vector <vector <double >> ? If it is possible which is the element m23 ? You excuse but I am not an expert Thanks ROB
7
by: Iain King | last post by:
I have some code that converts html into xhtml. For example, convert all <i> tags into <em>. Right now I need to do to string.replace calls for every tag: html = html.replace('<i>','<em>')...
32
by: Carson | last post by:
Hi , Is there a very efficient way to set a double array to 0 ? (I have tried memset, but the result doesn't look correct.) Carson
6
by: ebc | last post by:
Hi, I have written a function that removes double entries from a sorted array. See the structures typedef struct tagRECR { char name;
4
by: Jon Davis | last post by:
If two delegates are created that point to the exact same method, and an event is assigned both delegates, ... myObj.MyEvent += new EventHandler(MyHandler); myObj.MyEvent += new...
0
by: Marcel Boscher | last post by:
Hello everybody, i get strange error messages when trying to call up my function with a SELECT functionname(with or without int); varying from: ERROR: function chr(double precision) does...
19
by: Erich Pul | last post by:
hi! i got a structure, which should be filled with random integer values (it is in fact a generator for numbers like in a lotto), but these values must not be recurring, so no double occurrences...
2
by: GeorgeNewbe | last post by:
Hi all, I have a table with two columns. One has ID's and the other e-mails. For one ID I can have many e-mails. The task is to create a table where I will have one column with unique entries of...
1
imrosie
by: imrosie | last post by:
Please help with this one,,,,,I've been trying everything in my arsenal to fix this one. I'm stumped.... I"ve got a unbound combo box (customername) that has two events (on click); AfterUpdate and...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
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
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
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,...

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.