BUG found with UNIQUE modifier ... Is it true or am I ...
Posted in 1994
Topics: SQL Development & Query Writing, Stored Procedures & SPL
The strangest thing happened to me while puddling around with one
of my most favorite tasks, report writing .... :-(((
Doing a select unique on an integer field that contains two values
(1993 and 1994) it only returns a single value, the program I used is
really straightforward..
DATABASE reger
MAIN
DEFINE t,s INTEGER
DECLARE cc CURSOR FOR
SELECT UNIQUE top_year FROM top_liste
DISPLAY "START UNIQUE"
FOREACH cc INTO t
DISPLAY t
END FOREACH
DISPLAY "STOP UNIQUE"
DECLARE cc_1 CURSOR FOR
SELECT top_year, COUNT(*) FROM top_liste
GROUP BY top_year
DISPLAY "START GROUP BY"
FOREACH cc_1 INTO t,s
DISPLAY t,s
END FOREACH
DISPLAY "STOP GROUP BY"
END MAIN
... AND here are the results
START UNIQUE
1994
STOP UNIQUE
START GROUP BY
1993 8180
1994 2626
STOP GROUP BY
Now what do you think of this stuff ????
--
_______________________________________________________________________________
Stephan Gilbert, M.S.E.E,
Mauerkircherstr. 8 email: stephan@gaston.m.isar.de
D-81679 Muenchen, Fed. Rep. of Germany