I don't mean to muddy the water here. It has been a very long time since I first used SQL, but I seem to remember one of the original selling points was that it was "user friendly" and therefore "Type-less" so even a "Manager" could write "English like queries" and not have to resort to dealing with the "programming department." :-)
I think the underling discussion should remain on the method of storage and retrieval and insure that the change does not reduce accuracy or unduly complicate data management. Even though I have championed the "Standard." My contention is, if done properly, the Standard will be preserved. Fred > -----Original Message----- > From: Drew, Stephen [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 02, 2005 10:01 AM > To: sqlite-users@sqlite.org > Subject: RE: [sqlite] Proposed 3.3.0 changes. Was: 5/2==2 > > > I think this is the best solution in the real world, although I agree > with DRH that different division operators are a bad thing. > > Surely if somebody wants the result as an integer, they can use > sqlite3_column_int() to pull the result out? Or even write a function > to do whatever rounding they see fit. > > Oracle, however, returns the following: > > > CREATE TABLE test_table1(a INTEGER, b NUMBER(21,18)); > > INSERT INTO test_table1 VALUES(5,5); > > SELECT a/2, b/2 FROM test_table1; > > > > 2.5 | 2.5 > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 02 November 2005 15:37 > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Proposed 3.3.0 changes. Was: 5/2==2 > > Consider the following SQL: > > CREATE TABLE t1(a INTEGER, b REAL); > INSERT INTO t1 VALUES(5,5); > SELECT a/2, b/2 FROM t1; > > From the above SQL, SQLite version 3.2.7 and earlier will return > > 2|2 > > If my proposed changes for 3.3.0 go in, then the result will be: > > 2.5|2.5 > > If I understand what most people are saying, the SQL standard > says that > the result should be: > > 2|2.5 > > Does this correctly summarize the situation? > > Do other SQL database engines consistently return the 3rd case? > > Am I alone in thinking that a division operator that does different > things depending on the declared datatype of a column is an > abomination? > > Does anybody have a real-world example where any of this will actually > make a difference, or is this really just an academic argument? > > -- > D. Richard Hipp <[EMAIL PROTECTED]> > > >