IamreallyStuck
Technical User
Hi,
I'm having trouble with using 'Substitute' in my query.
I have a table containing two fields, 'Squares' and 'For'.
'Squares' contains text enclosed in square brackets, and I want to get rid of the square brackets but keep the rest of the string.
'For' sometimes contains the word 'for' within the string. If the word 'for' is within the string, I want to get rid of the word 'for' and all the text before it. I.e., if the 'For' field contains "Present for Bob", I want the query to just return 'Bob'.
I've tried to use: SUBSTITUTE([Squares],"[",""
and
SUBSTITUTE([For],"*for",""
as the criteria for my fields, but it does not seem to work.
Has anyone got a solution to this?
Thanks, Lee.
I'm having trouble with using 'Substitute' in my query.
I have a table containing two fields, 'Squares' and 'For'.
'Squares' contains text enclosed in square brackets, and I want to get rid of the square brackets but keep the rest of the string.
'For' sometimes contains the word 'for' within the string. If the word 'for' is within the string, I want to get rid of the word 'for' and all the text before it. I.e., if the 'For' field contains "Present for Bob", I want the query to just return 'Bob'.
I've tried to use: SUBSTITUTE([Squares],"[",""
SUBSTITUTE([For],"*for",""
as the criteria for my fields, but it does not seem to work.
Has anyone got a solution to this?
Thanks, Lee.