Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with removing double text entries

Status
Not open for further replies.

linuxjr

Programmer
Jun 2, 2001
135
US
I have what I believe is a tricky question. I am downloading data from one database system into mine every hour. I notice in the information from the database I'm downloading enters the engineer's comments every trip they make to a site.

So when we run reports from my database system it shows comments like this for example

Notes: Test
Notes: Test

Is their a way via sql to search through the text and only trim to one line instead of multiple so the notes will only say:

Notes: Test

Once.

Any information or tips will be greatly appreciated. Have a great day.
 
What about SELECT DISTINCT ?

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
I know you would use select distinct but the problem is the database system I am downloading from is they set it up that if work was being done and the engineer makes it inserts the same comments for each trip even though the trip is something different. Here is an example

Example:
John Doe 12/1/2003 Fixed Battery <--- First Trip (fix)
John Doe 1/4/2004 Part <---- Order Part

In this database system their are two rows with different trip dates and other information which I get while being distinct but the comments are always copied for each insert so their can be ten different reasons to work on the site but the comments are always the same.

So when I grab all ten lines I'm getting the same comments. I hope this explaination is a little more clearer. But thanks for the quick response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top