Subject | Big mistake in float data type |
---|---|
Author | akdatilla |
Post date | 2009-07-03T08:35:34Z |
When I created a new table as below
----------------------------------
CREATE TABLE testtbl (
MBA_ID INTEGER NOT NULL,
MBA_YIL INTEGER,
MBA_MGR VARCHAR(15),
MBA_HOU SMALLINT,
MBA_HOUSE VARCHAR(30),
MBA_GMIKTAR INTEGER,
MBA_GTUTAR FLOAT,
MBA_ORN FLOAT,
MBA_BMIKTAR INTEGER,
MBA_BTUTAR FLOAT,
MBA_ILKMIKTAR INTEGER,
MBA_ILKTUTAR FLOAT,
MBA_USER INTEGER,
MBA_ONAYLAYAN INTEGER,
MBA_MAMUL VARCHAR(50),
MBA_MML float,
primary key (mba_id)
);
----------------------------------
after put into some data in it and when I run the insert command below
----------------------------------
INSERT INTO testtbl
(mba_id,mba_mml,mba_yil,mba_mgr,mba_hou,mba_house,mba_mamul,mba_gmiktar,mba_
gtutar,
mba_bmiktar,mba_btutar,mba_orn,mba_ilkmiktar,mba_ilktutar,mba_user,mba_onayl
ayan) VALUES (4,200016321,2009,'PP1',4,'AIR-VAL ',
'DISPLAY MINIATURES MICKEY',157,234900,179,270135,0,0,0,0,0)
----------------------------------
the result was below
----------------------------------
MBA_ID MBA_YIL MBA_MGR MBA_HOU MBA_HOUSE MBA_GMIKTAR
MBA_GTUTAR MBA_ORN MBA_BMIKTAR MBA_BTUTAR MBA_ILKMIKTAR
MBA_ILKTUTAR MBA_USER MBA_ONAYLAYAN MBA_MAMUL MBA_MML
4 2.009 PP1 4 AIR-VAL 157 234.900,000 0,000 179
270.135,000 0 0,000 0 0 DISPLAY MINIATURES MICKEY
200.016.320,000
----------------------------------
This result of "MBA_MML" column value has to be '200016321' but I got the result '200.016.320,000' which was minus 1 of 200016321.
How can I solve this problem?
----------------------------------
CREATE TABLE testtbl (
MBA_ID INTEGER NOT NULL,
MBA_YIL INTEGER,
MBA_MGR VARCHAR(15),
MBA_HOU SMALLINT,
MBA_HOUSE VARCHAR(30),
MBA_GMIKTAR INTEGER,
MBA_GTUTAR FLOAT,
MBA_ORN FLOAT,
MBA_BMIKTAR INTEGER,
MBA_BTUTAR FLOAT,
MBA_ILKMIKTAR INTEGER,
MBA_ILKTUTAR FLOAT,
MBA_USER INTEGER,
MBA_ONAYLAYAN INTEGER,
MBA_MAMUL VARCHAR(50),
MBA_MML float,
primary key (mba_id)
);
----------------------------------
after put into some data in it and when I run the insert command below
----------------------------------
INSERT INTO testtbl
(mba_id,mba_mml,mba_yil,mba_mgr,mba_hou,mba_house,mba_mamul,mba_gmiktar,mba_
gtutar,
mba_bmiktar,mba_btutar,mba_orn,mba_ilkmiktar,mba_ilktutar,mba_user,mba_onayl
ayan) VALUES (4,200016321,2009,'PP1',4,'AIR-VAL ',
'DISPLAY MINIATURES MICKEY',157,234900,179,270135,0,0,0,0,0)
----------------------------------
the result was below
----------------------------------
MBA_ID MBA_YIL MBA_MGR MBA_HOU MBA_HOUSE MBA_GMIKTAR
MBA_GTUTAR MBA_ORN MBA_BMIKTAR MBA_BTUTAR MBA_ILKMIKTAR
MBA_ILKTUTAR MBA_USER MBA_ONAYLAYAN MBA_MAMUL MBA_MML
4 2.009 PP1 4 AIR-VAL 157 234.900,000 0,000 179
270.135,000 0 0,000 0 0 DISPLAY MINIATURES MICKEY
200.016.320,000
----------------------------------
This result of "MBA_MML" column value has to be '200016321' but I got the result '200.016.320,000' which was minus 1 of 200016321.
How can I solve this problem?