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
Can I install SQL 2005 32-bit on Windows Server 2003 64-bit?
Installing Access 2003 using Access 2007 key
While trying to logon to a remote server using Remote Desktop, I get the message "The local policy of this system does not permit you to logon interatively"
remote shutdown dos how to trace
Offline files sync problem
Deleted row information cannot be accessed through the row
Password in VB.NET
Excel Instances- Refering to the Instance in VBA
HTTPS forms loading slow or not loading at all. Using IE6, IE7 and firefox.
SharePoint Multi Column Lookup