Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ltrim RTrim In query 2

Status
Not open for further replies.

SeeWard

Programmer
Mar 21, 2005
89
US
Hi is it possible to use the
Ltrim(Rtrim(fieldname)) in a query? If not where should it go? I'm trying to clean up data and it's proving to truly cleaning 'wash, rinse, repeat...wash, rinse...etc'
 
Thank you very much. Do you know if it's possible to trim the field upon enetering it in a Form. Could I validate it at all in that way?
 
I think you will find the entry is right trimmed automatically when entered in a form control. But, instead of LTrim() & RTrim(), you could use plain ol' Trim() which trims leading and training spaces.

But, back to your original question concerning use of trim functions in a query, yes you may. You can create an Update query where the Update To is the trim function
Code:
UPDATE {tablename} SET {tablename}.{fieldname} = Trim({fieldname})
 
I find all of your suggestions and comments very useful. This is exactly why I search here before anywhere else. Thank you!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top