Microsoft
Software
Hardware
Network
Question : Access 2007 - Query - String Manipulation - I need to cut delete the first two Characters in a Field based on criteria
I have a table with 9 Fields, with 100.000 individual records. in Field 5 I have PartNumbers that I have imported from another application, but for some strange reason the Import Process added either a character "1" and an empty space or an "0" and an empty space before some of them (5000 records affected).
I have tried to create multiple update queries but i get the Len/Trim/ Functions wrong.....so i am begging the "EE-Force" for help ;-)
A correct entry looks like this > 1Q9 999 999 XX XXX (numbers and letters mixed with spaces, always the same construction of 3 char, one space, 3 char, one space....the first character could be a number from 1-9
The wrong code looks like this > 1 1Q9 999 999 XX XXX > The first position now has an additional "1" (or in some cases a "0") character.
I think my problem is because i have to delete the "1 " but keep the following "1"
Can this be done with a Query in Query Design or do I need to use VBA code to clean-up the 5000 records???
Thanks in advance for your thoughts.
MC
Answer : Access 2007 - Query - String Manipulation - I need to cut delete the first two Characters in a Field based on criteria
Correction
Does This do it:-
UPDATE Table1 SET PartNumber = Right(PartNumber, Len(PartNumber) - 2)
WHERE Left(PartNumber, 2) = "1 " OR Left(PartNumber, 2) = "0 "
DJ
Random Solutions
why is edgetransport.exe running...It is not intalled!
Bat file keeps repeating at command line
Chinese characters and Excel
AJAX Calendar extender not displaying properly.
Error 404 on MOSS2007
Executing the Report_Load() on a SubReport
ODBC connection error
Opinion - best portable hard drive to backup SBS
load a subtree into an XDocument
Creating event "boxes" around a clock (powered by Events list)