What steps will reproduce the problem?
On in a spatialite enabled database:
CREATE TABLE SampleValue (
UUID integer NOT NULL,
ValueTimestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
VocabID INTEGER,
AttributeID TEXT NOT NULL,
FreeText TEXT
);
INSERT INTO sampleValue(uuid, valuetimestamp, vocabid, attributeId, freetext)
values(1, '2013-02-15 00:41:09', 1, 1, 'foo');
INSERT INTO sampleValue(uuid, valuetimestamp, vocabid, attributeId, freetext)
values(1, '2012-02-15 00:41:09', 1, 1, 'bar');
INSERT INTO sampleValue(uuid, valuetimestamp, vocabid, attributeId, freetext)
values(1, '2011-02-15 00:41:09', 1, 1, 'baz');
select * from sampleValue group by uuid, attributeID having max(valuetimestamp);
the select will return the wrong value.
What is the expected output? What do you see instead?
Expected output is:
1|2013-02-15 00:41:09|1|1|foo
Output gotten is the 2011 result.
What version of the product are you using? On what operating system?
spatialite-android 3.0.1
Please provide any additional information below.
An android project replicating this (can also be replicated in pure sqlite with
the right version) can be found at: http://dl.dropbox.com/u/60155570/bug.zip
(linked without attachment due to size)
Original issue reported on code.google.com by Denub...@gmail.com on 18 Feb 2013 at 4:33
Original issue reported on code.google.com by
Denub...@gmail.com
on 18 Feb 2013 at 4:33Attachments: