Murray Brown
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'"
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Using trim function.
ASKER
Thank you both
"SELECT DISTINCT [Applicable to] FROM [Table1] Where [School] = trim('Saints')"
http://www.databasedev.co.uk/access-sql-string-functions.html