Re: Math problem

2006-06-23 Thread Karl Larsen
sales * price AS `Turnover $` From titles; HTH, Cor - Original Message - From: "Karl Larsen" <[EMAIL PROTECTED]> To: "Chris W" <[EMAIL PROTECTED]> Cc: "MYSQL General List" Sent: Thursday, June 22, 2006 10:04 PM Subject: Re: Math problem Chris

Re: Math problem

2006-06-22 Thread C.R.Vegelin
W" <[EMAIL PROTECTED]> Cc: "MYSQL General List" Sent: Thursday, June 22, 2006 10:04 PM Subject: Re: Math problem Chris W wrote: Karl Larsen wrote: I'm trying to multiply numbers one of which is money. The money looks like this: SELECT price FROM titles; | pr

Re: Math problem

2006-06-22 Thread Peter Brawley
>It appears that mysys 4.1 does not know how to multiply a dollar >amount to another number. Has anyone else seen this problem? If price is a string beginning with '$', MySQL will autoconvert SubString(price,2) to a numeric iif it's in a numeric expression, but you'd be much better off losing t

Re: Math problem

2006-06-22 Thread Karl Larsen
Chris W wrote: Karl Larsen wrote: I'm trying to multiply numbers one of which is money. The money looks like this: SELECT price FROM titles; | price | ++ | $20.00 | | $19.99 | | $7.99 | | $19.99 | | $11.95 | | $19.99 | | $14.99 | | $11.95 | | $22.95 | | $2.99 | | $10.95 | | $7.

Re: Math problem

2006-06-22 Thread Brent Baisley
dollar/currency/money, call it whatever you like, but if it's got a $ in front of it, then it's a string, not a number. Your price field should have been created as a decimal. I'm guessing it's a char type. You should also set your fields to default to 0, not NULL. The problem is with your setup,

RE: Math problem

2006-06-22 Thread Jay Blanchard
[snip] It appears that mysys 4.1 does not know how to multiply a dollar amount to another number. Has anyone else seen this problem? [/snip] Your price column contains a dollar sign, making it a text field that you cannot multiply with. -- MySQL General Mailing List For list archives: http:/

Re: Math problem

2006-06-22 Thread Chris W
Karl Larsen wrote: I'm trying to multiply numbers one of which is money. The money looks like this: SELECT price FROM titles; | price | ++ | $20.00 | | $19.99 | | $7.99 | | $19.99 | | $11.95 | | $19.99 | | $14.99 | | $11.95 | | $22.95 | | $2.99 | | $10.95 | | $7.00 | | $2.99 |