Feb 26, 2008 #1 meagain MIS Nov 27, 2001 112 CA I'm looking for a formula to use in an update query which will remove the last 3 characters in a string of variable length. Thank you!!
I'm looking for a formula to use in an update query which will remove the last 3 characters in a string of variable length. Thank you!!
Feb 26, 2008 #2 JerryKlmns IS-IT--Management Feb 7, 2005 2,062 GR Take a look at Left() and Len() build-in functions Upvote 0 Downvote
Feb 26, 2008 #3 KenReay Programmer Aug 15, 2002 5,424 GB Update mytable set mystring = left(mystring,len(mysstring)-3); using your tablename and column name of course Regards Ken Reay Freelance Solutions Developer Boldon Information Systems Ltd Website needs upgrading, but for now - http://www.kenneth.reay.btinternet.co.ukUK Upvote 0 Downvote
Update mytable set mystring = left(mystring,len(mysstring)-3); using your tablename and column name of course Regards Ken Reay Freelance Solutions Developer Boldon Information Systems Ltd Website needs upgrading, but for now - http://www.kenneth.reay.btinternet.co.ukUK
Feb 26, 2008 #4 JerryKlmns IS-IT--Management Feb 7, 2005 2,062 GR Although I hate when I steel the joy from discovering new frontiers, Code: UPDATE yourTableName SET yourFieldName = Left([yourFieldName], Len([yourFieldName])-3) WHERE Len([yourFieldName])> 3; In case there are only 2 characters in the string of variable length. Upvote 0 Downvote
Although I hate when I steel the joy from discovering new frontiers, Code: UPDATE yourTableName SET yourFieldName = Left([yourFieldName], Len([yourFieldName])-3) WHERE Len([yourFieldName])> 3; In case there are only 2 characters in the string of variable length.