G Gismo Registered User. Local time Today, 16:44 Joined Jun 12, 2017 Messages 1,298 Jul 19, 2022 #1 Hi all, I want to replace all records with a "-" to no spaces starting with AS350A AS35A012-345-78 to AS35A01234578 Please advise ho to use like with a replace statement
Hi all, I want to replace all records with a "-" to no spaces starting with AS350A AS35A012-345-78 to AS35A01234578 Please advise ho to use like with a replace statement
arnelgp ..forever waiting... waiting for jellybean! Local time Today, 21:44 Joined May 7, 2009 Messages 20,349 Jul 19, 2022 #2 use Replace() function: if you want to Update the field, use Update query: Update yourTable Set theField = Replace(theField & "", "-", "");
use Replace() function: if you want to Update the field, use Update query: Update yourTable Set theField = Replace(theField & "", "-", "");
Uncle Gizmo Nifty Access Guy Staff member Local time Today, 14:44 Joined Jul 9, 2003 Messages 17,490 Jul 19, 2022 #3 arnelgp said: use Update query: Click to expand... Make backup first! This can't be undone...
G Gismo Registered User. Local time Today, 16:44 Joined Jun 12, 2017 Messages 1,298 Jul 19, 2022 #4 arnelgp said: use Replace() function: if you want to Update the field, use Update query: Update yourTable Set theField = Replace(theField & "", "-", ""); Click to expand... Thank you
arnelgp said: use Replace() function: if you want to Update the field, use Update query: Update yourTable Set theField = Replace(theField & "", "-", ""); Click to expand... Thank you
G Gismo Registered User. Local time Today, 16:44 Joined Jun 12, 2017 Messages 1,298 Jul 19, 2022 #5 Uncle Gizmo said: Make backup first! This can't be undone... Click to expand... This is a temporary file so should be ok but thank you for the advise One record at a time
Uncle Gizmo said: Make backup first! This can't be undone... Click to expand... This is a temporary file so should be ok but thank you for the advise One record at a time
Uncle Gizmo Nifty Access Guy Staff member Local time Today, 14:44 Joined Jul 9, 2003 Messages 17,490 Jul 19, 2022 #6 Gismo said: thank you for the advise Click to expand... It's easy to forget the backup step, especially when you are trying something new... Caught me out more than once!
Gismo said: thank you for the advise Click to expand... It's easy to forget the backup step, especially when you are trying something new... Caught me out more than once!
Gasman Enthusiastic Amateur Local time Today, 14:44 Joined Sep 21, 2011 Messages 17,048 Jul 19, 2022 #7 I would even do a select first to see what I get, before even trying any update query.
C CJ_London Super Moderator Staff member Local time Today, 14:44 Joined Feb 19, 2013 Messages 17,545 Jul 19, 2022 #8 arnel's suggestion does not quite meet your requirement Update yourTable Set theField = Replace(theField & "", "-", "") WHERE theField Like 'AS350A*'
arnel's suggestion does not quite meet your requirement Update yourTable Set theField = Replace(theField & "", "-", "") WHERE theField Like 'AS350A*'