RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-18 Thread Kwang Suh
Yes. This is a terribly annoying problem. Oh well, that's what happens when there's only one number type. -Original Message- From: Sean A Corfield [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:03 PM To: CF-Talk Subject: Re: mySQL equivalent of MS Access Money

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Matt Robertson
-Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 7:44 PM To: CF-Talk Subject: mySQL equivalent of MS Access Money fieldtype? Hi, all. What's the best mySQL fieldtype to use for money? Rick

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Rick Faircloth
://mysecretbase.com -Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 7:44 PM To: CF-Talk Subject: mySQL equivalent of MS Access Money fieldtype? Hi, all. What's the best mySQL fieldtype to use for money? Rick

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Jochem van Dieten
Quoting Rick Faircloth [EMAIL PROTECTED]: I'll go with INT...what does the unsigned part mean and what are the implications of signed or unsigned? http://www.mysql.com/doc/en/Numeric_types.html BTW, your original question is answered there as well. Jochem

Re: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Stephen Moretti
Quoting Rick Faircloth [EMAIL PROTECTED]: I'll go with INT...what does the unsigned part mean and what are the implications of signed or unsigned? http://www.mysql.com/doc/en/Numeric_types.html BTW, your original question is answered there as well. Just to add INT is INTEGER

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Rick Faircloth
of the decimal? Rick -Original Message- From: Matt Robertson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 3:17 AM To: CF-Talk Subject: RE: mySQL equivalent of MS Access Money fieldtype? I use INT (unsigned) for ALL numerica vals and remove all other parms in the field spec

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Rick Faircloth
to change everything I've done. Measure twice, cut once... Thanks for your help. Rick -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:32 AM To: CF-Talk Subject: RE: mySQL equivalent of MS Access Money fieldtype? Quoting Rick

Re: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Sean A Corfield
On Tuesday, Dec 17, 2002, at 07:41 US/Pacific, Stephen Moretti wrote: INT is INTEGER which means that there's no decimal places Not much good for real money that I'm afraid. Integer is the safer way to represent money - as pennies - because that way you avoid rounding errors. Financial

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Rick Faircloth
-Original Message- From: Sean A Corfield [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 12:26 PM To: CF-Talk Subject: Re: mySQL equivalent of MS Access Money fieldtype? On Tuesday, Dec 17, 2002, at 07:41 US/Pacific, Stephen Moretti wrote: INT is INTEGER which means

Re: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread William Wheatley
did you try the float type - Original Message - From: Rick Faircloth [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Tuesday, December 17, 2002 1:09 PM Subject: RE: mySQL equivalent of MS Access Money fieldtype? I'm running into some of the very problems you mention. I tried

Re: RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread ksuh
I tried Integer, but when, for example, 100.50 gets entered into a formfield, then inserted into the db, it gets truncated to 100. How do I set up Integer to retain 2 decimal places? Multiply the number by 100. Also, I'm trying to setup the mySQL db fieldtype and CF processing such that

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Matt Robertson
, Inc. http://mysecretbase.com -Original Message- From: Sean A Corfield [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 9:26 AM To: CF-Talk Subject: Re: mySQL equivalent of MS Access Money fieldtype? On Tuesday, Dec 17, 2002, at 07:41 US/Pacific, Stephen Moretti wrote: INT

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Matt Robertson
-Original Message- From: Rick Faircloth [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 10:10 AM To: CF-Talk Subject: RE: mySQL equivalent of MS Access Money fieldtype? I'm running into some of the very problems you mention. I tried Decimal as the field type, but 100.5 gets

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Costas Piliotis
page. Clues? Rick -Original Message- From: Sean A Corfield [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 12:26 PM To: CF-Talk Subject: Re: mySQL equivalent of MS Access Money fieldtype? On Tuesday, Dec 17, 2002, at 07:41 US/Pacific, Stephen Moretti wrote: INT

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Rick Faircloth
]] Sent: Tuesday, December 17, 2002 1:26 PM To: CF-Talk Subject: RE: mySQL equivalent of MS Access Money fieldtype? Sean wrote: Integer is the safer way to represent money - as pennies - because that way you avoid rounding errors. Bingo. Sorry I didn't think to mention that last nite. 'twas a bit

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Rick Faircloth
good so far. Are there any pitfalls that I'm overlooking? Rick -Original Message- From: Costas Piliotis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 1:47 PM To: CF-Talk Subject: RE: mySQL equivalent of MS Access Money fieldtype? If I'm not mistaken, there's a float

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Costas Piliotis
Subject: RE: mySQL equivalent of MS Access Money fieldtype? Thanks for the tip, Costas and everyone. Here's what appears to be finally working: mySQL fieldtype set to: Decimal (2 decimals) For outputting to screen: CFOUTPUT#DollarFormat(Val(LSParseCurrency(Form.UCPaymentAmount)))#/CFOUTP UT

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Matt Robertson
Samuel R. Neff wrote If the goal is to replicate MS Access Money field exactly, I fortunately don't need calculation precision down that far, so I just stick to dollars and cents. But it brings up a useful point: if you do need to keep track of 10ths, 100ths, 1000ths's of a

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Rick Faircloth
]] Sent: Tuesday, December 17, 2002 3:19 PM To: CF-Talk Subject: RE: mySQL equivalent of MS Access Money fieldtype? I'd also test for european number formats. Remember that $1.00 in US is $1,00 in Europe... That's really where the LSParseCurrency function shines (I think)... -Original Message

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Kevin Graeme
:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 2:23 PM To: CF-Talk Subject: RE: mySQL equivalent of MS Access Money fieldtype? Samuel R. Neff wrote If the goal is to replicate MS Access Money field exactly, I fortunately don't need calculation precision down that far, so I just stick

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Samuel R. Neff
At 10:38 AM 12/17/2002, you wrote: (snip) cfset form.value=form.value*100 If the goal is to replicate MS Access Money field exactly, then you multiple by 1 before inserting into db and divide by 1 when retrieving. MS Access Money field supports 4 decimal places using fixed point data

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Matt Robertson
Costas Piliotis wrote #val(Form.UCPaymentAmount)# Agh... (sound of head bonking against wall) Of course val() would be a lot better than using replace() to strip out non-numeric stuff. What was I thinking when I coded that? --- Matt Robertson, MSB Designs,

Re: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Jochem van Dieten
Sean A Corfield wrote: Integer is the safer way to represent money - as pennies - because that way you avoid rounding errors. Financial applications should never use floating point to represent dollars (or whatever). If you take 0.00 and add 0.01 a hundred times, you're quite likely to

RE: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Matt Robertson
for that now. But will you in the future? -Kevin -Original Message- From: Matt Robertson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 2:23 PM To: CF-Talk Subject: RE: mySQL equivalent of MS Access Money fieldtype? Samuel R. Neff wrote If the goal is to replicate MS

Re: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Matt Robertson
Jochem wrote: snip You always have to check the manual, because even with operations involving 2 exact numeric values the outcome is often implementation-defined. Indeed. I have a client whose in-house service system relies on a rdbms that stores all numeric values to something like 13

Re: mySQL equivalent of MS Access Money fieldtype?

2002-12-17 Thread Sean A Corfield
On Tuesday, Dec 17, 2002, at 14:48 US/Pacific, Jochem van Dieten wrote: I believe the rounding baheviour of SQL is not specified to the point where you can say a priori that math will not introduce errors with any datatype. You always have to check the manual, because even with operations

mySQL equivalent of MS Access Money fieldtype?

2002-12-16 Thread Rick Faircloth
Hi, all. What's the best mySQL fieldtype to use for money? Rick ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4