If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Truncating a field

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-04, 04:49
harg7769 harg7769 is offline
Registered User
 
Join Date: Mar 2004
Location: Glasgow
Posts: 8
Truncating a field

I have a column within a table containing personal details, among them the column "surname". For reasons best known to ourselves, included in this surname are the initials of the person's first names, e.g. Michael J Fox would have his surname listed as "Fox MJ".

What I need to do is write a query which removes these initials, bearing in mind that all the surnames will be different lengths, and some will have no initials at all after their surname.

Cheers

Andrew H
Reply With Quote
  #2 (permalink)  
Old 04-01-04, 16:05
cpaul_it cpaul_it is offline
Registered User
 
Join Date: Jul 2003
Posts: 8
Re: Truncating a field

In my opinion, the results you want are incongruent with the design of the table. If the last name with no appended data is needed, then the data would have been best stored that way. It gets back to long-standing data design policies.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On