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
Normal.dot NOT set to read-only, but i cannot delete or rename it
SystemDB and MDW questions
replace field value with another value using MS TSQL
There isn't enough memory to perform this operation
How to use CDatabase's ExecuteSQL to find the record or row and then get the result, such as in CRecordSet
Does waiting for a web service's reponse use "clock cycles"?
MS Access onto a websever
SBS 2003 Error - Windows could not start because of an error in the software. Please report this problem as : load needed DLLs for kernel.
Unable to remove buritos.exe trojan from UPS email
Use a second axis in Acces PivotChart