Fred G DECIMAL datatype automatically makes blank become 0
Aug 04, 2012; 23:14
Fred G
DECIMAL datatype automatically makes blank become 0
Hi--
I'm using MySQL 5.2 Workbench, and when I import a csv into MySQL, blank values become 0 when I define the datatype to be a DECIMAL (in our case (DECIMAL(12,2)). Since there is the potential for values to be 0, this poses a problem for us. I initially wanted to make all the DECIMAL values become VARCHAR(255), because I can still do inequality queries on this column if it is a VARCHAR, and VARCHAR does not mind blanks. It keeps them as is.
But I'm sure that I must be missing something here. Is there a way to use a DECIMAL-like operator that treats blanks as blanks? If not, is there a better strategy then making the relevant column a VARCHAR?
Much thanks!
Aug 06
Fred G Re: DECIMAL datatype automatically makes blank become 0
Aug 06, 2012; 09:47
Fred G
Re: DECIMAL datatype automatically makes blank become 0
Aug 06
Stillman, Benjamin RE: DECIMAL datatype automatically makes blank become 0
Aug 06, 2012; 18:05
Stillman, Benjamin
RE: DECIMAL datatype automatically makes blank become 0
Aug 06
Stillman, Benjamin RE: DECIMAL datatype automatically makes blank become 0
Aug 06, 2012; 18:13
Stillman, Benjamin
RE: DECIMAL datatype automatically makes blank become 0
Aug 06
Fred G Re: DECIMAL datatype automatically makes blank become 0
Aug 06, 2012; 14:20
Fred G
Re: DECIMAL datatype automatically makes blank become 0
Aug 07
hsv Re: DECIMAL datatype automatically makes blank become 0
Aug 07, 2012; 15:36
hsv
Re: DECIMAL datatype automatically makes blank become 0
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!