Remove Part Of A String

CharlesWhiteman

Registered User.
Local time
Today, 20:02
Joined
Feb 26, 2007
Messages
421
I need, in a query, to be able to remove the "C:\TestDataToImport" part of the string.

Any advice/clues reved most greatfully

C:\TestDataToImport\AB3491\Payroll\2008\080411__P35 - Employer ANnual Return April 07 to April 08.tif

Thanks
 
I believe something like this might work

SELECT Right(yourtextfield,Len(yourtextfield)-19) AS PortionOfString
FROM yourtable
 
I assume the rest of the path / file name can vary depending which record you view?
Code:
Right([FieldName],len([FieldName])-19)
The above code should trim the first 19 characters from the string in the field "FieldName". It calculates the length of the field minus 19 characters then shows that many characters starting from the end of the string.
 

Users who are viewing this thread

Back
Top Bottom