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" 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 i

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

2002-12-17 Thread Matt Robertson
Jochem wrote: >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 decimal

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

2002-12-17 Thread Matt Robertson
055. As you >say, you may not need to account 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

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 t

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) > 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 type. ~~

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 Kevin Graeme
obertson [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 Access Money field exactly, > > I fortunatel

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

2002-12-17 Thread Rick Faircloth
lto:[EMAIL PROTECTED]] 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 func

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 cent/pence/zlotyc

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

2002-12-17 Thread Costas Piliotis
o: CF-Talk 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: #DollarFormat(Val(LSParseCurrency(Form.UCPaymentAmo

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

2002-12-17 Thread Rick Faircloth
-- 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 or decimal data type in mysql... Trying to remember off the top of my head.

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

2002-12-17 Thread Rick Faircloth
and set for a precision of, say, 8,2. Cheers, --Matt Robertson-- MSB Designs, 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&

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

2002-12-17 Thread Costas Piliotis
ginal 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 that the

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

2002-12-17 Thread Matt Robertson
002 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 rounded up to 101.00...not good. I tried Integer, but when, for example, 10

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

2002-12-17 Thread Matt Robertson
s, --Matt Robertson-- MSB Designs, 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:

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 > suc

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

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

2002-12-17 Thread Rick Faircloth
MAIL 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 that there's no decimal places Not > much goo

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. Financia

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

2002-12-17 Thread Rick Faircloth
r that I missed one little aspect of the situation that requires me 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

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

2002-12-17 Thread Rick Faircloth
aren't zero to the right 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

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

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 Rick Faircloth
Thanks, Matt. I'll go with INT...what does the "unsigned" part mean and what are the implications of "signed" or "unsigned"? Rick -Original Message- From: Matt Robertson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 17, 2002 3:17 AM To: CF-Talk

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

2002-12-17 Thread Matt Robertson
I use INT (unsigned) for ALL numerica vals and remove all other parms in the field spec. This results in INT(10) unsigned. Then I use CF to format the value according to whatever display rules I want the output to follow. --Matt Robertson-- MSB Designs, Inc. http://mysecretbase.com -Origi