Hi Jochem,
Didn't get a chance to test this, seems to have sorted itself??? Must have been
some weird caching thing.
Thanks anyway.
R
~|
Macromedia ColdFusion MX7
Upgrade to MX7 experience time-saving features, more
Richard Cooper wrote:
I have two pratically identical SQL statements. The only difference is this
line:
AND RP.productID = cfqueryparam value=#URL.productID#
cfsqltype=cf_sql_integer /
When this line is included the output of the decimal field RP.options changes
from 2.50
Why would that work? URL.productID is an integer and the PK of the that table
productID being decimal or integer shouldn't affect the option field, surely?
~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 MX7 integration
Richard Cooper wrote:
Why would that work? URL.productID is an integer and the PK of the that table
productID being decimal or integer shouldn't affect the option field, surely?
It shouldn't work :) I just know it did with some old Oracle versions.
Jochem
I have this formula works fine for converting into fractions.
function decimal2frac(xvalue)
{
// x value is decimal portion
var numer = xvalue;
var denom1 = 1;
var i = 0;
for (i=0; i lt (len(xvalue) -1);i=i+1)
{
numer
In case anyone is interested, I worked out a solution.
#Replace(DecimalFormat(number),'.00','')#
Easy eh :-)
Russ
-Original Message-
From: Snake [mailto:[EMAIL PROTECTED]
Sent: 13 February 2006 13:12
To: CF-Talk
Subject: RE: Decimal places
I did consider the storing as varchar
or
decimalformat to make sure you are getting what you want. I'm not sure if
there is another solution to that.
-Original Message-
From: Snake [mailto:[EMAIL PROTECTED]
Sent: Sunday, 12 February 2006 10:19
To: CF-Talk
Subject: RE: Decimal places
The problem is not the way the database stores
February 2006 05:06
To: CF-Talk
Subject: Re: Decimal places
I'm not sure what exactly you're asking. 1.078E+07 isn't an equation, just
scientific notation. Are you saying your DB is returning numbers of that
format, and you want to display them through CF as normal
decimal numbers? Or something
This will fix up large numbers in scientific notation, while leaving
alone anything that has something after the decimal point (which is
highly unlikely in the large numbers so all should be well):
cfif theNumberToFormat eq Fix(theNumberToFormat)
cfset MyShownNumber
PROTECTED]
Sent: Sunday, February 12, 2006 4:20 AM
To: CF-Talk
Subject: RE: Decimal places
Barney,
I'm not sure why your not sure, I think I explained it pretty well.
My problem is that I need to display the original number in it's
original format unchanged.
So if the number is 345
I want
So if the number is 345
I want to display 345
If the number is 2367457234572345723
I want to display 2367457234572345723
If the number is 34.89
I want to display 34.89
I think see what you mean:
In physics, numbers like 1.0, 1.00, 1.000 are not the same, but in math
and in computers, they are.
The problem is not the way the database stores the number, it's formatting
the output.
-Original Message-
From: Jeff Garza [mailto:[EMAIL PROTECTED]
Sent: 12 February 2006 14:55
To: CF-Talk
Subject: RE: Decimal places
Unfortunately, that is just the way things go when dealing
-Original Message-
From: Snake [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 12, 2006 6:20 AM
To: CF-Talk
Subject: RE: Decimal places
Barney,
I'm not sure why your not sure, I think I explained it pretty well.
My problem is that I need to display the original number
on
the result, store it as a varchar. You can use a CONVERT function in any
SQL statements that need to use the information for calculations...
-Original Message-
From: Snake [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 12, 2006 9:19 AM
To: CF-Talk
Subject: RE: Decimal places
The problem
Davis [mailto:[EMAIL PROTECTED]
Sent: 12 February 2006 18:00
To: CF-Talk
Subject: RE: Decimal places
-Original Message-
From: Snake [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 12, 2006 6:20 AM
To: CF-Talk
Subject: RE: Decimal places
Barney,
I'm not sure why your not sure, I
Cheers James, it's an answer at least.
russ
-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED]
Sent: 12 February 2006 12:13
To: CF-Talk
Subject: Re: Decimal places
This will fix up large numbers in scientific notation, while leaving alone
anything that has something after
I could just display the number as returned by the query.
There is NO displayed number returned by query, then you just cannot
display it as returned by the query.
Numbers returned by queries are numbers coded in some internal binary
format.
Unless you store them as text, or in some special
to make sure you are getting what you want. I'm not sure if
there is another solution to that.
-Original Message-
From: Snake [mailto:[EMAIL PROTECTED]
Sent: Sunday, 12 February 2006 10:19
To: CF-Talk
Subject: RE: Decimal places
The problem is not the way the database stores the number
I'm not sure what exactly you're asking. 1.078E+07 isn't an equation,
just scientific notation. Are you saying your DB is returning numbers
of that format, and you want to display them through CF as normal
decimal numbers? Or something else?
cheers,
barneyb
On 2/11/06, Snake [EMAIL PROTECTED]
IsNumeric comes to mind.
-Original Message-
From: Stuart Kidd [mailto:[EMAIL PROTECTED]
Sent: Friday, January 13, 2006 9:03 AM
To: CF-Talk
Subject: Decimal - more
Sorry, i should actually check whether it's a number as opposed to just
characters/number combo.
Is there a way to do
That does the trick nicely, thank you! :)
From: Adkins, Randy [EMAIL PROTECTED]
Sent: Friday, January 13, 2006 9:08 AM
To: CF-Talk cf-talk@houseoffusion.com
Subject: RE: Decimal - more
IsNumeric comes to mind.
-Original Message-
From: Stuart
Stuart Kidd wrote:
That does the trick nicely, thank you! :)
I once spent a lot of time building a custom tag that would give me the
filename or path given a full directory/path combo.
Ie, take C:\Inetpub\wwwroot\foo.cfm and return foo.cfm or
C:\Inetpub\wwwroot
Then I discovered
Which is what I found most helpful in doing the CF Exam. I went through all
the functions and tags and had more than one a moments.
Ade
-Original Message-
From: Rick Root [mailto:[EMAIL PROTECTED]
Sent: 13 January 2006 14:51
To: CF-Talk
Subject: Re: Decimal - more
Stuart Kidd
2006 15:02
To: CF-Talk
Subject: RE: Decimal - more
Which is what I found most helpful in doing the CF Exam. I went through all
the functions and tags and had more than one a moments.
Ade
-Original Message-
From: Rick Root [mailto:[EMAIL PROTECTED]
Sent: 13 January 2006 14:51
QofQ is invaluable for reducing unnecessary DB calls - it is not so hot in
6/6.1 but better in 7 I hear.
-Original Message-
From: Snake [mailto:[EMAIL PROTECTED]
Sent: 13 January 2006 15:22
To: CF-Talk
Subject: RE: Decimal - more
I had that recently with QofQ.
I have never once used
a problem this week that was easily solved with it, but I forgot it
bloody existsed.
Russ
-Original Message-
From: Adrian Lynch [mailto:[EMAIL PROTECTED]
Sent: 13 January 2006 15:02
To: CF-Talk
Subject: RE: Decimal - more
Which is what I found most helpful in doing the CF Exam. I
Depends on what you mean by this. If you are looking for a test of
whether it is an integer versus a real number with non-zero digits after
the decimal point, then you can use this:
CFIF Variables.MyVar = Int (Variables.MyVar
!--- Variables.MyVar is an integer. ---
CFELSE
!---
It's your column spec. Decimal(3,1) means 3 digits are allowed, and 1 digit to
the right of the decimal is allowed.
You need to change it to Decimal(4,1) if you want those other values.
Dave
-Original Message-
From: Tangorre, Michael [mailto:[EMAIL PROTECTED]
Sent: Friday, August 12,
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
It's your column spec. Decimal(3,1) means 3 digits are
allowed, and 1 digit to the right of the decimal is allowed.
You need to change it to Decimal(4,1) if you want those other values.
That is not correct.
From BOL:
'p' Specifies the
My bad I thought the decimal (.) is included in the digits I must be
thinking of a different database language.
By the way, what is 'BOL' ?
Dave
-Original Message-
From: Tangorre, Michael [mailto:[EMAIL PROTECTED]
Sent: Friday, August 12, 2005 12:39 PM
To: CF-Talk
Subject: RE
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
By the way, what is 'BOL' ?
Books On-Line from Microsoft.
~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and
By the way, what is 'BOL' ?
SQL Server Books Online.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at
You can also return the appropriate value from Oracle directly, using:
to_char(whatever_column_name,'TM9')
-Original Message-
From: B G [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 13 April 2005 6:04 AM
To: CF-Talk
Subject: Re: Decimal Formatting
Beautiful! That did the trick! Thank
,'TM9')
-Original Message-
From: B G [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 13 April 2005 6:04 AM
To: CF-Talk
Subject: Re: Decimal Formatting
Beautiful! That did the trick! Thank you.
--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/
Got Gmail? I
NUMBER columns are actually stored as strings, so you'll always get
exactly 2 decimal places. Try this:
cfif myNum EQ int(myNum)
#int(myNum)#
cfelse
#REreplace(myNum, 0+$, )#
/cfif
cheers,
barneyb
On Apr 12, 2005 2:38 PM, B G [EMAIL PROTECTED] wrote:
There's a simple solution here that is
Beautiful! That did the trick! Thank you.
From: Barney Boisvert [EMAIL PROTECTED]
Reply-To: cf-talk@houseoffusion.com
To: CF-Talk cf-talk@houseoffusion.com
Subject: Re: Decimal Formatting
Date: Tue, 12 Apr 2005 14:45:33 -0700
NUMBER columns are actually stored as strings, so you'll always get
Tack on a zero:
99 + 0.1
Cheers,
barneyb
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, July 12, 2004 2:15 PM
To: CF-Talk
Subject: decimal addition
I rather sheepishly ask:
How does one (anyone!) accomplish this trivial task w/o
error:
note to self: Tack on a zero.
Thank you!
Barney Boisvert [EMAIL PROTECTED]
07/12/2004 05:27 PM
Please respond to cf-talk
To:CF-Talk [EMAIL PROTECTED]
cc:
Subject:RE: decimal addition
Tack on a zero:
99 + 0.1
Cheers,
barneyb
[Todays Threads]
[This Message]
[Subscription]
[Fast
just add a zero...
cfset num = 99 + 0.1
or cfset num = 99.1
What error are you getting and what's your whole code look like?
I rather sheepishly ask:
How does one (anyone!) accomplish this trivial task w/o
error: cfset num
= 99 + .1
Is there a function that I'm missing? - e.g. cfset num =
The only thing I've found is to use enough '9's to make sure
you cover the
length. Unfortunately, (unless someone else knows) you can't
do infinity
before the decimal points.
#NumberFormat(yournumber,"99.99")#
You can also try DecimalFormat (possibly new
Colin-
A while back I wrote up a nice in-depth post on how to round to an arbitrary
precision. I archived it at:
http://www.egroups.com/message/cf-hacks/3
I won't bother reposting it here unless there is a demand for it. Let me
know if it isn't what you are looking for.
HTH,
Rick
The only thing I've found is to use enough '9's to make sure you cover the
length. Unfortunately, (unless someone else knows) you can't do infinity
before the decimal points.
#NumberFormat(yournumber,"99.99")#
Ed Martin
enVision Training and Development, Inc.
This seems to work, albeit a little cumbersome.
Cfset number = 123456789123456.78912
CFSET newnum = #ListFirst(number, ".")#"."#Left(ListLast(number,
"."),2)#
Larry Juncker
Senior Cold Fusion Programmer
Heartland Internet
-Original Message-
From: Colin Robinson [mailto:[EMAIL
Yes. Using JavaScript and onKey().
Jim
-Original Message-
From: Parker, Kevin [EMAIL PROTECTED]
To: CF Talk (E-mail) [EMAIL PROTECTED]
Date: Sunday, June 25, 2000 8:22 PM
Subject: Decimal points
Is it possible to limit the number of places an end user can enter in a
decimal value in
-Original Message-
From: Jim McAtee [mailto:[EMAIL PROTECTED]]
Sent: Monday, 26 June 2000 12:09:PM
To: [EMAIL PROTECTED]
Subject: Re: Decimal points
Yes. Using JavaScript and onKey().
Jim
-Original Message-
From: Parker, Kevin [EMAIL PROTECTED]
To: CF Talk (E-mail) [EMAIL
45 matches
Mail list logo