Re: Seeking advice on currency type

2005-04-30 Thread Harald Fuchs
? I'd say storing and converting doesn't matter much, but currency amounts are often summed up (say for a monthly report over a huge table). For this INT should be a big win. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com

Re: Seeking advice on currency type

2005-04-30 Thread Paul DuBois
of it. For the new DECIMAL type, storage requirements are less than before, and comparisons are faster. Either way, do you have a feel (or access to any studies) for the impact of using DECIMAL instead of INTEGER for currency? I'd just wonder if it's enough to make up for all the required conversions going

Seeking advice on currency type

2005-04-29 Thread Scott Purcell
Hello, I am seeking to create a table to hold prices for products. I am not sure what type would be best. According to the docs, I have many choices, dec, double, float, etc. Can anyone give me an idea, of which is the proper choice for handling US currency like so: 1500.99 Thanks, Scott K

Re: Seeking advice on currency type

2005-04-29 Thread Hassan Schroeder
Scott Purcell wrote: I am seeking to create a table to hold prices for products. I am not sure what type would be best. According to the docs, I have many choices, dec, double, float, etc. Can anyone give me an idea, of which is the proper choice for handling US currency like so: 1500.99 I

Re: Seeking advice on currency type

2005-04-29 Thread Harald Fuchs
, of which is the proper choice for handling US currency like so: 1500.99 I can't imagine any reason to use a type other than DECIMAL for a currency value. A reason could be performance. Storing cent values in an INT field is more efficient. -- MySQL General Mailing List For list archives: http

Re: Seeking advice on currency type

2005-04-29 Thread Hassan Schroeder
Harald Fuchs wrote: I can't imagine any reason to use a type other than DECIMAL for a currency value. A reason could be performance. Storing cent values in an INT field is more efficient. Are you saying that storing and/or retrieving a DECIMAL value takes appreciably more time than an INTEGER

Re: Seeking advice on currency type

2005-04-29 Thread Paul DuBois
At 15:24 -0700 4/29/05, Hassan Schroeder wrote: Harald Fuchs wrote: I can't imagine any reason to use a type other than DECIMAL for a currency value. A reason could be performance. Storing cent values in an INT field is more efficient. Are you saying that storing and/or retrieving a DECIMAL value

RE: Seeking advice on currency type

2005-04-29 Thread mathias fatene
:[EMAIL PROTECTED] Sent: samedi 30 avril 2005 00:25 To: mysql@lists.mysql.com Subject: Re: Seeking advice on currency type Harald Fuchs wrote: I can't imagine any reason to use a type other than DECIMAL for a currency value. A reason could be performance. Storing cent values in an INT field

Re: Seeking advice on currency type

2005-04-29 Thread Hassan Schroeder
DECIMAL instead of INTEGER for currency? I'd just wonder if it's enough to make up for all the required conversions going on in the app layer :-) -- Hassan Schroeder - [EMAIL PROTECTED] Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com

inserting currency as a double

2004-04-08 Thread dan orlic
My final issue is inserting a currency, $500.00 for example into a field that is a BigDecimal(10,2). Anyone have any thoughts on how to do that within a SQL statement? dan -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com

Storing currency values

2004-01-12 Thread Asbjørn Konstad
Hello. I’ve spent some day(s) probing the web to find a solution to this problem: A table-column for storing currency – float(10,2). As my users are punches the currency value like this “255,55”, with a comma as decimal point, MySQL stores this value as zero (0.00). I quess the reason

Re: Storing currency values

2004-01-12 Thread Mikhail Entaltsev
, January 12, 2004 11:33 AM Subject: Storing currency values Hello. I've spent some day(s) probing the web to find a solution to this problem: A table-column for storing currency - float(10,2). As my users are punches the currency value like this 255,55, with a comma as decimal point, MySQL

Re: Storing currency values

2004-01-12 Thread robert_rowe
Just convert the format of the input in your program before saving the value. In VB/ASP us can do: replace(255,55,,,.) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Storing currency values

2004-01-12 Thread Roger Baklund
* Asbjørn Konstad I’ve spent some day(s) probing the web to find a solution to this problem: A table-column for storing currency – float(10,2). As my users are punches the currency value like this “255,55”, with a comma as decimal point, MySQL stores this value as zero (0.00). I quess

currency precision with decimal row

2003-10-25 Thread Jean-Pierre Schwickerath
Hello! I'm trying to write some kind of small accounting software and I got stuck with the problem that doing a SUM() on values of a DECIMAL(7,2) row did show problems with (relatively) small values (like 173.58). I found a message explaining that mysql uses doubles internly to compute the

