I've had a quick read on numberformat(), so hopefully that will help. But yes, it's part of a resulting query, and the output for the query already has the following:
<cfoutput query="results">
<tr bgcolor="#IIf(CurrentRow Mod 2, DE('ffffff'), DE('eeeeee'))#">
<td>#team_name#</td>
<td>#results["wins_round_#round_number_results#"][currentRow]#</td>
<td>#results["margin_round_#round_number_results#"][currentRow]#</td>
<td>#total_wins#</td>
<td>#total_margins#</td>
<td>#total_score#</td>
</tr>
</cfoutput>
A little explaining might help make some sense of the above. wins_round_1, wins_round_2, wins_round_3 etc are all columns in the table that's queried. So I'm collecting the results for the current round_number and outputting for every team. The question is: how do I apply numberformat() to set the following row output to 0 decimal places...
<td>#results["wins_round_#round_number_results#"][currentRow]#</td>
Is it better to attempt to use numberformat at the output level, or select cast inside the query? My original query currently selects * (every column) so I'm not sure how to specify select cast for just one column when I want all the rest (remembering not all columns in the dbase table are in number format) and I only output those I want.
Regards
Mark Henderson
Web Designer
mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
205 Main Street
PO Box 143, Gore
Southland 9700
Phone: (03) 203 9999
Fax: (03) 203 9900
-----Original Message-----
From: Joe Rinehart [mailto:[EMAIL PROTECTED]
Sent: Friday, August 06, 2004 1:35 PM
To: CF-Talk
Subject: Re: Rounding number format to 0 decimal places
If you need it at the query level, you can do:
SELECT CAST(columnToBeInt AS INT)
Otherwise, the numberFormat() can do wonders when it comes to, well,
formatting numbers.
-joe
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

