Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Access SQL get rid of spaces

Hi
I am using the following Access SQL statement to find distinct values.
How do I update the statement so that it shaves any spaces off the side of the word.
For example one of the text values came up as " Parents"

"SELECT DISTINCT [Applicable to] FROM [Table1] Where [School] = 'Saints'"
ASKER CERTIFIED SOLUTION
Avatar of Pratima
Pratima
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Use Trim()


"SELECT DISTINCT [Applicable to] FROM [Table1] Where [School] = trim('Saints')"

http://www.databasedev.co.uk/access-sql-string-functions.html
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Using trim function.
Avatar of Murray Brown

ASKER

Thank you both