From: Skopalik S. <sko...@hl...> - 2002-09-19 09:10:50
|
> SQL> INSERT INTO test VALUES(6,null); > Statement failed, SQLCODE = -803 > > violation of PRIMARY or UNIQUE KEY constraint "UNQ" on table "TEST" Sorry, my mistake, I forget unique in script. > Perhaps you have a special version of Firebird? > > Anyway, once I recreated the table without the unique index I tried this: I don't have problem with FB, I work on test for FB, reading doc and comparing result with doc. I try use fb-test to consult result of stataments before I post error to tracker database. > > Dialect 3 databases do integer arithmetic on integers. It doesn't > promote them to floats in anticipation of our expectations. It is > arguable whether the new behaviour is correct. Partisans of that > argument have fought it out twice now in ib-support. > > I'll leave you to experiment with the variations: > > SQL> SELECT AVG(id*1.00) FROM test > Problem is probably in FB doc, because AVG (or integer aritmetic ?) are not properly defined. Finally, integer div is unexcepted in result, but it is only my opinion. Slavek |