Re: DataType Question

Armando <[email protected]>
Newsgroups gmane.comp.db.mysql.windows
Message-ID <[email protected]>
Decimal, Double and Float will all allow negative numbers.

A little more information would be helpful... what version of MySQL are 
you using? How are you loading your data in the CVS file into the table?
What length are you setting for the datatype? (ie; 7,2) Cheers.

Armando

Melissa Dougherty wrote:
> I've converted the data.... but when I try to insert into a table with 
> either decimal or double.... I get 'data truncated for column.... 1265' 
> error.  What numeric datatype with allow for negative numbers?  I looked 
> at the MySQL site and thought they would work.
> 
> Melissa
> 
> ----- Original Message ----- From: "Don Lancaster" <[email protected]>
> To: "Melissa Dougherty" <[email protected]>
> Sent: Wednesday, June 14, 2006 9:38 AM
> Subject: RE: DataType Question
> 
> 
>> You could write a stored procedure to convert the data.  Accept as 
>> string, and for each value with parentheses, strip the parentheses and 
>> tack on the negative sign.  I didn't see anything in the MySQL 
>> reference manual about currency.
>>
>> -----Original Message-----
>> From: Melissa Dougherty [mailto:[email protected]]
>> Sent: Wednesday, June 14, 2006 9:29 AM
>> To: [email protected]
>> Subject: DataType Question
>>
>>
>> I'm importing data into MySQL from a CVS file.... one column has 
>> dollar amounts.  There are negative numbers like this... (999.99).  Is 
>> there a way to get the database to convert this into.... -999.99?  And 
>> what is the best datatype to choose?
>>
>> Thanks,
>>
>>
>> Melissa
>>
> 
> 

-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.