Re: currency precision with decimal row

2003-10-25 Thread Roger Baklund
* Jean-Pierre Schwickerath I'm trying to write some kind of small accounting software and I got stuck with the problem that doing a SUM() on values of a DECIMAL(7,2) row did show problems with (relatively) small values (like 173.58). I found a message explaining that mysql uses doubles

Currency

2003-10-02 Thread Fabio Bernardo
I´m having some problems with currency´s fields. Actually I dont know what mysql´s field typeI have to choose..^ I wanna input this value: U$32.00 but, when I write the query: Select 'field' from table it returns.. '32' and not 32.00. Which select statement do i have to write

Re: Currency

2003-10-02 Thread Paul DuBois
At 17:32 -0300 10/2/03, Fabio Bernardo wrote: I´m having some problems with currency´s fields. Actually I dont know what mysql´s field typeI have to choose..^ I wanna input this value: U$32.00 but, when I write the query: Select 'field' from table it returns.. '32' and not 32.00

Re: Currency

2003-10-02 Thread Scott Brown
I am guessing that you are trying to find a MySQL data type of Currency, which does not exist. I generally use a column that is DECIMAL(150,2) for US currency. --Scott At 01:32 PM 10/2/2003, Fabio Bernardo wrote: I´m having some problems with currency´s fields. Actually I dont know what

RE: Best practice column type for storing decimal currency amounts?

2003-07-17 Thread Rudy Metzger
-Original Message- From: John Hicks [mailto:[EMAIL PROTECTED] Sent: woensdag 16 juli 2003 22:03 To: Rudy Metzger; [EMAIL PROTECTED] Subject: Re: Best practice column type for storing decimal currency amounts? Thanks for the reply, Rudy. My source for the statement that decimal values

RE: Best practice column type for storing decimal currency amounts?

2003-07-16 Thread Rudy Metzger
PROTECTED] Subject: Best practice column type for storing decimal currency amounts? Is there an accepted best practice on whether to store decimal currency amounts (e.g. dollars and cents) in MySQL decimal column types? Certainly, the most straightforward way is to use decimal columns

Re: Best practice column type for storing decimal currency amounts?

2003-07-16 Thread John Hicks
PROTECTED] Sent: dinsdag 15 juli 2003 21:39 To: [EMAIL PROTECTED] Subject: Best practice column type for storing decimal currency amounts? Is there an accepted best practice on whether to store decimal currency amounts (e.g. dollars and cents) in MySQL decimal column types? Certainly

Re: Best practice column type for storing decimal currency amounts?

2003-07-16 Thread Keith C. Ivey
On 16 Jul 2003 at 16:02, John Hicks wrote: Thanks for the reply, Rudy. My source for the statement that decimal values are stored as strings is: http://www.mysql.com/doc/en/Numeric_types.html : DECIMAL values may very well be stored as strings, but presumably you're going to do some

Best practice column type for storing decimal currency amounts?

2003-07-15 Thread John Hicks
Is there an accepted best practice on whether to store decimal currency amounts (e.g. dollars and cents) in MySQL decimal column types? Certainly, the most straightforward way is to use decimal columns. But it appears that such values are stored as ASCII strings, which would be inefficient

MySQL supports no ¤ (Euro currency) char?

2002-09-21 Thread root
Description: While trying to login to the MySQL database (as root), I failed for no apparent reason. I believe this migth be because my password includes the ¤ (Euro / European currency) char. It works _perfectly_ if I remove that one char or replace it with another

Currency Problem

2002-08-21 Thread delz
Hi, I just want to know if mysql can set the output of a certain currency to this pattern : $1,500.00 If I use a comma on a certain amount then I add it up to another amount with a comma I get the wrong answer. I'm using php mysql by the way. Any hints on this one? Regards, Delz

Re: Currency Problem

2002-08-21 Thread Dave Reinhardt
this is a php question, try: http://www.php.net/manual/en/function.number-format.php Hi, I just want to know if mysql can set the output of a certain currency to this pattern : $1,500.00 If I use a comma on a certain amount then I add it up to another amount with a comma I get

currency type

2002-07-30 Thread Desmond Lee
Hi there Does mysql have a currency type, or is it best to just use a varchar or a float? Thanks Desmond _ Join the world’s largest e-mail service with MSN Hotmail. http://www.hotmail.com

Re: currency type

2002-07-30 Thread Mike(mickako)Blezien
Desmond Lee wrote: Hi there Does mysql have a currency type, or is it best to just use a varchar or a float? Thanks Desmond I normally use the DECIMAL(6,2) data type, works very for currency values. -- Mike(mickalo)Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain

