Why not trim in the query? select rtrim(ltrim(col)), etc
======================================================================= Raymond Camden, ColdFusion Jedi Master for Macromedia Email : [EMAIL PROTECTED] Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda > -----Original Message----- > From: James Blaha [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 10, 2002 10:05 AM > To: CF-Talk > Subject: Issue: Trying to loop through a query and trim all > the fields in the table before I output them without having > to hardcode each field. > > > Hello All: > > Issue: Trying to loop through a query and trim all the fields in the > table before I output them without having to hardcode each field. > . > Sincerely, > James Blaha > > <CFQUERY NAME="JobApplicants" DATASOURCE="HRWebAgent"> > SELECT * > FROM dbo.tApply > </CFQUERY> > > > <CFOUTPUT> > <CFLOOP QUERY="JobApplicants"> > > <CFSET ValuesPassed = TRIM(#ValuesPassed#)> > #ValuesPassed#<br> > > </CFLOOP> > </CFOUTPUT> > > > This code works for form fields and I want to do the same for > the query > results. > > <!--- To output the active variables uncomment ---> > <CFOUTPUT> > <CFLOOP ITEM="ValuesPassed2" COLLECTION="#FORM#"> > <!--- <CFOUTPUT><strong>Form.#ValuesPassed2#</strong> = > <strong>#Form[ValuesPassed2]#</strong><br></CFOUTPUT> ---> > > <CFSET ValuesPassed2 = TRIM(#FORM[ValuesPassed2]#)> > #ValuesPassed2#<br> > > </CFLOOP> > </CFOUTPUT> > > > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ > Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists > ______________________________________________________________________ This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists