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
Access query to include lowest value from another table
remove old computers from active directory 2008
'System.Configuration.Conf<wbr />igurationE<wbr />xception' occurred in system.dll
Outlook cannot connect to Exchange 2007 during a DC reboot
0x0000007B (0xBA4C3524, 0xC0000034, 0x00000000, 0x00000000)
After Update in Access
how to control the veiw of a subreport?
writing a fixed length text file
remote web workplace and full screen setting not working
convertin CString to const char*