Re: currency type

2002-07-30 Thread Desmond Lee
] Reply-To: [EMAIL PROTECTED] To: Desmond Lee [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: Re: currency type Date: Tue, 30 Jul 2002 11:36:30 -0500 Desmond Lee wrote: Hi there Does mysql have a currency type, or is it best to just use a varchar or a float? Thanks Desmond I

Re: currency type

2002-07-30 Thread Paul DuBois
] CC: [EMAIL PROTECTED] Subject: Re: currency type Date: Tue, 30 Jul 2002 11:36:30 -0500 Desmond Lee wrote: Hi there Does mysql have a currency type, or is it best to just use a varchar or a float? Thanks Desmond I normally use the DECIMAL(6,2) data type, works very for currency values

formatting currency in mysql

2002-05-06 Thread Graeme B. Davis
Does anyone have a quick tip on how to format a float/numeric in the following currency format with a query? $xx,xxx.xx Thanks! Graeme - Before posting, please check: http://www.mysql.com/manual.php (the manual

Re: formatting currency in mysql

2002-05-06 Thread Issvar
SELECT FORMAT(yourvalue,2) - Original Message - From: Graeme B. Davis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 06, 2002 10:16 PM Subject: formatting currency in mysql Does anyone have a quick tip on how to format a float/numeric in the following currency format

RE: most appropriate data type for currency?

2002-01-27 Thread Matthew Walker
type for currency? For currency, it depends on your use of course, but fixed-point is usually easiest. Where you fix the point depends on the precision you require. For display purposes it is easiest to use the smallest currency unit as an integer (e.g. cents). For conversions, daily interest

most appropriate data type for currency?

2002-01-26 Thread Michael Collins
Using MySQL 3.23.47, is the best data type for small currency float(4) ? This is for prices of items in a shopping cart for example t-shirts. What is the difference in using float vs decimal? I know I don't need double. -- Michael __ ||| Michael Collins ||| ||| Kuwago Web Services

Re: most appropriate data type for currency?

2002-01-26 Thread Shankar Unni
Michael Collins wrote: Using MySQL 3.23.47, is the best data type for small currency float(4) ? This is for prices of items in a shopping cart for example t-shirts. What is the difference in using float vs decimal? I know I don't need double. Float has accuracy problems at large ranges

Re: most appropriate data type for currency?

2002-01-26 Thread Shankar Unni
[database,sql,query,table] Shankar Unni wrote: Float has accuracy problems at large ranges. A typical float has a fixed number of so-called significant digits. For 32-bit IEEE floats, that's about 6. Of course, in the interests of fairness, I should note that typical doubles (64-bit

Re: most appropriate data type for currency?

2002-01-26 Thread steve
For currency, it depends on your use of course, but fixed-point is usually easiest. Where you fix the point depends on the precision you require. For display purposes it is easiest to use the smallest currency unit as an integer (e.g. cents). For conversions, daily interest, etc, you can do

Re: most appropriate data type for currency?

2002-01-26 Thread Michael Collins
At 3:10 PM -0800 1/26/02, Shankar Unni wrote: Of course, in the interests of fairness, I should note that typical doubles (64-bit IEEE) have about 15 digits of accuracy, which are generally enough, as long as you never exceed 10**13 dollars (i.e. no US govt budget work :-)). You only have to

currency: which data type?

2001-11-12 Thread Saqib Shaikh
Hi, I'm interested to know what data type people consider suitable for storing currency. In a table in my database for a university assignment, i have: create table Products( ... price double(4,2) not null, ...); However it has been suggested to me that double(4,2) is inappropriate

Best Column Type for Currency Calculations

2001-06-05 Thread Aaron Clausen
I've been having some problems with currency calculations in SQL queries. I've been using Double, but often get some very small rounding errors. What is the recommended column type for currency in MySQL? Aaron - Before

Re: Best Column Type for Currency Calculations

2001-06-05 Thread Ron Beck
convert everything to pennies and use integers? Aaron Clausen wrote: I've been having some problems with currency calculations in SQL queries. I've been using Double, but often get some very small rounding errors. What is the recommended column type for currency in MySQL? Aaron

RE: Best Column Type for Currency Calculations

2001-06-05 Thread Don Read
On 05-Jun-01 Aaron Clausen wrote: I've been having some problems with currency calculations in SQL queries. I've been using Double, but often get some very small rounding errors. What is the recommended column type for currency in MySQL? DECIMAL(9,2) Regards, -- Don Read