I have use the trim function as part of SQL statements when reading data from a MS Access database. I have used this as part of search criteria in the SQL statement to make sure that any random spaces are removed so that matches are found. I am trying to read data from a SQL Server database and the trim function does not work because it is not a built in function. Is their any equivalent to the trim function that can be used with SQL server. An example of what i have used with access databases is as follows:
SELECT * from tblInfo where Trim(Rec_ID) = '" & sCrit & "'"