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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String Manipulation

Status
Not open for further replies.

donnew

IS-IT--Management
Jul 5, 2001
5
US
Have a column of fields that contain a string as follows:
40/123456789
Need to change the string to read: 40/6789 that is the first 3 characters of the string and the last four characters of the string
Need to change all fields in the column,

Any help is appreciated..... don
 
This should do the trick. Enter it in the SQL view of your query.


UPDATE Table1 SET FieldName = Left([FieldName],4) & Right([FieldName],4);
Maq B-)
<insert witty signature here>
 
Maq almost got it right. He missed that you wanted the first three, not four.

UPDATE Table1 SET FieldName = Left([FieldName],3) & Right([FieldName],4);

But, give him credit...
Terry M. Hoey
 
Ooops, Sorry. I misread it. I thought he wanted the first 3 plus the &quot;/&quot;.

(She, not he, Terry. Yeah, I know you can't tell with a gender neutral handle) :) Maq B-)
<insert witty signature here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top