Enclosing has failed too. In the insert statement the concentration value is 0.
But the update: update hts.RSC_ALL_RETESTS set CONCENTRATION = '0.000008' where assay_id = 623 The value in concentration is 0,00001 so i think is is the wrong datatyp of the concentration field. I have tested again and now i have: "CONCENTRATION" DECIMAL(20,10) and it won't work. On 15 Jan., 13:07, Christoph Läubrich <[email protected]> wrote: > Okay, it sounds like the entry (=row) is not inserted at all. Have you > tried enclosing the value in '0.00008' or inserting with a prepared > statement? > > Am 15.01.2012 13:03, schrieb Jochen Schreiber: > > > > > > > > > Nothing. All works. And all values are in the right field but only the > > concentration field is 0 > > > On 15 Jan., 12:58, Christoph L ubrich<[email protected]> wrote: > > >> What is the respone to your query from the DB server? > > >> Am 15.01.2012 12:55, schrieb Jochen Schreiber: > > >>> Hasn't solve the first problem. > > >>> Here is the complete definition of the table > > >>> CREATE TABLE HTS.RSC_ALL_RETESTS > >>> ( "FELD1" NUMBER(4), > >>> "FELD2" NUMBER(2), > >>> "FELD3" VARCHAR(13), > >>> "FELD4" VARCHAR(13), > >>> "FELD5" VARCHAR(13), > >>> "FELD6" VARCHAR(13), > >>> "FELD7" VARCHAR(13), > >>> "FELD8" DATE, > >>> "FELD9" VARCHAR(20), > >>> "FELD10" NUMBER(8), > >>> "FELD11" VARCHAR(1), > >>> "FELD12" NUMBER(12), > >>> "FELD13" NUMBER(12), > >>> "FELD14" NUMBER(12), > >>> "FELD15" NUMBER(12), > >>> "FELD16" NUMBER(8), > >>> "FELD17" NUMBER(5), > >>> "CONCENTRATION" DECIMAL(8,7) > >>> ); > > >>> Insert into HTS.RSC_ALL_RETESTS > >>> (FELD1,FELD2,FELD3,FELD17,FELD10,FELD11,FELD13,FELD7,CONCENTRATION) > >>> values (623,1,'3BSP20465N09',464,'s',24.61,262.32,hts.to_date('25- > >>> MAY-11','DD-MON-RR'),0.0000008); > > >>> But this entry doesn't exists....and i don't know why > > >>> On 15 Jan., 12:38, Christoph L ubrich<[email protected]> wrote: > > >>>> Definition should be: > > >>>> DECIMAL(8,7) (8 digits, scale 7) > > >>>> Beside this, you should use getBigDecimal instead of floats which would > >>>> result in rounding errors. > > >>>> Am 15.01.2012 12:35, schrieb Jochen Schreiber: > > >>>>> Hello everybody, > > >>>>> i have such values: 0.0000008 etc. They have all the same length etc. > > >>>>> If i insert this in the database they will not be in the database and > >>>>> i think it is because of the wrong datatype of the field where they > >>>>> would be inserted. > > >>>>> I have tested DECIMAL(8,8) and NUMBER(15,8) etc. but a half of the > >>>>> values with the format above will not be inserted and i don't know > >>>>> how. > > >>>>> Another problem is then that if i read it out with java and a > >>>>> ResultSet (see below) i gained crazy outputs: > > >>>>> JavaCode: > > >>>>> rs = session.connection().createStatement().executeQuery(sql); > >>>>> while (rs.next()){ > >>>>> Float bl = rs.getFloat("concentration"); > >>>>> System.out.println(bl + ": " + rs.getInt("protocol_id")); > >>>>> } > > >>>>> Output: > > >>>>> 0.0000035000: 33 > >>>>> 2.000E-7: 132 > >>>>> 0.0000047000: 132 > >>>>> 0.0000010000: 132 > >>>>> 0.0000056000: 132 > >>>>> 0.0000013000: 431 > >>>>> 0.0000069000: 431 > >>>>> 2.000E-7: 431 > >>>>> 0.0000059000: 431 > >>>>> 9.000E-7: 8 > >>>>> 0.0000046000: 8 > >>>>> 2.000E-7: 8 > >>>>> 0.0000039000: 8 > >>>>> 2.000E-7: 339 > >>>>> 9.000E-7: 339 > >>>>> 0.0000048000: 339 > >>>>> 0.0000040000: 339 > >>>>> 0.0000010000: 352 > >>>>> 0.0000051000: 352 > >>>>> 2.000E-7: 352 > >>>>> 0.0000043000: 352 > >>>>> 0.0000010000: 58 > >>>>> 0.0000051000: 58 > >>>>> 2.000E-7: 58 > >>>>> 0.0000043000: 58 > >>>>> 0E-10: 370 > >>>>> 3.000E-7: 405 > >>>>> 0.0000015000: 405 > >>>>> 0.0000066000: 405 > >>>>> 0.0000078000: 405 > >>>>> 0.0000075000: 449 > >>>>> 0.0000089000: 450 > >>>>> 0.0000075000: 450 > >>>>> 0.0000089000: 449 > >>>>> 0.0000018000: 449 > >>>>> 3.600E-7: 450 > > >>>>> But what is wrong? I don't see it > > >>>>> Greetz > > >>>>> Jochen Schreiber -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
