Jamie it didn't work. What about something like this? But its not 
working right.

<CFQUERY NAME="JobApplicants" DATASOURCE="HRWebAgent">
SELECT *
FROM   dbo.tApply

</CFQUERY>

<cfoutput>#JobApplicants.ColumnList#<br></cfoutput><P>

<CFLOOP INDEX="I" LIST="#JobApplicants.ColumnList#">

<CFLOOP INDEX="II" FROM="1" TO="#JobApplicants.RecordCount#">
<CFSET vCol = evaluate("JobApplicants." & I & "[" & II & "]")>
<CFOUTPUT>#vCol#</CFOUTPUT><BR>

</CFLOOP>

</CFLOOP>


Jamie Jackson wrote:

>Congratulations, you win the prize for longest subject line. :D
>
>I'd trim in the query itself, but if you want to:
>
><cfquery name="jobapplicants">
><cfscript>
>for (i=1; i LTE listlen(jobapplicants.columnlist); i=i+1) {
>       colName = listgetat(jobapplicants.columnlist, i);
>       querySetCell(jobapplicants, colName, trim(evaluate(colName)),
>jobapplicants.currentrow);     
>} 
></cfscript>
></cfquery>
>
>..something like that, anyway.
>
>Consider doing it in the query, though.
>
>Jamie
>
>On Wed, 10 Jul 2002 10:04:50 -0400, in cf-talk you wrote:
>
>>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
>>
>
>
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
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

Reply via email to