Re: DataType Question
"Melissa Dougherty" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.windows |
|---|---|
| Message-ID | <003701c6901c$bf0d9420$6400a8c0@denterprise1> |
I'm using MySQL 5.0.19 and I'm loading the data using MySQL Front. I've tried using decimal(10,2) and double(12,2), both gave me the data truncated error. Is there an easier way to load data into the database.... other than using MySQL Front? Melissa ----- Original Message ----- From: "Armando" <[email protected]> To: <[email protected]> Sent: Wednesday, June 14, 2006 8:22 PM Subject: Re: DataType Question > 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] > -- MySQL Windows Mailing List For list archives: http://lists.mysql.com/win32 To unsubscribe: http://lists.mysql.com/[email protected]