Errr...ummmm, I didn't read your message in its entirety. Fields of a
certain type will always store a precision length even after using the
ROUND function. Try this instead:

SELECT CONVERT(NUMERIC(8,2), TheField) AS TheField
FROM MyTable

That will only give you six digits to the left of the decimal point.
Increase the 8 to something higher for more.

Benjamin S. Rogers
http://www.c4.net/
v.508.240.0051
f.508.240.0057

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 03, 2002 6:22 PM
To: CF-Talk
Subject: Re: How do you change this number 70.0500 to 70.05?


How do you round it off?



> Multiply the number b7 100, round it off, and then divide by 100.
>
> Benjamin S. Rogers
> http://www.c4.net/
> v.508.240.0051
> f.508.240.0057
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 03, 2002 4:22 PM
> To: CF-Talk
> Subject: Re: How do you change this number 70.0500 to 70.05?
>
>
> Thanks for your help. Only thing is a list of about 1000 clients is 
> merged into the Activ Mail tag, and so each record has to be formatted

> within the query itself because Active Mail only takes lists from the 
> query, not from CFPARAM or CFSET. The emails go out only to clients 
> who's accounts are past due, but again the email tag uses variables 
> only coming directly from within a query. Also, the database is 
> managed by another company and they may be averse to changing the 
> field type to decimal with a scale of 2, although I'm going to try 
> that as the first option.
>
> Is there anyway to perhaps format fields with a function directly in 
> the queries?
>
> Regards,
> Pardeep.
>
> ----- Original Message -----
> From: "Christopher Olive" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Wednesday, April 03, 2002 12:59 PM
> Subject: RE: How do you change this number 70.0500 to 70.05?
>
>
> > try making the field "decimal" with a scale of 2.
> >
> > christopher olive
> > cto, vp of web development, vp it security
> > atnet solutions, inc.
> > 410.931.4092
> > http://www.atnetsolutions.com
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 03, 2002 4:08 PM
> > To: CF-Talk
> > Subject: Re: How do you change this number 70.0500 to 70.05?
> >
> >
> > Anyone have any idea how to change a number thats being outputted 
> > from
>
> > a table as 70.0500 to 70.05 with only 2 decimal points.
> >
> > Is this doable thru a change in SQL 2000 or a change in the query 
> > itself?
> >
> > I'm doing an email merge, and the tag used won't allow formatting of

> > anything within the body of the email, so the data has to be 
> > correctly
>
> > formatted before being inserted into the email. The above number is 
> > a
> dollar
> > amount owed by customers past due, so it need to be displayed in the

> > email as $70.05 and right now shows as $70.0500
> >
> > Appreciate any insights. Thanks.
> >
> >
> >
>
> 

______________________________________________________________________
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to